Files @ d0a14f973771
Branch filter:

Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public/vmkernel64/release/net/vmkapi_net_netqueue.h

unknown
ESXi-5.0-U1
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
/* **********************************************************
 * Copyright 2006 - 2009 VMware, Inc.  All rights reserved.
 * **********************************************************/

/*
 * @VMKAPIMOD_LICENSE@
 */

/*
 ***********************************************************************
 * Netqueue                                                       */ /**
 * \addtogroup Network
 *@{
 * \defgroup Netqueue Netqueue
 *@{ 
 *
 ***********************************************************************
 */

#ifndef _VMKAPI_NET_NETQUEUE_H_
#define _VMKAPI_NET_NETQUEUE_H_

/** \cond never */
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
#error This vmkapi file should never be included directly but only via vmkapi.h
#endif
/** \endcond never */

#include "net/vmkapi_net_types.h"
#include "net/vmkapi_net_poll.h"
#include "net/vmkapi_net_pkt.h"

/** Major version of netqueue api */
#define VMK_NETQUEUE_OPS_MAJOR_VER (2)

/** Minor version of netqueue api */
#define VMK_NETQUEUE_OPS_MINOR_VER (0)

/** 
 * \brief Netqueue queue ID
 */
typedef vmk_uint64 vmk_NetqueueQueueID;

/** Well known Netqueue queue ID values */
enum {
   /** Default queue ID */
   VMK_NETQUEUE_DEFAULT_QUEUEID =  (vmk_NetqueueQueueID)0,

   /** Invalid queue ID */
   VMK_NETQUEUE_INVALID_QUEUEID = (vmk_NetqueueQueueID)~0,
};

/** 
 * \brief Netqueue filter ID
 */
typedef vmk_uint32 vmk_NetqueueFilterID;

/** Well known Netqueue filter ID values */
enum {
   /** Invalid filter ID */
   VMK_NETQUEUE_INVALID_FILTERID = (vmk_NetqueueFilterID)~0,
};

/** Netqueue priority */
typedef vmk_VlanPriority vmk_NetqueuePriority;

/** Netqueue features supported */
typedef enum {
   
   /** No features supported */
   VMK_NETQUEUE_FEATURE_NONE     = 0x0,

   /** Rx queues features supported */
   VMK_NETQUEUE_FEATURE_RXQUEUES = 0x1,

   /** Tx queues features supported */
   VMK_NETQUEUE_FEATURE_TXQUEUES = 0x2,
} vmk_NetqueueFeatures;

/**
 * \ingroup Netqueue
 * \brief Netqueue operations
 */
typedef enum {

   /** 
    * \brief None 
    */
   VMK_NETQUEUE_OP_NONE                     = 0x0,

   /**
    * \brief Get version
    * Get the device's netqueue version.
    */
   VMK_NETQUEUE_OP_GET_VERSION              = 0x1,

   /** 
    * \brief Get features
    * Get the device's netqueue features.
    */
   VMK_NETQUEUE_OP_GET_FEATURES             = 0x2,

   /**
    * \brief Get queue count
    * Get the number of Rx/Tx queues supported on a device.
    */
   VMK_NETQUEUE_OP_QUEUE_COUNT              = 0x3,

   /**
    * \brief Get filter count
    * Get the number of filters supported per queue.
    */
   VMK_NETQUEUE_OP_FILTER_COUNT             = 0x4,

   /**
    * \brief Allocate a queue 
    * Allocate a queue of a specific type.
    */
   VMK_NETQUEUE_OP_ALLOC_QUEUE              = 0x5,

   /**
    * \brief Release a queue 
    * Release an allocated queue.
    */
   VMK_NETQUEUE_OP_FREE_QUEUE               = 0x6,

   /**
    * \brief Get queue vector 
    * Get the queue vector associated to a queue.
    */     
   VMK_NETQUEUE_OP_GET_QUEUE_VECTOR         = 0x7,

   /**
    * \brief Get default queue
    * Get the Rx/Tx default queue.
    */
   VMK_NETQUEUE_OP_GET_DEFAULT_QUEUE        = 0x8,

   /**
    * \brief Apply rx filter 
    * Apply a filter to a Rx queue.
    */
   VMK_NETQUEUE_OP_APPLY_RX_FILTER          = 0x9,

   /**
    * \brief Remove rx filter 
    * Remove a filter from a Rx queue.
    */
   VMK_NETQUEUE_OP_REMOVE_RX_FILTER         = 0xa,

   /** 
    * \brief Get queue stats 
    * Get stats on a particular queue.
    */
   VMK_NETQUEUE_OP_GET_QUEUE_STATS          = 0xb,

   /** 
    * \brief Set Tx priority 
    * Set a priority on a particular Tx queue.
    */
   VMK_NETQUEUE_OP_SET_TX_PRIORITY          = 0xc,

   /** 
    * \brief Get/Set queue state 
    * Get and Set the state of netqueue on a particular device.
    * Changing the mtu on a device puts netqueue in an invalid state
    * in which the Rx filters are removed. Such state needs to
    * be notified in order to restore the configuration before invalidation.
    */
   VMK_NETQUEUE_OP_GETSET_QUEUE_STATE       = 0xd,

   /** 
    * \brief Set queue vector 
    * Set the queue vector associated to a queue.
    */
   VMK_NETQUEUE_OP_SET_QUEUE_VECTOR         = 0xe,

   /**
    * \brief Allocate a queue with attributes
    * Allocate a queue of a specific type with attributes.
    */
   VMK_NETQUEUE_OP_ALLOC_QUEUE_WITH_ATTR    = 0xf,

   /** 
    * \brief Enable queue's feature
    * Enable a feature on a given queue.
    */
   VMK_NETQUEUE_OP_ENABLE_QUEUE_FEAT        = 0x10,

   /** 
    * \brief Disable queue's feature
    * Disable a feature on a given queue.
    */
   VMK_NETQUEUE_OP_DISABLE_QUEUE_FEAT       = 0x11,

   /** 
    * \brief Get queue's features
    * Get the supported queues' features of a device.
    */
   VMK_NETQUEUE_OP_GET_QUEUE_SUPPORTED_FEAT = 0x12,

   /** 
    * \brief Get queue filter required class
    * Get the supported queue's filter class
    */
   VMK_NETQUEUE_OP_GET_QUEUE_SUPPORTED_FILTER_CLASS = 0x13,
} vmk_NetqueueOp;

/**
 * \ingroup Netqueue
 * \brief Filter class
 */
typedef enum vmk_NetqueueFilterClass {

   /** Invalid filter */
   VMK_NETQUEUE_FILTER_NONE            = 0x0,

   /** Mac address filter */
   VMK_NETQUEUE_FILTER_MACADDR         = 0x1,

   /** Vlan tag filter */
   VMK_NETQUEUE_FILTER_VLAN            = 0x2,

   /** Vlan tag + mac addr filter */
   VMK_NETQUEUE_FILTER_VLANMACADDR     = 0x4,
} vmk_NetqueueFilterClass;

/**
 * \ingroup Netqueue
 * \brief Queue type
 */
typedef enum {

   /** Invalid queue type */
   VMK_NETQUEUE_QUEUE_TYPE_INVALID   = 0,

   /** Rx queue type */
   VMK_NETQUEUE_QUEUE_TYPE_RX        = 1,

   /** Tx queue type */
   VMK_NETQUEUE_QUEUE_TYPE_TX        = 2,

   /** Default Rx queue type */
   VMK_NETQUEUE_QUEUE_TYPE_DEFAULTRXQUEUE = 3,

   /** Default Tx queue type */
   VMK_NETQUEUE_QUEUE_TYPE_DEFAULTTXQUEUE = 4,
} vmk_NetqueueQueueType;

/**
 * \ingroup Netqueue
 * \brief Filter type
 */
typedef enum vmk_NetqueueFilterType {

   /** Invalid filter type */
   VMK_NETQUEUE_FILTER_TYPE_INVALID = 0,

   /** Rx/Tx filter type */
   VMK_NETQUEUE_FILTER_TYPE_TXRX    = 1,
} vmk_NetqueueFilterType;

/**
 * \ingroup Netqueue
 * \brief Filter definition
 */
typedef struct vmk_NetqueueFilter {

   /** Filter class */
   vmk_NetqueueFilterClass class;
   union {

      /** Filter class mac only */
      vmk_uint8 macaddr[6];

      /** Filter class vlan tag only */
      vmk_uint16 vlan_id;

      /** Filter class vlan tag + mac */
      struct {
         vmk_uint8 macaddr[6];
         vmk_uint16 vlan_id;
      } vlanmac;
   } u;
} vmk_NetqueueFilter;

/**
 * \ingroup Netqueue
 * \brief Filter properties
 */
typedef enum vmk_NetqueueFilterProperties {

   /** None */
   VMK_NETQUEUE_FILTER_PROP_NONE = 0x0,

   /** Management filter */
   VMK_NETQUEUE_FILTER_PROP_MGMT = 0x1,
} vmk_NetqueueFilterProperties;

/**
 * \ingroup Netqueue
 * \brief Features supported on queues
 */
typedef enum vmk_NetqueueQueueFeatures {

   /** None */
   VMK_NETQUEUE_QUEUE_FEAT_NONE    = 0x0,

   /** LRO feature */
   VMK_NETQUEUE_QUEUE_FEAT_LRO     = 0x1,

   /** Paired queue feature */
   VMK_NETQUEUE_QUEUE_FEAT_PAIR    = 0x2,
} vmk_NetqueueQueueFeatures;

/**
 * \ingroup Netqueue
 * \brief Netqueue queue attribute
 */
typedef struct vmk_NetqueueQueueAttr {
   enum {

      /** Priority attribute */
      VMK_NETQUEUE_QUEUE_ATTR_PRIOR,

      /** Features attribute */
      VMK_NETQUEUE_QUEUE_ATTR_FEAT,

      /** Number of attributes */
      VMK_NETQUEUE_QUEUE_ATTR_NUM,
   } type;
   
   union {

      /** VMK_NETQUEUE_QUEUE_ATTR_PRIOR argument */
      vmk_VlanPriority priority;

      /** VMK_NETQUEUE_QUEUE_ATTR_FEAT argument */
      vmk_NetqueueQueueFeatures features;

      /** Generic attribute argument */
      void *p;
   } args;
} vmk_NetqueueQueueAttr;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_GET_VERSION
 */
typedef struct vmk_NetqueueOpGetVersionArgs {

   /** Minor version [out] */
   vmk_uint16 minor;

   /** Major version [out] */
   vmk_uint16 major;
} vmk_NetqueueOpGetVersionArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_GET_FEATURES
 */
typedef struct vmk_NetqueueOpGetFeaturesArgs {

   /** Supported features [out] */
   vmk_NetqueueFeatures features;
} vmk_NetqueueOpGetFeaturesArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_QUEUE_COUNT
 */
typedef struct vmk_NetqueueOpGetQueueCountArgs {

   /** Queue type aimed [in] */
   vmk_NetqueueQueueType qtype; 

   /** Number of queue of this type [out] */
   vmk_uint16 count;
} vmk_NetqueueOpGetQueueCountArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_FILTER_COUNT
 */
typedef struct vmk_NetqueueOpGetFilterCountArgs {

   /** Queue type aimed [in] */
   vmk_NetqueueQueueType qtype;

   /** Number of filters per queue of this type [out] */
   vmk_uint16 count;
} vmk_NetqueueOpGetFilterCountArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_ALLOC_QUEUE
 */
typedef struct vmk_NetqueueOpAllocQueueArgs {

   /** Queue type aimed [in] */
   vmk_NetqueueQueueType qtype;
   
   /** Queue ID of the allocated queue [out] */
   vmk_NetqueueQueueID qid;

   /** Net poll on top of the allocated queue if any [out] */
   vmk_NetPoll net_poll;
} vmk_NetqueueOpAllocQueueArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_FREE_QUEUE
 */
typedef struct vmk_NetqueueOpFreeQueueArgs {

   /** Queue to release [in] */
   vmk_NetqueueQueueID qid;
} vmk_NetqueueOpFreeQueueArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_GET_QUEUE_VECTOR
 */
typedef struct vmk_NetqueueOpGetQueueVectorArgs {

   /** Queue aimed [in] */
   vmk_NetqueueQueueID qid;

   /** Interrupt vector associated to the queue [out] */
   vmk_uint16 vector;
} vmk_NetqueueOpGetQueueVectorArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_GET_DEFAULT_QUEUE
 */
typedef struct vmk_NetqueueOpGetDefaultQueueArgs {

   /** Default queue type VMK_NETQUEUE_QUEUE_TYPE_[RX|TX] [in] */
   vmk_NetqueueQueueType qtype;

   /** Queue ID of the default queue [out] */
   vmk_NetqueueQueueID qid;

   /** Net poll on top of the default queue if any [out] */
   vmk_NetPoll net_poll;
} vmk_NetqueueOpGetDefaultQueueArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_APPLY_RX_FILTER
 */
typedef struct vmk_NetqueueOpApplyRxFilterArgs {

   /** Queue aimed [in] */
   vmk_NetqueueQueueID qid;

   /** Filter to be applied [in] */
   vmk_NetqueueFilter filter;

   /** Filter ID [out] */
   vmk_NetqueueFilterID fid;

   /** Potential Paired tx queue hardware index [out] */
   vmk_uint16 pairhwqid;
} vmk_NetqueueOpApplyRxFilterArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_REMOVE_RX_FILTER
 */
typedef struct vmk_NetqueueOpRemoveRxFilterArgs {

   /** Queue aimed [in] */
   vmk_NetqueueQueueID qid;

   /** Filter to be removed [in] */
   vmk_NetqueueFilterID fid;
} vmk_NetqueueOpRemoveRxFilterArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_GET_QUEUE_STATS
 */
typedef struct vmk_NetqueueOpGetQueueStatsArgs {

   /** Queue aimed [in] */
   vmk_NetqueueQueueID qid;
} vmk_NetqueueOpGetQueueStatsArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_SET_TX_PRIORITY
 */
typedef struct vmk_NetqueueOpSetTxPriorityArgs {

   /** Queue aimed [in] */
   vmk_NetqueueQueueID qid;

   /** Priority to set on the queue [in] */
   vmk_VlanPriority priority;
} vmk_NetqueueOpSetTxPriorityArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_GETSET_QUEUE_STATE
 */
typedef struct vmk_NetqueueOpGetSetQueueStateArgs {

   /** Netqueue old state (TRUE: Netqueue was in valid state, FALSE: otherwise) [out] */
   vmk_Bool oldState;

   /** Netqueue new state (TRUE: Netqueue set to valid state, FALSE: otherwise) [in] */
   vmk_Bool newState;    
} vmk_NetqueueOpGetSetQueueStateArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_SET_QUEUE_VECTOR
 */
typedef struct vmk_NetqueueOpSetQueueVectorArgs {

   /** Queue aimed [in] */
   vmk_NetqueueQueueID qid;

   /** Vector to be set [in] */
   vmk_uint16 vector;
} vmk_NetqueueOpSetQueueVectorArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_ALLOC_QUEUE_WITH_ATTR
 */
typedef struct vmk_NetqueueOpAllocQueueWithAttrArgs {

   /** Queue type aimed [in] */
   vmk_NetqueueQueueType qtype;

   /** Number of attributes (Cannot be greater than VMK_NETQUEUE_QUEUE_ATTR_NUM) [in] */
   vmk_uint16 nattr;
   
   /** Queue attributes [in] */
   vmk_NetqueueQueueAttr *attr;

   /** Queue ID of the allocated queue [out] */
   vmk_NetqueueQueueID qid;

   /** Net poll on top of the allocated queue if any [out] */
   vmk_NetPoll net_poll;
} vmk_NetqueueOpAllocQueueWithAttrArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_ENABLE_QUEUE_FEAT
 */
typedef struct vmk_NetqueueOpEnableQueueFeatArgs {

   /** Queue aimed [in] */
   vmk_NetqueueQueueID qid;

   /** Features to be enabled [in] */
   vmk_NetqueueQueueFeatures features;
} vmk_NetqueueOpEnableQueueFeatArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_DISABLE_QUEUE_FEAT
 */
typedef struct vmk_NetqueueOpDisableQueueFeatArgs {

   /** Queue aimed [in] */
   vmk_NetqueueQueueID qid;

   /** Features to be disabled [in] */
   vmk_NetqueueQueueFeatures features;
} vmk_NetqueueOpDisableQueueFeatArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_GET_QUEUE_SUPPORTED_FEAT
 */
typedef struct vmk_NetqueueOpGetQueueSupFeatArgs {

   /** Queue type aimed [in] */
   vmk_NetqueueQueueType qtype;

   /** Features supported [out] */
   vmk_NetqueueQueueFeatures features;
} vmk_NetqueueOpGetQueueSupFeatArgs;

/** 
 * \ingroup Netqueue
 * \brief Arguments to VMK_NETQUEUE_OP_GET_FILTER_CLASS
 */
typedef struct vmk_NetqueueOpGetQueueSupFilterArgs {

   /** Queue type aimed [in] */
   vmk_NetqueueQueueType qtype;

   /** Filter class required [out] */
   vmk_NetqueueFilterClass class;
} vmk_NetqueueOpGetQueueSupFilterArgs;

/*
 ***********************************************************************
 * vmk_NetqueueSetQueueIDUserVal --                                  */ /**
 *
 * \ingroup Netqueue
 * \brief Set user's private value for queue ID.
 *
 * \param[in]  qid       Queue ID.
 * \param[in]  userval   User value.
 *
 * \retval     VMK_OK    Always.
 *
 ***********************************************************************
 */

VMK_ReturnStatus vmk_NetqueueSetQueueIDUserVal(vmk_NetqueueQueueID *qid,
                                               vmk_uint32 userval);

/*
 ***********************************************************************
 * vmk_NetqueueQueueIDUserVal --                                  */ /**
 *
 * \ingroup Netqueue
 * \brief Get user part of queue ID
 *
 * \param[in] qid           Queue ID.
 *
 * \retval    vmk_uint32    User value.
 *
 ***********************************************************************
 */

vmk_uint32  vmk_NetqueueQueueIDUserVal(vmk_NetqueueQueueID qid);

/*
 ***********************************************************************
 * vmk_NetqueueMkTxQueueID --                                     */ /**
 *
 * \ingroup Netqueue
 * \brief Create a Tx queue ID.
 *
 * \param[in]  val       The embedded value of the queue ID.
 * \param[out] qid       The created queue ID.
 *
 * \retval     VMK_OK    Always.
 *
 ***********************************************************************
 */

VMK_ReturnStatus vmk_NetqueueMkTxQueueID(vmk_NetqueueQueueID *qid,
                                         vmk_uint32 val);

/*
 ***********************************************************************
 * vmk_NetqueueMkRxQueueID --                                     */ /**
 *
 * \ingroup Netqueue
 * \brief Create a Rx queue ID.
 *
 * \param[in]  val       The embedded value of the queue ID.
 * \param[out] qid       The created queue ID.
 *
 * \retval     VMK_OK    Always.
 *
 ***********************************************************************
 */

VMK_ReturnStatus vmk_NetqueueMkRxQueueID(vmk_NetqueueQueueID *qid,
                                         vmk_uint32 val);

/*
 ***********************************************************************
 * vmk_NetqueueQueueIDVal --                                      */ /**
 *
 * \ingroup Netqueue
 * \brief Retrieve the embedded value of a queue ID.
 *
 * \param[in] qid       The aimed queue ID.
 *
 * \return              The embedded value.
 *
 ***********************************************************************
 */

vmk_uint32 vmk_NetqueueQueueIDVal(vmk_NetqueueQueueID qid);

/*
 ***********************************************************************
 * vmk_NetqueueQueueIDType --                                     */ /**
 *
 * \ingroup Netqueue
 * \brief Retrieve the type of a queue ID.
 *
 * \param[in] qid       The aimed queue ID.
 *
 * \return              The type.
 *
 ***********************************************************************
 */

vmk_NetqueueQueueType vmk_NetqueueQueueIDType(vmk_NetqueueQueueID qid);

/*
 ***********************************************************************
 * vmk_NetqueueMkFilterID --                                      */ /**
 *
 * \ingroup Netqueue
 * \brief Create a filter ID.
 *
 * \param[in]  val       The embedded value of the filter ID.
 * \param[out] fid       The created filter.
 *
 * \retval     VMK_OK    Always.
 *
 ***********************************************************************
 */

VMK_ReturnStatus vmk_NetqueueMkFilterID(vmk_NetqueueFilterID *fid,
                                        vmk_uint16 val);

/*
 ***********************************************************************
 * vmk_NetqueueFilterIDVal --                                     */ /**
 *
 * \ingroup Netqueue
 * \brief Retrieve the embedded value of a filter ID.
 *
 * \param[in] fid       The aimed filter ID.
 *
 * \return              The embedded value.
 *
 ***********************************************************************
 */

vmk_uint16 vmk_NetqueueFilterIDVal(vmk_NetqueueFilterID fid);

/*
 ***********************************************************************
 * vmk_PktQueueIDGet --                                           */ /**
 *
 * \ingroup Netqueue
 * \brief Retrieve netqueue queue ID of a specified packet.
 *
 * \param[in]  pkt        Packet of interest
 *
 * \return                Netqueue queue ID.
 *
 ***********************************************************************
 */
extern
vmk_NetqueueQueueID vmk_PktQueueIDGet(vmk_PktHandle *pkt);

/*
 ***********************************************************************
 * vmk_PktQueueIDSet --                                           */ /**
 *
 * \ingroup Netqueue
 * \brief Set netqueue queue ID of a specified packet.
 *
 * \param[in]  pkt        Packet of interest
 * \param[in]  qid        Packet queue ID
 *
 * \retval     VMK_OK
 *
 ***********************************************************************
 */

VMK_ReturnStatus vmk_PktQueueIDSet(vmk_PktHandle *pkt, vmk_NetqueueQueueID qid);


#endif /* _VMKAPI_NET_NETQUEUE_H_ */
/** @} */
/** @} */