Changes between Version 113 and Version 114 of library_stdio


Ignore:
Timestamp:
Sep 20, 2015, 7:30:27 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v113 v114  
    334334 == __Network related system call__ ==
    335335
    336 The GIET_VM allows a user thread to get and use a private NIC channel, using the CMA component (chained buffers DMA) to transfer packets to or an user buffer.
    337 The NIC channel and the CMA channel are registered in the thread context.
    338 
    339  === 1) unsigned int '''giet_nic_tx_alloc'''( unsigned int xmax,  unsigned int ymax) ===
    340 This function allocates a private NIC_TX channel (coming with the associated kernel NIC_TX chbuf), and a private CMA channel  to the calling thread. It registers both indexes in the calling thread context, and returns the NIC channel index. This channel can be shared by severals threads of a parallel multi-threads application.
    341 The packets are transfered by the hardware to the NIC from a distributed kernel chbuf (one 4 Kbytes container per cluster), where the number of involved clusters is defined by the (xmax / ymax) parameters. The (xmax / ymax) arguments cannot be larger than (X_SIZE / Y_SIZE) defining the max number of clusters in the platform, but they can be smaller.
     336The GIET_VM allows a user application to get and use a private NIC channel, using the CMA component (chained buffers DMA) to transfer packets to or an user buffer.
     337The NIC channel and the CMA channel are registered in the threads contexts.
     338
     339 === 1) void '''giet_nic_tx_alloc'''( unsigned int xmax,  unsigned int ymax) ===
     340This function must be called by one single thread (typically the main() ). It allocates a private NIC_TX channel (coming with the associated kernel NIC_TX chbuf), and a private CMA_TX channel  to an application. It registers these NIC_TX and CMA_TX channels in the contexts of all threads that are in the same vspace as the calling thread. These NIC and CMA channels are therefore shared by all thread of a multi-threads application.
     341The packets are transfered by the hardware to the NIC from a distributed kernel chbuf (one 4 Kbytes container per cluster), where the number of involved clusters is defined by the <xmax> & <ymax> arguments. The (xmax / ymax) arguments cannot be larger than (X_SIZE / Y_SIZE) defining the max number of clusters in the platform, but they can be smaller.
    342342The calling thread exit if no available NIC_TX channel,  if no available CMA channel, if (xmax / ymax) are too large, or if there is not enough memory for the distributed kernel containers in one selected cluster.
    343343
    344  === 2) unsigned int '''giet_nic_rx_alloc'''( unsigned int xmax,  unsigned int ymax ) ===
    345 This function allocates a private NIC_RX channel (coming with the associated kernel NIC_RX chbuf), and a private CMA channel  to the calling thread. It registers both indexes in the calling thread context, and returns the NIC channel index. This channel can be shared by severals threads of a parallel multi-threads application.
    346 The packets are transfered by the hardware from the NIC to a distributed kernel chbuf (one 4 Kbytes container per cluster), where the number of involved clusters is defined by the (xmax / ymax) parameters. The (xmax / ymax) arguments cannot be larger than (X_SIZE / Y_SIZE) defining the max number of clusters in the platform, but they can be smaller.
     344 === 2) void '''giet_nic_rx_alloc'''( unsigned int xmax,  unsigned int ymax ) ===
     345This function must be called by one single thread (typically the main() ). It allocates a private NIC_RX channel (coming with the associated kernel NIC_RX chbuf), and a private CMA channel  to an application. It registers these NIC_RX and CMA_RX channels in the contexts of all threads that are in the same space as the calling thread. These NIC and CMA channels are therefore shared by all threads of a multi-threads application.
     346The packets are transfered by the hardware from the NIC to a distributed kernel chbuf (one 4 Kbytes container per cluster), where the number of involved clusters is defined by the <xmax> & <ymax> argumentss. The (xmax / ymax) arguments cannot be larger than (X_SIZE / Y_SIZE) defining the max number of clusters in the platform, but they can be smaller.
    347347The calling thread exit if no available NIC_TX channel,  if no available CMA channel, if (xmax / ymax) are too large, or if there is not enough memory for the distributed kernel containers in one selected cluster.
    348348
    349  === 3) void '''giet_nic_tx_start'''( unsigned int channel ) ===
    350 This function activates both the NIC_TX channel, and the CMA channel allocated to the calling thread to transfer packets from the distributed kernel chbuf to the NIC.
    351 The calling thread exit if no allocated NIC_TX channel or no allocated CMA channel, or if the NIC channel argument does not fit the channel allocated to the calling thread.
    352 
    353  === 4) void '''giet_nic_rx_start'''( unsigned int channel ) ===
    354 This function activates both the NIC_RX channel, and the CMA channel allocated to the calling thread to transfer packets from the NIC to the distributed kernel chbuf.
     349 === 3) void '''giet_nic_tx_start'''( ) ===
     350This function  must be called by one single thread (typically the main() ). It activates both the NIC_TX channel, and the CMA_TX channel allocated to an application, to start the transfer of packets from the distributed kernel chbuf to the NIC.
     351The calling thread exit if no allocated NIC_TX channel or no allocated CMA_TX channel.
     352
     353 === 4) void '''giet_nic_rx_start'''( ) ===
     354This function  must be called by one single thread (typically the main() ). It activates both the NIC_RX channel, and the CMA_RX channel allocated to an application, to start the transfer of packets from the NIC to the distributed kernel chbuf.
     355The calling thread exit if no allocated NIC_RX channel or no allocated CMA_RX channel.
     356
     357 === 5) void '''giet_nic_tx_move'''(  void* buffer ) ===
     358This blocking function transfer one container (4 Kbytes)  from an user buffer to the kernel chbuf defined by the NIC_TX channel registered in the calling thread context. The <buffer> argument is the container base address in user space.
     359Several user threads can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf. It returns only when the container has been fully transfered.
     360The calling thread exit if the buffer is not in user space, or if no allocated NIC_TX channel, or in case of timeout.
     361
     362 === 6) void '''giet_nic_rx_move'''( void* buffer ) ===
     363This blocking function transfer one container (4 Kbytes)  from the kernel chbuf defined by the NIC_TX channel registered in the calling thread context to an user buffer. The <buffer> argument is the container base address in user space.
     364Several user threads can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf. It returns only when the container has been fully transfered.
     365The calling thread exit if the buffer is not in user space, or if no allocated NIC_RX channel, or in case of timeout.
     366
     367 === 7) void '''giet_nic_tx_stop'''( ) ===
     368This function must be called by one single thread (typically the main() ). It desactivates both the NIC_TX channel and the CMA_TX channel allocated to the calling thread.
     369The calling thread exit if no allocated NIC_TX channel or no allocated CMA_TX channel.
     370
     371 === 8) void '''giet_nic_rx_stop'''( ) ===
     372This function  must be called by one single thread (typically the main() ). It desactivates both the NIC_RX channel and the CMA channel allocated to the calling thread.
    355373The calling thread exit if no allocated NIC_RX channel or no allocated CMA channel.
    356374
    357  === 5) void '''giet_nic_tx_move'''( unsigned int nic_channel,  void* buffer ) ===
    358 This blocking function transfer one container (GIET_NIC_CHBUF_SIZE bytes)  from an user buffer to the kernel chbuf defined by the nic_channel argument.
    359  * '''nic_channel''' define the NIC channel index.
    360  * '''buffer''' is the container base address in user space.
    361 Several user threads can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf.
    362 It returns only when the container has been fully transfered.
    363 The calling thread exit if the buffer is not in user space, or if the NIC channel is too large, or in case of timeout.
    364 
    365  === 6) void '''giet_nic_rx_move'''( unsigned int nic_channel,  void* buffer ) ===
    366 This blocking function transfer one container (GIET_NIC_CHBUF_SIZE bytes)  from the kernel chbuf defined by the nic_channel argument to an user buffer.
    367  * '''nic_channel''' define the NIC channel index.
    368  * '''buffer'''  is the container base address in user space.
    369 Several user threads can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf.
    370 It returns only when the container has been fully transfered.
    371 The calling thread exit if the buffer is not in user space, or if the NIC channel is too large, or in case of timeout.
    372 
    373  === 7) void '''giet_nic_tx_stop( unsigned int channel ) ===
    374 This function desactivates both the NIC_TX channel and the CMA channel allocated to the calling thread.
    375 The calling thread exit if no allocated NIC_TX channel or no allocated CMA channel.
    376 
    377  === 8) void '''giet_nic_rx_stop( unsigned int channel ) ===
    378 This function desactivates both the NIC_RX channel and the CMA channel allocated to the calling thread.
    379 The calling thread exit if no allocated NIC_RX channel or no allocated CMA channel.
    380 
    381  === 9) void '''giet_nic_rx_clear'''( unsigned int channel ) ===
     375 === 9) void '''giet_nic_rx_clear'''( ) ===
    382376This function reset all instrumentation (packets counters) associated to the RX channels.
    383377
    384  === 10) void '''giet_nic_tx_clear'''( unsigned int channel ) ===
     378 === 10) void '''giet_nic_tx_clear'''( ) ===
    385379This function reset all instrumentation (packets counters) associated to the TX channels.
    386380
    387  === 11) void '''giet_nic_rx_stats( unsigned int channel ) ===
     381 === 11) void '''giet_nic_rx_stats( ) ===
    388382This function display on kernel TTY0 the content of the instrumentation registers associated to the RX channels.
    389383
    390  === 12) void '''giet_nic_tx_stats( unsigned int channel ) ===
     384 === 12) void '''giet_nic_tx_stats( ) ===
    391385This function display on kernel TTY0 the content of the instrumentation registers associated to the TX channels.
    392386
     
    454448
    455449
    456