summaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/format.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-12-27 16:18:55 +0100
committerFlorin Coras <florin.coras@gmail.com>2018-12-29 00:11:29 +0000
commit1e75c6cffe08886509e52ff496b96b8d32d76d88 (patch)
tree88585bfad55498cfbcb45d8e106338f67331e767 /src/plugins/avf/format.c
parent9703ce4628db9ae0f0337369cb1cde2506dd6e62 (diff)
avf: chained buffers rx support
Change-Id: I76ba11441f0ab3d150cdd080919cda91eac60b01 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf/format.c')
-rw-r--r--src/plugins/avf/format.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/plugins/avf/format.c b/src/plugins/avf/format.c
index 923f2a2473a..4c391a80760 100644
--- a/src/plugins/avf/format.c
+++ b/src/plugins/avf/format.c
@@ -128,17 +128,23 @@ format_avf_input_trace (u8 * s, va_list * args)
vnet_main_t *vnm = vnet_get_main ();
vnet_hw_interface_t *hi = vnet_get_hw_interface (vnm, t->hw_if_index);
u32 indent = format_get_indent (s);
+ int i = 0;
s = format (s, "avf: %v (%d) next-node %U",
hi->name, t->hw_if_index, format_vlib_next_node_name, vm,
node->index, t->next_index);
- s = format (s, "\n%Ustatus 0x%x error 0x%x ptype 0x%x length %u",
- format_white_space, indent + 2,
- t->qw1 & pow2_mask (19),
- (t->qw1 >> AVF_RXD_ERROR_SHIFT) & pow2_mask (8),
- (t->qw1 >> AVF_RXD_PTYPE_SHIFT) & pow2_mask (8),
- (t->qw1 >> AVF_RXD_LEN_SHIFT));
+ do
+ {
+ s = format (s, "\n%Udesc %u: status 0x%x error 0x%x ptype 0x%x len %u",
+ format_white_space, indent + 2, i,
+ t->qw1s[i] & pow2_mask (19),
+ (t->qw1s[i] >> AVF_RXD_ERROR_SHIFT) & pow2_mask (8),
+ (t->qw1s[i] >> AVF_RXD_PTYPE_SHIFT) & pow2_mask (8),
+ (t->qw1s[i] >> AVF_RXD_LEN_SHIFT));
+ }
+ while ((t->qw1s[i++] & AVF_RXD_STATUS_EOP) == 0 &&
+ i < AVF_RX_MAX_DESC_IN_CHAIN);
return s;
}