[dpdk-25.07-rc2] vf_pf_reset/test_vlan_rx_restore_vf_reset_al=
l_ports: Unable to receive VLAN packets
Product
DPDK
Version
25.03
Hardware
All
OS
All
Status
UNCONFIRMED
Severity
normal
Priority
Normal
Component
testpmd
Assignee
dev@dpdk.org
Reporter
daxuex.gao@intel.com
Target Milestone
---
Environment
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
DPDK version: 25.07.0-rc2: 20460dcffd08a468
OS: Ubuntu 24.04 LTS/6.8.0-60-generic
Compiler: gcc version 13.3.0
Hardware platform: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
NIC hardware: Intel Corporation Ethernet Controller E810-C for SFP [8086:15=
93]
NIC firmware:=20
driver: vfio-pci
kdriver: 6.8.0-60-generic
firmware-version: 4.70 0x8001f7b9 1.3755.0
pkg: ice os default 1.3.36.0
scapy: 2.4.4
Test Setup
Steps to reproduce
List the steps to reproduce the issue.
1.dut:
# echo 2 > /sys/bus/pci/devices/0000\:05\:00.0/sriov_numvfs
# echo 2 > /sys/bus/pci/devices/0000\:05\:00.1/sriov_numvfs#
./usertools/dpdk-devbind.py -b vfio-pci 05:01.0 05:01.1
# ip link set ens785f0np0 vf 0 mac 00:11:22:33:44:11
# ip link set ens785f0np0 vf 1 mac 00:11:22:33:44:12
# x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:05:01.0 -a
0000:05:01.1 --file-prefix=3Ddpdk_1907210_20250702192518 -- -i
2.dut-testpmd:
testpmd> set fwd mac
testpmd> set verbose 1
testpmd> vlan set filter on 0
testpmd> rx_vlan add 1 0
IAVF_DRIVER: iavf_execute_vf_cmd(): Cmd 28 not supported
IAVF_DRIVER: iavf_disable_vlan_strip(): Failed to execute command of
OP_DISABLE_VLAN_STRIPPING
rte_eth_dev_vlan_filter(port_pi=3D0, vlan_id=3D1, on=3D1) failed diag=3D-5
testpmd> rx_vlan add 1 1
IAVF_DRIVER: iavf_execute_vf_cmd(): Cmd 28 not supported
IAVF_DRIVER: iavf_disable_vlan_strip(): Failed to execute command of
OP_DISABLE_VLAN_STRIPPING
rte_eth_dev_vlan_filter(port_pi=3D1, vlan_id=3D1, on=3D1) failed diag=3D-5
testpmd> show port stats all
testpmd> clear port stats all
testpmd> port stop all
testpmd> port reset all
testpmd> port start all
testpmd> start
testpmd> show port stats all
3.tester-scapy send vlan package:
>>> sendp(
>>> Ether(dst=3D'00:11:22:33:44:11')/Dot1Q(vlan=3D1)/IP()/Raw(load=
=3Db'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'),
>>> iface=3D"ens161f0",count=3D10,inter=3D0.01,verbose=
=3DFalse)
4.Show the output from the previous commands.
testpmd> show port stats all
######################## NIC statistics for port 0 #####################=
###
RX-packets: 0 RX-missed: 0 RX-bytes: 0
RX-errors: 0
RX-nombuf: 0
TX-packets: 0 TX-errors: 0 TX-bytes: 0 Throughput (si=
nce
last show)
Rx-pps: 0 Rx-bps: 0
Tx-pps: 0 Tx-bps: 0
#########################################################################=
###=20
######################## NIC statistics for port 1 ########################
RX-packets: 0 RX-missed: 0 RX-bytes: 0
RX-errors: 0
RX-nombuf: 0
TX-packets: 0 TX-errors: 0 TX-bytes: 0 Throughput (si=
nce
last show)
Rx-pps: 0 Rx-bps: 0
Tx-pps: 0 Tx-bps: 0
#########################################################################=
###
Expected Result
=3D=3D=3D=3D=3D=3D=3D=3D
testpmd> show port stats all ######################## NIC statistics fo=
r port
0 ########################
RX-packets: 10 RX-missed: 0 RX-bytes: 1020
RX-errors: 0
RX-nombuf: 0
TX-packets: 0 TX-errors: 0 TX-bytes: 0 Throughput (si=
nce
last show)
Rx-pps: 0 Rx-bps: 0
Tx-pps: 0 Tx-bps: 0
#########################################################################=
###=20
######################## NIC statistics for port 1 ########################
RX-packets: 0 RX-missed: 0 RX-bytes: 0
RX-errors: 0
RX-nombuf: 0
TX-packets: 10 TX-errors: 0 TX-bytes: 1020 Throughput
(since last show)
Rx-pps: 0 Rx-bps: 0
Tx-pps: 0 Tx-bps: 0
#########################################################################=
###
Regression
Is this issue a regression: (Y/N)Y
commit 3bfad066f9b4764981c9ad90a750fa6f1afcf15a (HEAD)
Author: Amiya Ranjan Mohakud <amiyaranjan.mohakud@gmail.com>
Date: Mon Jun 23 23:41:36 2025 +0530
net/iavf: fix VLAN strip setting after enabling filter
For i40e kernel drivers which support either vlan(v1) or vlan(v2)
VIRTCHNL OP, it will set strip on when setting filter on.
But DPDK side will not change strip flag.
To be consistent with DPDL side, explicitly disable strip again.
Bugzilla ID: 1725
Fixes: e25c7ed114b2 ("net/iavf: fix VLAN offload strip flag")
Cc: stable@dpdk.org
Signed-off-by: Amiya Ranjan Mohakud <amiyaranjan.mohakud@gmail.com>
Reviewed-by: Ciara Loftus <ciara.loftus@intel.com>