Re: [PATCH v20 25/25] app/pdump: preserve VLAN tags in captured packets

Bruce Richardson
2026-03-16T15:33:48Z

On Tue, Mar 10, 2026 at 09:10:03AM -0700, Stephen Hemminger wrote:
> When the source port has VLAN strip enabled, captured packets have
> the VLAN tag in mbuf metadata (vlan_tci) but not in the packet data.
> Similarly, TX captures with pending VLAN insert have the tag only
> in metadata. The resulting pcap files contain untagged packets.
>
> Convert RX_VLAN_STRIPPED metadata to TX_VLAN offload requests on
> dequeued mbufs and call rte_eth_tx_prepare() before rte_eth_tx_burst()
> so the pcap vdev inserts the tag into the packet data.
>

This is an example of something I previously flagged. Like with real
hardware, I think the PMD should be inserting the VLAN tag into the packet
as part of the Tx function, not the prepare function.

> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> lib/pdump/rte_pdump.c | 32 +++++++++++++++++++++++++++++++-
> 1 file changed, 31 insertions(+), 1 deletion(-)
>