Changes between Version 28 and Version 29 of kernel_syscalls
- Timestamp:
- Jan 23, 2015, 5:51:33 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
kernel_syscalls
v28 v29 53 53 These 4 functions can be used for both a NIC_RX or NIC_TX channel, depending on the '''is_rx''' argument. 54 54 55 === 1) int '''_sys_nic_alloc'''( unsigned int is_rx ) ===56 This function allocates a private NIC_RX or NIC_TX channel, the associated chbuf, and a private CMA channel to the calling task. It register these channel indexes in the task context.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. 57 57 * '''is_rx''' : boolean (RX transfer if non zero) 58 Returns the NIC channel index if success. Return -1 if no NIC channel available, or if no CMA channel available. 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. 59 61 60 62 === 2) int '''_sys_nic_start'''( unsigned int is_rx, unsigned int channel ) === 61 This function initializes the kernel chbuf allocated to the calling task. It allocates the distributed 4 Kbytes containers (one container per cluster) from the distributed kernel heap, and initializes the kernel chbuf describing the containers status. This chbuf descriptor is allocated in the seg_kernel_data segment in cluster [0,0]. 62 It starts the NIC channel allocated to the calling task, and starts the CMA transfer between the NIC chbuf and the distributed kernel chbuf. The CMA component is configured in OUT_OF_ORDER transfer mode (non blocking when a SRC or DST container is not available). 63 This function starts the NIC channel allocated to the calling task, and starts the CMA transfer between the NIC chbuf and the distributed kernel chbuf. The CMA component is configured in OUT_OF_ORDER transfer mode (non blocking when a SRC or DST container is not available). 63 64 * '''is_rx''' : boolean (RX transfer if non zero) 64 65 * '''channel''' : RX or TX channel index