summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dpdk/device/device.c1
-rw-r--r--src/plugins/dpdk/device/dpdk.h1
-rw-r--r--src/plugins/dpdk/device/format.c9
3 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c
index 987596ead9b..c20a01b84eb 100644
--- a/src/plugins/dpdk/device/device.c
+++ b/src/plugins/dpdk/device/device.c
@@ -131,6 +131,7 @@ dpdk_tx_trace_buffer (dpdk_main_t * dm,
sizeof (buffer[0]) - sizeof (buffer->pre_data));
clib_memcpy (t0->buffer.pre_data, buffer->data + buffer->current_data,
sizeof (t0->buffer.pre_data));
+ clib_memcpy (&t0->data, mb->buf_addr + mb->data_off, sizeof (t0->data));
}
static_always_inline void
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index 2e17d635efb..669629293c0 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -405,6 +405,7 @@ typedef struct
struct rte_mbuf mb;
/* Copy of VLIB buffer; packet data stored in pre_data. */
vlib_buffer_t buffer;
+ u8 data[256]; /* First 256 data bytes, used for hexdump */
} dpdk_tx_dma_trace_t;
typedef struct
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index b3ccb352955..a2635c53ca4 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -587,6 +587,10 @@ format_dpdk_tx_dma_trace (u8 * s, va_list * va)
format_white_space, indent,
t->buffer_index, format_vlib_buffer, &t->buffer);
+ s = format (s, "\n%U%U",
+ format_white_space, indent,
+ format_dpdk_rte_mbuf, &t->mb, &t->data);
+
s = format (s, "\n%U%U", format_white_space, indent,
format_ethernet_header_with_length, t->buffer.pre_data,
sizeof (t->buffer.pre_data));
@@ -713,11 +717,12 @@ format_dpdk_rte_mbuf (u8 * s, va_list * va)
s = format (s, "PKT MBUF: port %d, nb_segs %d, pkt_len %d"
"\n%Ubuf_len %d, data_len %d, ol_flags 0x%x, data_off %d, phys_addr 0x%x"
- "\n%Upacket_type 0x%x",
+ "\n%Upacket_type 0x%x l2_len %u l3_len %u outer_l2_len %u outer_l3_len %u",
mb->port, mb->nb_segs, mb->pkt_len,
format_white_space, indent,
mb->buf_len, mb->data_len, mb->ol_flags, mb->data_off,
- mb->buf_physaddr, format_white_space, indent, mb->packet_type);
+ mb->buf_physaddr, format_white_space, indent, mb->packet_type,
+ mb->l2_len, mb->l3_len, mb->outer_l2_len, mb->outer_l3_len);
if (mb->ol_flags)
s = format (s, "\n%U%U", format_white_space, indent,