Changes between Version 30 and Version 31 of kernel_syscalls


Ignore:
Timestamp:
Jan 23, 2015, 10:00:10 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_syscalls

    v30 v31  
    5353These 6 functions can be used for both a NIC_RX or NIC_TX channel, depending on the '''is_rx''' argument.
    5454
    55 === 1) int '''_sys_nic_alloc'''( unsigned int is_rx ,  unsigned int x_size ,  unsigned int y_size ) ===
    56 This function allocates a private NIC_RX or NIC_TX channel, and a private CMA channel to the calling task. It register these channel indexes in the task context. It allocates the distributed kernel chbuf associated to the NIC channel: both  the distributed 4 Kbytes containers (one container per cluster from the distributed kernel heap), and the chbuf  descriptor (in the seg_kernel_data segment in cluster [0,0]). The involved clusters are defined by the (x_size / y_size) parameters.
     55=== 1) int '''_sys_nic_alloc'''( unsigned int is_rx ,  unsigned int xmax ,  unsigned int ymax ) ===
     56This function allocates a private NIC_RX or NIC_TX channel, and a private CMA channel to the calling task. It register these channel indexes in the task context. It allocates the distributed kernel chbuf associated to the NIC channel: both  the distributed 4 Kbytes containers (one container per cluster from the distributed kernel heap), and the chbuf  descriptor (in the seg_kernel_data segment in cluster [0,0]). The number of involved clusters is defined by the (xmax / ymax) parameters, that cannot be larger than (X_SIZE, Y_SIZE), but can be smaller.
    5757 * '''is_rx''' : boolean (RX transfer if non zero)
    58  * '''x_size''' : number of clusters in a row
    59  * '''y_size''' : number of clusters in a column
    60 Returns the NIC channel index if success. Return -1 if no NIC channel available, if no CMA channel available, if (x_size / y_size) are too large, or if not enough memory in the kernel heap.
     58 * '''xmax''' : number of clusters in a row
     59 * '''ymax''' : number of clusters in a column
     60Returns the NIC channel index if success. Return -1 if no NIC channel available, if no CMA channel available, if (xmax / ymax) are too large, or if not enough memory in the kernel heap.
    6161
    6262=== 2) int '''_sys_nic_start'''( unsigned int is_rx,  unsigned int channel ) ===