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

Stephen Hemminger
2026-03-24T17:12:17Z

On Mon, 16 Mar 2026 16:55:29 +0100
Morten Brørup <mb@smartsharesystems.com> wrote:

> >
> > 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.
>
> Agree with Bruce on this.
> For simple stuff like VLAN offload, applications should not be required to call tx_prep first.
>
> However, the Tx function is supposed to not modify the packets; relevant when refcnt > 1.
>
> Instead of modifying the packet data to insert/strip the VLAN tag,
> perhaps the driver can split the write/read operation into multiple write/read operations:
> 1. the Ethernet header
> 2. the VLAN tag
> 3. the remaining packet data
>
> I haven't really followed the pcap driver, so maybe my suggestion doesn't make sense.

The prepare code and VLAN was copied from virtio.
I assume virtio is widely used already.