aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/vmxnet3/vmxnet3.h
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2018-10-12 10:21:32 -0700
committerFlorin Coras <florin.coras@gmail.com>2018-10-16 01:43:22 +0000
commit02a95ce8d53caeba07a3c027b12339f44f3093b8 (patch)
tree360d281ad6c207a496d4562590c412121223a249 /src/plugins/vmxnet3/vmxnet3.h
parentb78d6a0b3c2e575343038b15b36c8682ad002edc (diff)
vmxnet3: show vmxnet3 with filtering capability [VPP-1452]
show vmxnet3 desc may display 5000 lines of output since it has 5 tables. Each table may have 1000 entries. It would not be very useful to debug problem. We need filtering capability for the subject show command. We need to be able to display the descriptor table per interface, per interface per table, and per interface per table per slot. The latter is the most useful. tested the following valid combinations show vmxnet3 show vmxnet3 desc show vmxnet3 vmxnet3-0/13/0/0 show vmxnet3 vmxnet3-0/13/0/0 desc show vmxnet3 vmxnet3-0/13/0/0 rx-comp show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1 show vmxnet3 vmxnet3-0/13/0/0 tx-comp show vmxnet3 vmxnet3-0/13/0/0 tx-comp 1 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0 1 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1 1 show vmxnet3 vmxnet3-0/13/0/0 tx-desc show vmxnet3 vmxnet3-0/13/0/0 tx-desc 1 negative tests and command is rejected show vmxnet3 abc show vmxnet3 desc abc show vmxnet3 vmxnet3-0/13/0/0 abc show vmxnet3 vmxnet3-0/13/0/0 desc abc show vmxnet3 vmxnet3-0/13/0/0 rx-comp abc show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1 abc Change-Id: I0ff233413496e58236f8fb4a94e493494c20c5cb Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/plugins/vmxnet3/vmxnet3.h')
-rw-r--r--src/plugins/vmxnet3/vmxnet3.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/plugins/vmxnet3/vmxnet3.h b/src/plugins/vmxnet3/vmxnet3.h
index f3868a88ae3..491b8c10246 100644
--- a/src/plugins/vmxnet3/vmxnet3.h
+++ b/src/plugins/vmxnet3/vmxnet3.h
@@ -43,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 */
@@ -396,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
@@ -423,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