1 /******************************************************************************
2 * FILE PURPOSE: Top level interface file for NWAL Module
3 ******************************************************************************
4 * FILE NAME: pktio.h
5 *
6 * DESCRIPTION: netapi PKTIO module header file
7 *
8 * REVISION HISTORY:
9 *
10 * Copyright (c) Texas Instruments Incorporated 2010-2011
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 *
16 * Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 *
19 * Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the
22 * distribution.
23 *
24 * Neither the name of Texas Instruments Incorporated nor the names of
25 * its contributors may be used to endorse or promote products derived
26 * from this software without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *
40 */
41 /* ============================================================= */
43 /**
44 * @file pktio.h
45 * @brief pktio module main header file for user space transport library
46 * @detailts: pktio provides an abstraction to H/W queues that are used to transmit and receive packets, IPC messages, etc. Pktio channels can be created by user but there are also several canned channels available for NETCP transmit, receive, SA sideband crypto transmit and receive
47 */
51 #ifndef __PKTIO__H
52 #define __PKTIO__H
53 #include "netapi.h"
54 #include "ti/runtime/pktlib/pktlib.h"
55 #include "ti/drv/nwal/nwal.h"
56 #include "ti/drv/nwal/nwal_util.h"
57 #include "netapi_err.h"
59 /*--------------------defines-----------------------*/
61 /**
62 * @def PKTIO_NOMEM
63 * This define is used to indicate out of memory to user space application
64 */
65 #define PKTIO_NOMEM NETAPI_ERR_NOMEM
67 /**
68 * @def NETCP_TX
69 * This defines the pktio NETCP transmit channel name
70 */
71 #define NETCP_TX "NETCP_TX"
73 /**
74 * @def NETCP_RX
75 * This defines the pktio NETCP receive channel name
76 */
77 #define NETCP_RX "NETCP_RX"
79 /**
80 * @def NETCP_SB_RX
81 * This defines the pktio NETCP-SA receive SIDEBAND channel name
82 */
83 #define NETCP_SB_RX "NETCP_SB_RX"
85 /**
86 * @def NETCP_SB_TX
87 * This defines the pktio NETCP-SA transmit SIDEBAND channel name
88 */
89 #define NETCP_SB_TX "NETCP_SB_TX"
91 /**
92 * @def PKTIO_MAX_NAME
93 * This defines the maximum length of a pktio channel name
94 */
95 #define PKTIO_MAX_NAME 19
97 /**
98 * @ingroup netapi_structures
99 * @brief PKTIO meta data information .
100 *
101 * @details PKTIO meta data information TBD
102 */
103 typedef struct PKTIO_METADATA_Tag
104 {
105 int flags1; /**< Meta Data flag configuration */
106 /**
107 * @def PKTIO_META_RX
108 * This defines the pktio NETCP receive INFLOW channel
109 */
110 #define PKTIO_META_RX 0x01
112 /**
113 * @def PKTIO_META_TX
114 * This defines the pktio NETCP transmit INFLOW channel
115 */
116 #define PKTIO_META_TX 0x02
118 /**
119 * @def PKTIO_META_SB_RX
120 * This defines the pktio NETCP SIDEBAND channel channel
121 */
122 #define PKTIO_META_SB_RX 0x4 /**< SB crypto rx */
124 /**
125 * @def PKTIO_META_SB_TX
126 * This defines the pktio NETCP transmit SIDEBAND channel
127 */
128 #define PKTIO_META_SB_TX 0x8 /** <SB crypto tx */
130 /**
131 * @def PKTIO_META_APP_DEF
132 * TBD
133 */
134 #define PKTIO_META_APP_DEF 0x80000000
135 union
136 {
137 nwalRxPktInfo_t * rx_meta; /**< NWAL Packet meta data information for incoming packet */
138 nwalTxPktInfo_t * tx_meta; /**< NWAL Packet meta data information for outgoing packet */
139 nwalDmRxPayloadInfo_t * rx_sb_meta; /**<NWAL Data mode meta data payload information from NetCP */
140 nwalDmTxPayloadInfo_t * tx_sb_meta; /**< NWAL Data Mode Payload information for packet to SA */
141 } u; /**< union NWAL Packet meta data information */
142 void * sa_handle; /**<valid for PKTIO_META_TX with IPSEC inflow or PKTIO_PKTIO_META_SB_TX MUST BE nwal_HANDLE_INVALID otherwise */
143 } PKTIO_METADATA_T;
145 /* the callback function */
146 struct PKTIO_HANDLE_tag;
148 /**
149 * @ingroup netapi_structures
150 * @brief PKTIO polling control struct FUTURE
151 *
152 * @details PKTIO polling control struct FUTURE
153 */
154 typedef struct PKTIO_POLL_Tag
155 {
156 /* future */
157 } PKTIO_POLL_T;
159 /**
160 * @def PKTIO_MAX_RECV
161 * This defines the maximum number of packets to receive in one pktio poll, @ref TUNE_NETAPI_MAX_BURST_RCV
162 */
163 #define PKTIO_MAX_RECV (TUNE_NETAPI_MAX_BURST_RCV)
167 /**
168 * @ingroup netapi_cb_functions
169 * @brief PKTIO_CB Callback function to be issued on packet receive
170 *
171 * @details The application provides a callback function that gets invoked on packet receive
172 * @param[in] channel The PKTIO channel handle, @ref PKTIO_HANDLE_T
173 * @param[in] p_recv Pointer to the packets received.
174 * @param[in] p_meta Pointer to meta data associated with packet, @ref PKTIO_METADATA_T
175 * @param[in] n_pkts Number of packets received.
176 * @param[in] ts Timestamp associted with received packets.
177 * @retval none
178 * @pre @ref pktio_open
179 */
180 typedef void (*PKTIO_CB)(struct PKTIO_HANDLE_tag * channel,
181 Ti_Pkt* p_recv[],
182 PKTIO_METADATA_T p_meta[],
183 int n_pkts,
184 uint64_t ts);
186 /**
187 * @ingroup netapi_pktio_functions
188 * @brief PKTIO_SEND PKTIO specific send function
189 *
190 * @details The application calls this PKTIO specific send function to transmit packet
191 * @param[in] channel The PKTIO channel handle, @ref PKTIO_HANDLE_T
192 * @param[in] p_send Pointer to the packet to send
193 * @param[in] p_meta Pointer to meta data associated with packet, @ref PKTIO_METADATA_T
194 * @param[out] p_err Pointer to error code.
195 * @retval none
196 * @pre @ref pktio_open
197 */
198 typedef int (*PKTIO_SEND)(struct PKTIO_HANDLE_tag * channel,
199 Ti_Pkt* p_send,
200 PKTIO_METADATA_T *p_meta,
201 int * p_err);
204 /**
205 * @ingroup netapi_pktio_functions
206 * @brief PKTIO_POLL PKTIO specific poll function
207 *
208 * @details The application calls this PKTIO specific POLL function
209 * @param[in] channel The PKTIO channel handle, @ref PKTIO_HANDLE_T
210 * @param[in] p_poll_cfg Pointer to pktio poll configuration. @ref PKTIO_POLL_T
211 * @param[out] p_err Pointer to error code.
212 * @retval none
213 * @pre @ref pktio_open
214 */
215 typedef int (*PKTIO_POLL)(struct PKTIO_HANDLE_tag * channel,
216 PKTIO_POLL_T * p_poll_cfg,
217 int * p_err);
219 /**
220 * @brief This defines TBD
221 */
222 #define PKTIO_NA 0
224 /**
225 * @ingroup netapi_structures
226 * @brief PKTIO configuration information
227 *
228 * @details PKTIO :q information
229 */
230 typedef struct PKTIO_CFG_Tag
231 {
232 /**
233 * @def PKTIO_R
234 * This defines the pktio channel as type read TBD
235 */
236 #define PKTIO_R 0x1
238 /**
239 * @def PKTIO_W
240 * This defines the pktio channel as type write TBD
241 */
242 #define PKTIO_W 0x2
244 /**
245 * @def PKTIO_RW
246 * This defines the pktio channel as type read/write TBD
247 */
248 #define PKTIO_RW (PKTIO_R | PKTIO_W)
250 int flags1; /**< Flags for PKTIO channel configuration */
252 /**
253 * @def PKTIO_LOCAL
254 * This defines the pktio channel as type local TBD
255 */
256 #define PKTIO_LOCAL 0x2
258 /**
259 * @def PKTIO_GLOBAL
260 * This defines the pktio channel as type global TBD
261 */
262 #define PKTIO_GLOBAL 0x1
264 /**
265 * @def PKTIO_PKT
266 * This defines the pktio channel is for NETCP
267 */
268 #define PKTIO_PKT 0x4
270 /**
271 * @def PKTIO_SB
272 * This defines the pktio channel is for sideband crypto
273 */
274 #define PKTIO_SB 0x8
276 int flags2; /**< Flags for PKTIO channel configuration */
278 /**
279 * @def PKTIO_Q_ANY
280 * This defines TBD
281 */
282 #define PKTIO_Q_ANY -1
284 int qnum; /**< PKTIO channel queue number */
287 int max_n; /**< Maximum number of packets read in 1 poll */
288 } PKTIO_CFG_T;
290 struct NETAPI_tag;
292 /* a pktio channel .. */
296 /**
297 * @ingroup netapi_structures
298 * @brief PKTIO handle structure definition.
299 *
300 * @details PKTIO handle strucutre which is returned from call to @ref pktio_create
301 */
302 typedef struct PKTIO_HANDLE_Tag
303 {
304 /**
305 * @def PKTIO_INUSE
306 * This defines is used to TBD
307 */
308 #define PKTIO_INUSE 0xfeedfeed
310 int inuse; /**<true is pktio channel is in use TBD */
311 int use_nwal; /**<true if this is managed by nwal */
312 #define PKTIO_4_IPC 0 /**<For IPC */
313 #define PKTIO_4_ADJ_NWAL 1 /**<(RX)app queues managed by NWAL */
314 #define PKTIO_DEF_NWAL 2 /**<default NWAL RX/TX queues */
315 #define PKTIO_4_ADJ_SB 3 /**<(RX) crypto side band app defined */
316 #define PKTIO_DEF_SB 4 /**<crypto side band default */
317 struct NETAPI_tag * back; /**< back handle */
318 void * nwalInstanceHandle; /**<save here for conveninece */
319 PKTIO_CB cb; /**< callback for channel */
320 PKTIO_CFG_T cfg; /**<configuration */
321 Qmss_QueueHnd q; /**<the associated queue handle */
322 Qmss_Queue qInfo; /**<and its qm#/q# */
323 int max_n; /**<max # of pkts to read in one poll */
324 void * cookie; /**<app specific */
325 PKTIO_SEND _send; /**<pktio type specific send function */
326 PKTIO_POLL _poll; /**<pktio type specific POLL function */
327 char name[PKTIO_MAX_NAME+1]; /**< Name of pktio channel */
328 } PKTIO_HANDLE_T;
331 /**
332 * @ingroup netapi_structures
333 * @brief PKTIO control TBD
334 *
335 * @details PKTIO control RBD
336 */
337 typedef struct PKTIO_CONTROL_Tag
338 {
339 /**
340 * @def PKTIO_CLEAR
341 * This defines is used to clear out the PKTIO channel
342 */
343 #define PKTIO_CLEAR 0x1
345 /**
346 * @def PKTIO_DIVERT
347 * This defines is used to divert to dest channel TBD
348 */
349 #define PKTIO_DIVERT 0x2
351 int op; /**< TBD */
352 PKTIO_HANDLE_T *dest; /**< Handle to PKTIO channel */
353 } PKTIO_CONTROL_T;
357 /**
358 * @ingroup netapi_pktio_functions
359 * @brief API creates a NETAPI PKTIO channel
360 *
361 * @details This assigns global resources to a NETAPI pktio channel.
362 * Once created, the channel can be used to send and/or receive
363 * a Ti_Pkt. This can be used for communication with the
364 * the Network co-processor (NETCP) or for internal inter-processor
365 * communication. The channel is saved under the assigned name
366 * and can be opened by other netapi threads instances.
367 * @param[in] netapi_handle The NETAPI handle, @ref NETAPI_T
368 * @param[in] name A pointer to the char string name for channel
369 * @param[in] cb Callback to be issued on packet receive, @ref PKTIO_CB
370 * @param[in] p_cfg Pointer to channel configuration, @ref PKTIO_CFG_T
371 * @param[out] err Pointer to error code.
372 * @retval Handle to the pktio instance or NULL on error, @ref PKTIO_HANDLE_T
373 * @pre @ref netapi_init
374 */
375 PKTIO_HANDLE_T * pktio_create(NETAPI_T netapi_handle,
376 char * name,
377 PKTIO_CB cb,
378 PKTIO_CFG_T* p_cfg,
379 int * err);
381 /**
382 * @ingroup netapi_pktio_functions
383 * @brief API opens an existing NETAPI PKTIO channel
384 *
385 * @details This opens an NETAPI pktio channel for use. The channel
386 * must have already been created via @ref pktio_create or may have
387 * been created internally during the netapi intialization.
388 * Once opened, the channel can be used to send and/or receive
389 * a Ti_Pkt. This can be used for communication with the
390 * the Network co-processor (NETCP) or for internal inter-processor
391 * communication.
392 *
393 * @param[in] netapi_handle The NETAPI handle, @ref NETAPI_T
394 * @param[in] name A pointer to the char string name for channel to open
395 * @param[in] cb Callback to be issued on packet receive, @ref PKTIO_CB
396 * @param[in] p_cfg Pointer to channel configuration, @ref PKTIO_CFG_T
397 * @param[out] err Pointer to error code.
398 * @retval Handle to the pktio instance or NULL on error, @ref PKTIO_HANDLE_T
399 * @pre @ref netapi_init, @ref pktio_create
400 */
401 PKTIO_HANDLE_T * pktio_open(NETAPI_T netapi_handle,
402 char *name,
403 PKTIO_CB cb,
404 PKTIO_CFG_T *p_cfg,
405 int * err);
407 /**
408 * @ingroup netapi_pktio_functions
409 * @brief API controls an existing NETAPI PKTIO channel
410 *
411 * @details This controls an opened pktio channel
412 *
413 * @param[in] handle The PKTIO channel handle, @ref PKTIO_HANDLE_T
414 * @param[in] cb Callback to be issued on packet receive, @ref PKTIO_CB
415 * @param[in] p_cfg Pointer to channel configuration which (optional), @ref PKTIO_CFG_T
416 * @param[in] p_control Pointer to PKTIO control information (optional), @ref PKTIO_CONTROL_T
417 * @param[out] err Pointer to error code.
418 * @retval none
419 * @pre @ref netapi_init, @ref pktio_create, @ref pktio_open
420 */
421 void pktio_control(PKTIO_HANDLE_T * handle,
422 PKTIO_CB cb,
423 PKTIO_CFG_T * p_cfg,
424 PKTIO_CONTROL_T *p_control,
425 int *err);
427 /**
428 * @ingroup netapi_pktio_functions
429 * @brief API closes a PKTIO channel
430 *
431 * @details This closes a PKTIO channel
432 *
433 * @param[in] handle The PKTIO channel handle, @ref PKTIO_HANDLE_T
434 * @param[out] err Pointer to error code.
435 * @retval none
436 * @pre @ref netapi_init, @ref pktio_create, @ref pktio_open
437 */
438 void pktio_close(PKTIO_HANDLE_T * handle,
439 int * err);
441 /**
442 * @ingroup netapi_pktio_functions
443 * @brief API deletes a PKTIO channel
444 *
445 * @details This deletes a PKTIO channel
446 *
447 * @param[in] handle The PKTIO handle, @ref PKTIO_HANDLE_T
448 * @param[out] err Pointer to error code.
449 * @retval none
450 * @pre @ref netapi_init, @ref pktio_create, @ref pktio_open
451 */
452 void pktio_delete(PKTIO_HANDLE_T * handle,
453 int * err);
455 /**
456 * @ingroup netapi_pktio_functions
457 * @brief API sends data to a NETAPI PKTIO channel
458 *
459 * @details This sends a Ti_Pkt and associated meta data,
460 * @ref PKTIO_METADATA_T to a channel. The channel
461 * must have already been created via @ref pktio_create or opened
462 * via @ref pktio_open. It may have
463 * been created internally during the netapi intialization.
464 * @param[in] handle The PKTIO channel handle, @ref PKTIO_HANDLE_T
465 * @param[in] pkt Pointer to the packet to send
466 * @param[in] m Pointer to meta data associated with packet, @ref PKTIO_METADATA_T
467 * @param[out] err Pointer to error code.
468 * @retval 1 if packet sent, 0 if error
469 * @pre @ref netapi_init, @ref pktio_create, @ref pktio_open
470 */
471 static inline int pktio_send(PKTIO_HANDLE_T * handle,
472 Ti_Pkt *pkt,
473 PKTIO_METADATA_T *m,
474 int * err)
475 {
476 return handle->_send((struct PKTIO_HANDLE_tag *)handle, pkt, m, err);
477 }
479 /**
480 * @ingroup netapi_pktio_functions
481 * @brief API sends data to a NETAPI PKTIO channel
482 *
483 * @details This sends an array of Ti_Pkt and associated meta data,
484 * @ref PKTIO_METADATA_T to a channel. The channel
485 * must have already been created via @ref pktio_create or opened
486 * via @ref pktio_open. It may have
487 * been created internally during the netapi intialization.
488 * @param[in] handle The PKTIO channel handle, @ref PKTIO_HANDLE_T
489 * @param[in] pkt Pointer to the packet to send
490 * @param[in] m Pointer to meta data associated with packet, @ref PKTIO_METADATA_T
491 * @param[in] np The number of packets in list to send
492 * @param[out] err Pointer to error code.
493 * @retval Number of packets sent, 0 if error
494 * @pre @ref netapi_init, @ref pktio_create, @ref pktio_open
495 */
496 int pktio_sendMulti(PKTIO_HANDLE_T *handle,
497 Ti_Pkt * pkt[],
498 PKTIO_METADATA_T * m[],
499 int np,
500 int * err);
502 /**
503 * @ingroup netapi_pktio_functions
504 * @brief API polls a NETAPI PKTIO channel for received packets
505 *
506 * @details This api polls a pktio channel. Any pending data in the channel is
507 * passed to the @ref PKTIO_CB registered when the channel was
508 * created or opened. The channel must
509 * have already been created via @ref pktio_create or opened
510 * via @ref pktio_open. It may have
511 * been created internally during the netapi intialization.
512 * @param[in] handle The PKTIO channel handle, @ref PKTIO_HANDLE_T
513 * @param[in] p_poll_cfg Pointer to pktio poll configuration. @ref PKTIO_POLL_T
514 * @param[out] err Pointer to error code.
515 * @retval Number of packets received by poll
516 * @pre @ref netapi_init, @ref pktio_create, @ref pktio_open
517 */
518 static inline int pktio_poll(PKTIO_HANDLE_T * handle,
519 PKTIO_POLL_T * p_poll_cfg,
520 int * err)
521 {
522 return handle->_poll((struct PKTIO_HANDLE_tag *) handle, p_poll_cfg, err);
523 }
525 /**
526 * @ingroup netapi_pktio_functions
527 * @brief API polls all NETAPI PKTIO channels associarted with @ref NETAPI_T instance
528 * for received packets
529 *
530 * @details This api polls all pktio channels attached to an instance.
531 * Any pending data in these channels are
532 * passed to the @ref PKTIO_CB registered when the channel was
533 * created or opened. The channels must
534 * have already been created via @ref pktio_create or opened
535 * via @ref pktio_open. They may have
536 * been created internally during the netapi intialization.
537 * @param[in] handle The PKTIO channel handle, @ref PKTIO_HANDLE_T
538 * @param[in] p_poll_cfg Pointer to pktio poll configuration. @ref PKTIO_POLL_T
539 * @param[out] err Pointer to error code.
540 * @retval Number of packets received by poll
541 * @pre @ref netapi_init, @ref pktio_create, @ref pktio_open
542 */
543 int pktio_pollAll(NETAPI_T handle,
544 PKTIO_POLL_T * p_poll_cfg,
545 int *err);
548 /* update max_n for poll */
551 /**
552 * @brief This define sets the max number of pkts to read in one poll in the @ref PKTIO_HANDLE_T
553 */
554 #define pktio_set_max_n(handle,max_n) (handle)->max_n=max_n;
556 /**
557 * @brief This define returns NETAPI handle stored in the @ref PKTIO_HANDLE_T
558 */
559 #define pktio_get_netapi_handle(handle) (handle)->back
561 /**
562 * @brief This define sets a user space application cookie in the @ref PKTIO_HANDLE_T
563 */
564 #define pktio_set_cookie(handle, cookie) (handle)->cookie = cookie
566 /**
567 * @brief This define returns a previously set user space application cookie stored in the @ref PKTIO_HANDLE_T
568 */
569 #define pktio_get_cookie(handle) (handle)->cookie
572 /**
573 * @brief This define returns a associate queue handle stored in the @ref PKTIO_HANDLE_T
574 */
576 #define pktio_get_q(handle) (handle)->q
578 /*-----------------Extra Fast Path pkt meta data macros--------------------*/
579 #include "cppi_desc.h"
580 #include "ti/drv/pa/pa.h"
581 #include "ti/drv/pa/pasahost.h"
584 /**
585 * @ingroup netapi_pktio_functions
586 * @brief API returns default packet queue to poll for netcp RX
587 * @note: these are expensive calls, so call once and save
588 */
589 static inline Qmss_QueueHnd PKTIO_GET_DEFAULT_NETCP_Q(PKTIO_HANDLE_T *h)
590 {
591 nwalGlobCxtInfo_t Info;
592 nwal_getGlobCxtInfo(h->nwalInstanceHandle,&Info);
593 return Info.rxDefPktQ;
594 }
597 /**
598 * @ingroup netapi_pktio_functions
599 * @brief API returns L4Queue to poll for netcp RX (L4 classifier queue).
600 * @note: these are expensive calls, so call once and save
601 */
602 static inline Qmss_QueueHnd PKTIO_GET_DEFAULT_NETCP_L4Q(PKTIO_HANDLE_T *h)
603 {
604 nwalLocCxtInfo_t Info;
605 nwal_getLocCxtInfo(h->nwalInstanceHandle,&Info);
606 return Info.rxL4PktQ;
607 }
610 /**
611 * @ingroup netapi_pktio_functions
612 * @brief API to perform descriptor push to QMSS Queue
613 */
614 static inline void PKTIO_QMSS_QUEUE_PUSH_DESC_SIZE_RAW(Qmss_QueueHnd hnd,
615 void *descAddr,
616 uint32_t descSize)
617 {
618 return(Qmss_queuePushDescSizeRaw(hnd,descAddr,descSize));
619 }
621 /**
622 * @ingroup netapi_pktio_functions
623 * @brief API to perform descriptor pop from QMSS Queue
624 */
625 static inline void* PKTIO_QMSS_QUEUE_POP_RAW(Qmss_QueueHnd hnd)
626 {
627 return(Qmss_queuePopRaw(hnd));
628 }
630 /**
631 * @ingroup netapi_pktio_functions
632 * @brief API to retrieve NWAL global instance handle.
633 */
634 static inline nwal_Inst PKTIO_GET_NWAL_INSTANCE(PKTIO_HANDLE_T *h)
635 {
636 return h->nwalInstanceHandle;
637 }
640 #endif