vmxnet3: show vmxnet3 with filtering capability [VPP-1452]
[vpp.git] / src / plugins / vmxnet3 / vmxnet3.h
index 666dec7..491b8c1 100644 (file)
@@ -18,6 +18,7 @@
 
 #define foreach_vmxnet3_tx_func_error         \
   _(ERROR_PACKETS, "error packets") \
+  _(LINK_DOWN, "link down") \
   _(NO_FREE_SLOTS, "no free tx slots")
 
 typedef enum
@@ -42,6 +43,20 @@ enum
 #undef _
 };
 
+#define foreach_vmxnet3_show_entry \
+  _(RX_COMP, "rx comp") \
+  _(RX_DESC0, "rx desc 0") \
+  _(RX_DESC1, "rx desc 1") \
+  _(TX_COMP, "tx comp") \
+  _(TX_DESC, "tx desc")
+
+enum
+{
+#define _(a, b) VMXNET3_SHOW_##a,
+  foreach_vmxnet3_show_entry
+#undef _
+};
+
 /* BAR 0 */
 #define VMXNET3_REG_IMR     0x0000     /* Interrupt Mask Register */
 #define VMXNET3_REG_TXPROD  0x0600     /* Tx Producer Index */
@@ -395,8 +410,8 @@ typedef struct
 typedef struct
 {
   CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
-  u64 next;
   u32 gen;
+  u16 next;
 } vmxnet3_rx_comp_ring;
 
 typedef struct
@@ -422,8 +437,8 @@ typedef struct
 typedef struct
 {
   CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
-  u64 next;
   u32 gen;
+  u16 next;
 } vmxnet3_tx_comp_ring;
 
 typedef struct
@@ -472,6 +487,7 @@ typedef struct
 
   vmxnet3_dma *dma;
 
+  u32 link_speed;
 } vmxnet3_device_t;
 
 typedef struct