On ingress when configuring the device 1.modify the rte_eth_conf.rxmode.hw_vlan_strip = 1,
On egress you need to modify the rte_van_macip struct in the sent mbuf*. (rte_mbuf.h) 1. add the PKT_TX_VLAN_PKT to the ol_flags fields. 2. fill the plan_tci in pkt.vlan_macip.f.vlan_tci *This is true for dpdk 1.7, structs may have moved in 1.8 On Sat, Dec 20, 2014 at 8:39 PM, Padam Jeet Singh <padam.singh at inventum.net> wrote: > Hello, > > I have done a simple mbuf adjust and prepend to achieve the removal and > insertion of the vlan header and it works fine. The use case is something > similar to the l3fwd example where one port has traffic coming in on > multiple vlans and the other port has no vlans. The packet processing path > in the middle inserts or removes the vlan. > > Is there an offload flag or mode where this can be done in hardware? Or is > there a more optimized way to do this in dpdk? For sake of performance I > want to avoid the copy ethernet header, modify mbuf, copy back the header > steps. > > Thanks, > Padam > --------------------------- > Sent from my mobile. Please excuse the brevity, spelling and punctuation. > >