X-Git-Url: https://git.ti.com/gitweb?p=keystone-rtos%2Fnetapi.git;a=blobdiff_plain;f=ti%2Fruntime%2Fnetapi%2Fnetapi.h;h=56f814ab7c2e7268a9474b907414cf8efdca07a0;hp=0b6c792db14528ef428ad72de56b441295411703;hb=ff182a90051b06066fcc02ea9cdb21effc150a43;hpb=d53220fa9a053edba100d218a6eac8f3fcb93352;ds=sidebyside diff --git a/ti/runtime/netapi/netapi.h b/ti/runtime/netapi/netapi.h index 0b6c792..56f814a 100755 --- a/ti/runtime/netapi/netapi.h +++ b/ti/runtime/netapi/netapi.h @@ -94,35 +94,83 @@ /** @} */ + + + /** @defgroup netapi_gen_functions NETAPI General Functions * @ingroup netapi */ -/** @defgroup netapi_cfg_functions NETAPI Configuration Functions + + +/** @defgroup netapi_cfg NETAPI Configuration Interface * @ingroup netapi */ - -/** @defgroup netapi_cfg_sec_functions NETAPI Security Configuration Functions - * @ingroup netapi +/** @defgroup cfg_functions NETAPI Configuration Functions + * @ingroup netapi_cfg + */ + +/** @defgroup cfg_structures NETAPI Configuration Structures used in API's + * @ingroup netapi_cfg + */ + +/** @defgroup cfg_constants NETAPI Configuration Constants + * @ingroup netapi_cfg */ -/** @defgroup netapi_sched_functions NETAPI Scheduler Functions +/** @defgroup netapi_security NETAPI Security Interface * @ingroup netapi */ -/** @defgroup netapi_pktio_functions NETAPI PKTIO Functions +/** @defgroup cfg_security_functions NETAPI Security Configuration Functions + * @ingroup netapi_security + */ + +/** @defgroup cfg_security_structures NETAPI Security Configuration Structures used in API's + * @ingroup netapi_security + */ + + +/** @defgroup security_constants NETAPI Security Constants + * @ingroup netapi_security + */ + +/** @defgroup netapi_pktio NETAPI PKTIO Interface * @ingroup netapi */ -/** @defgroup netapi_cb_functions NETAPI Callback Functions +/** @defgroup pktio_functions NETAPI PKTIO Functions + * @ingroup netapi_pktio + */ + +/** @defgroup pktio_structures NETAPI PKTIO Structures used in API's + * @ingroup netapi_pktio + */ + +/** @defgroup pktio_constants NETAPI PKTIO Constants + * @ingroup netapi_pktio + */ + +/** @defgroup netapi_scheduler NETAPI Scheduler Interface * @ingroup netapi */ +/** @defgroup sched_functions NETAPI Scheduler Functions + * @ingroup netapi_scheduler + */ + +/** @defgroup sched_structures NETAPI Scheduler Structures used in API's + * @ingroup netapi_scheduler + */ + +/** @defgroup sched_constants NETAPI Scheduler Constants + * @ingroup netapi_scheduler + */ -/** @defgroup netapi_structures NETAPI Structures used in API's +/** @defgroup netapi_cb_functions NETAPI Callback Functions * @ingroup netapi */ -/** @defgroup netapi_tune_parameters NETAPI Tune Parameters +/** @defgroup tune_parameters NETAPI Tune Parameters * @ingroup netapi */ @@ -138,13 +186,13 @@ /** * @def NETAPI_VERSION_STR * This is the version string which describes the NETAPI along with the - * date and build information.q + * date and build information. */ #define NETAPI_VERSION_STR "NETAPI Revision: 01.00.00.04" /** - * @ingroup netapi_structures + * @ingroup cfg_constants * @brief One per thread, used in most NETAPI function calls. */ typedef void * NETAPI_T; @@ -168,56 +216,6 @@ typedef void * NETAPI_T; */ #define NETAPI_NO_MASTER 0 //data only - -/** - * @ingroup netapi_structures - * @brief NETAPI configuration information - * - * @details The parameters in this structure are used to configure NETAPI. - */ -typedef struct NETAPI_CFG_Tag -{ - int def_mem_size; /**< Bytes of CMA memory we have allocated */ - int def_flow_pkt_rx_offset; /**< Offset in pkt buffer for hw to start RX */ - int def_max_descriptors; /**< Number of descriptors in system (must be power of 2), 2^14 max */ - int def_tot_descriptors_for_us; /**< Number of descriptors to create in our region (must be power of 2)*/ - int def_heap_n_descriptors; /**< Number of descriptor plus buffers in default heap*/ - int def_heap_n_zdescriptors; /**< Number of zero len descriptors in defaule heap*/ - int def_heap_buf_size; /**< Size of buffers in default heap, max amount of area for packet data */ - int def_heap_tailroom_size; /**< Size of tailroom in reserve */ - int def_heap_extra_size; /**< Size of extra space at end of buffer */ -} NETAPI_CFG_T; - -/* @note: - each buffer will be allocated: def_heap_buf_size+def_heap_extra_size bytes - each descriptor attached to these buffers will have rigBufferLen of: - def_heap_buf_size. - for default RX flow, for rx packet, the bufptr will be def_flow_pkt_rx_offset. - for detault RX flow, threshold (ie max # of bytes in buffer) will be: - def_heap_buf_size - def_heap_tailroom_size-def_flow_pkt_rx_offset - - - RX Packet from NetCP - -Headroom [Application] Packet [HW] Tailroom [Application] Extra Space [Application] -<-----------------------><--------------------------><------------------------><-----------------------> - -Cppi_HostDesc->origBufferLen -<-----------------------------------------------------------------------------> -Cppi_HostDesc->origBuffPtr -| -\/ -|------------def_heap_buf_size-------------------------------------------------|--def_heap_extra_size--| -| def_flow_pkt_rx_offset| max Cppi_HostDesc->buffLen | def_heap_tailroom_size | Extra Size | - ^ - | - Cppi_HostDesc->buffPtr - - -*/ - - - #include "netapi_err.h" #include "netapi_tune.h" #include "ti/runtime/pktlib/pktlib_osal.h"