[dts] [PATCH] add vlan filter script to VF daemon suite
xueqin.lin at intel.com
Thu Apr 20 11:14:35 CEST 2017
Vlan id 0 is equal to untagged packet for this case, need to avoid using vlan id 0.
rx_vlans = [1, random_vlan, MAX_VLAN]
MAX_VLAN is must option, ( vlan + 1 ) % 4096 will be 0.
I will fix it and add more condition to avoid using 0.
Thanks for review.
From: Liu, Yong
Sent: Thursday, April 20, 2017 2:49 PM
To: Lin, Xueqin <xueqin.lin at intel.com>; dts at dpdk.org
Subject: Re: [dts] [PATCH] add vlan filter script to VF daemon suite
One question about the way calculate wrong vlan id. Why it is generated by correct vlan plus 2 and then mod 4095?
I think ( vlan + 1 ) % 4096 will be more suitable.
On 04/11/2017 08:09 AM, Xueqin Lin wrote:
> + for rx_vlan in rx_vlans:
> + self.dut_testpmd.execute_cmd('rx_vlan add %s port 0 vf 1'% rx_vlan)
> + time.sleep(1)
> + out = self.send_and_pmdout(wrong_mac, rx_vlan)
> + self.verify("dst=%s" % wrong_mac in out,
> + "Failed to enable vlan filter!!!")
> + self.verify("VLAN tci=%s" % hex(rx_vlan) in out,
> + "Failed to receive packet with vlan id!!!")
> + wrong_rx_vlan = (rx_vlan + 2) % 4095
More information about the dts