[dpdk-dev] app/testpmd: overriding previous setting of vlan offload when reconfiguring a device

Angela Czubak aczubak at caviumnetworks.com
Tue Apr 18 17:00:58 CEST 2017


I think I might have found a bug in test-pmd, but I want to make sure.

One can set VLAN stripping to be on or off with "vlan set strip off/on 
all" etc. Let's assume that user stops all ports ("port stop all"), then 
modifies max-pkt-len and disbales VLAN stripping ("port config all 
max-pkt-len 2048", then "vlan set strip off all"). Next, they start all 
ports ("port start all").

User may think that VLAN stripping is off, however, in init_port_config 
vlan stripping is enabled (by assignment port->dev_conf.rxmode = 
rx_mode), and this setting persists when configuring device once again 
in start_port(portid_t) (which is called after issuing "port start all" 
if port->need_reconfig is greater than 0). Thus, even though user 
disabled VLAN stripping, it is still on.

The question is: should port configuration be updated by adding lines 
like "port->dev_conf.rxmode.hw_vlan_strip = 0" in rx_vlan_strip_set 
etc.? Or maybe VLAN offload modification should be made only with 
reconfiguring whole ports, and there should be no calls to 
rte_eth_dev_set_vlan_offload (which does not need the port to be 
switched off). Which is the right approach?



More information about the dev mailing list