【hns】PF failed(-22) to config VF's VLAN
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kunpeng920 |
Fix Released
|
Undecided
|
Ike Panhc | ||
Ubuntu-20.04 |
Invalid
|
Undecided
|
Ike Panhc | ||
Ubuntu-20.04-hwe |
Fix Released
|
Undecided
|
Ike Panhc |
Bug Description
[Bug Description]
PF failed(-22) to config VF's VLAN
[Steps to Reproduce]
a) config vf
echo 1 > /sys/class/
enable VF
ip link set dev <vf_name> up
b)step:
1、machine 1
ip link set dev <pf_name> vf 0 vlan <id>
2、
#machine 2:mz <pf_name> -t tcp sp=5001,dp=5003 -b <dst_mac> -p 800 -c 1000 -Q <QinQ>
rx=1000
#machine 1:ifconfig <vf_name>
3、
#machine 2:mz <pf_name> -t tcp sp=5001,dp=5003 -b <dst_mac> -p 800 -c 1000 -Q
rx=0
#machine 1:ifconfig <vf_name>
4、
#machine 1 2:ip link set dev <pf_name> vf 0 vlan 0
[Actual Results]
PF failed(-22) to config VF's VLAN
[Expected Results]
A、rx=1000
B、rx=0
[Reproducibility]
nput cmd in tc: cat /etc/os-release | grep -w ID | awk -F'=' '{print $2}' | tr '[:upper:]' '[:lower:]'
cur os name cp: ubuntu
[comm_sys_
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp189s0f0: <NO-CARRIER,
link/ether 18:3d:5e:8e:e5:42 brd ff:ff:ff:ff:ff:ff
3: enp189s0f1: <BROADCAST,
link/ether 18:3d:5e:8e:e5:43 brd ff:ff:ff:ff:ff:ff
inet 192.168.40.11/24 brd 192.168.40.255 scope global enp189s0f1
valid_lft forever preferred_lft forever
4: enp125s0f0: <BROADCAST,
link/ether 18:3d:5e:8e:e5:41 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.11/24 brd 192.168.10.255 scope global enp125s0f0
valid_lft forever preferred_lft forever
5: enp1s0f0: <NO-CARRIER,
link/ether 9c:52:f8:60:e1:9e brd ff:ff:ff:ff:ff:ff
6: enp1s0f1: <BROADCAST,
link/ether 9c:52:f8:60:e1:9f brd ff:ff:ff:ff:ff:ff
inet 192.168.71.252/24 brd 192.168.71.255 scope global enp1s0f1
valid_lft forever preferred_lft forever
inet6 fe80::9e52:
valid_lft forever preferred_lft forever
2022-01-17 03:40:17,961 INFO [comm_sys_
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp189s0f0: <NO-CARRIER,
link/ether 18:3d:5e:8e:e4:4e brd ff:ff:ff:ff:ff:ff
3: enp189s0f1: <BROADCAST,
link/ether 18:3d:5e:8e:e4:4f brd ff:ff:ff:ff:ff:ff
inet 192.168.40.12/24 brd 192.168.40.255 scope global enp189s0f1
valid_lft forever preferred_lft forever
4: enp125s0f0: <BROADCAST,
link/ether 18:3d:5e:8e:e4:4d brd ff:ff:ff:ff:ff:ff
inet 192.168.10.12/24 brd 192.168.10.255 scope global enp125s0f0
valid_lft forever preferred_lft forever
5: enp1s0f0: <NO-CARRIER,
link/ether f4:1d:6b:45:3a:8f brd ff:ff:ff:ff:ff:ff
6: enp1s0f1: <BROADCAST,
link/ether f4:1d:6b:45:3a:90 brd ff:ff:ff:ff:ff:ff
inet 192.168.71.251/24 brd 192.168.71.255 scope global enp1s0f1
valid_lft forever preferred_lft forever
inet6 fe80::f61d:
valid_lft forever preferred_lft forever
cmd:ethtool --show-fec enp189s0f1 | grep 'Active' | awk -F ': ' '{print $2}', result:Off
2022-01-17 03:40:29,621 INFO [comm_sys_
2022-01-17 03:40:29,624 INFO [comm_sys_
2022-01-17 03:40:29,627 INFO [comm_sys_
2022-01-17 03:40:30,651 INFO [comm_sys_
64 bytes from 192.168.10.12: icmp_seq=1 ttl=64 time=0.103 ms
64 bytes from 192.168.10.12: icmp_seq=2 ttl=64 time=0.035 ms
--- 192.168.10.12 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1012ms
rtt min/avg/max/mdev = 0.035/0.
2022-01-17 03:40:30,655 INFO [comm_sys_
2022-01-17 03:40:30,658 INFO [comm_sys_
64 bytes from 192.168.40.12: icmp_seq=1 ttl=64 time=0.055 ms
64 bytes from 192.168.40.12: icmp_seq=2 ttl=64 time=0.044 ms
--- 192.168.40.12 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1012ms
rtt min/avg/max/mdev = 0.044/0.
2022-01-17 03:40:30,662 INFO [comm_sys_
2022-01-17 03:40:32,716 INFO [comm_sys_
2022-01-17 03:40:32,716 INFO [comm_sys_
2022-01-17 03:40:32,721 INFO [module_
2022-01-17 03:40:32,725 INFO [module_
2022-01-17 03:40:32,729 INFO [module_
2022-01-17 03:40:32,733 WARNING [module_
2022-01-17 03:40:32,737 WARNING [module_
2022-01-17 03:40:32,741 INFO [module_
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Unknown! (255)
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Current message level: 0x00000036 (54)
probe link ifdown ifup
Link detected: no
2022-01-17 03:40:32,744 INFO [module_
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Current message level: 0x00000036 (54)
probe link ifdown ifup
Link detected: yes
2022-01-17 03:40:32,746 INFO [comm_sys_
2022-01-17 03:40:34,791 INFO [module_
Supported ports: [ FIBRE ]
Supported link modes: 25000baseCR/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: No
Supported FEC modes: None RS
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 100000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
Current message level: 0x00000036 (54)
probe link ifdown ifup
Link detected: yes
2022-01-17 03:40:34,792 INFO [comm_sys_
2022-01-17 03:40:36,840 INFO [module_
2022-01-17 03:40:36,841 INFO [comm_sys_
2022-01-17 03:40:38,214 INFO [comm_sys_
2022-01-17 03:40:38,214 INFO [module_
2022-01-17 03:40:38,418 INFO [module_
2022-01-17 03:40:40,422 INFO [module_
2022-01-17 03:40:40,426 INFO [module_
2022-01-17 03:40:40,508 INFO [module_
2022-01-17 03:40:40,508 INFO [module_
2022-01-17 03:40:40,508 INFO [module_
2022-01-17 03:40:40,509 INFO [module_
2022-01-17 03:40:40,509 INFO [module_
2022-01-17 03:40:40,517 INFO [onboard_
2022-01-17 03:40:40,666 INFO [onboard_
2022-01-17 03:40:40,817 INFO [onboard_
。。。。。
2022-01-17 03:50:16,339 INFO [onboard_
2022-01-17 03:50:16,477 INFO [onboard_
2022-01-17 03:50:16,481 ERROR [onboard_
2022-01-17 03:50:16,617 INFO [onboard_
2022-01-17 03:50:16,754 INFO [onboard_
2022-01-17 03:50:16,755 INFO [mz.py:50] check mz
2022-01-17 03:50:16,755 INFO [mz.py:40] install mz
2022-01-17 03:50:16,756 INFO [mz.py:87] mz enp125s0f0 -t tcp sp=5001,dp=5003 -b ee:f7:d9:13:55:6a -p 800 -c 1000 -Q 4095
2022-01-17 03:50:17,532 INFO [mz.py:90]
2022-01-17 03:50:17,537 INFO [onboard_
2022-01-17 03:50:17,538 INFO [mz.py:87] mz enp125s0f0 -t tcp sp=5001,dp=5003 -b ee:f7:d9:13:55:6a -p 800 -c 1000 -Q 4094
2022-01-17 03:50:18,320 INFO [mz.py:90]
2022-01-17 03:50:18,325 INFO [onboard_
2022-01-17 03:50:18,326 INFO [onboard_
2022-01-17 03:50:18,331 INFO [comm_sys_
2022-01-17 03:50:18,374 INFO [comm_sys_
[ 4081.122015] hns3 0000:7d:00.0: PF failed(-22) to config VF's VLAN
[ 4081.267084] hns3 0000:7d:00.0: Add port vlan failed, vport 1 is already in vlan 2
[ 4081.274559] hns3 0000:7d:00.0: PF failed(-22) to config VF's VLAN
[ 4081.418606] hns3 0000:7d:00.0: Add port vlan failed, vport 1 is already in vlan 3
[ 4081.426079] hns3 0000:7d:00.0: PF failed(-22) to config VF's VLAN
[ 4081.571115] hns3 0000:7d:00.0: Add port vlan failed, vport 1 is already in vlan 4
................
[ 4301.188929] hns3 0000:7d:00.0: PF failed(-22) to config VF's VLAN
[ 4301.333045] hns3 0000:7d:00.0: Add port vlan failed, vport 1 is already in vlan 1531
[ 4301.340777] hns3 0000:7d:00.0: PF failed(-22) to config VF's VLAN
[ 4301.752910] hns3 0000:7d:00.0: Add port vlan failed, vport 1 is already in vlan 1534
[ 4301.760643] hns3 0000:7d:00.0: PF failed(-22) to config VF's VLAN
[ 4301.905169] hns3 0000:7d:00.0: Add port vlan failed, vport 1 is already in vlan 1535
[ 4301.912902] hns3 0000:7d:00.0: PF failed(-22) to config VF's VLAN
2022-01-17 03:50:18,381 ERROR [comm_sys_
2022-01-17 03:50:18,423 INFO [conftest.py:196] case: test_onboard_
[Additional information]
(Firmware version, kernel version, affected hardware, etc. if required2022011
[Resolution]
commit 132023de7149e7d
Author: Jian Shen <email address hidden>
Date: Mon May 31 10:38:40 2021 +0800
net: hns3: remove unnecessary updating port based VLAN
For the PF have called hclge_update_
before notify VF, it's unnecessary to update port based VLAN again
when received mailbox request from VF.
Signed-off-by: Jian Shen <email address hidden>
Signed-off-by: Huazhong Tan <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
diff --git a/drivers/
index 16b42cee778e.
--- a/drivers/
+++ b/drivers/
@@ -360,15 +360,6 @@ static int hclge_set_
- } else if (msg_cmd->subcode == HCLGE_MBX_
- struct hclge_vlan_info *vlan_info;
- u16 *state;
-
- state = (u16 *)&mbx_
- vlan_info = (struct hclge_vlan_info *)
- &mbx_req-
- status = hclge_update_
- vlan_info);
} else if (msg_cmd->subcode == HCLGE_MBX_
/* vf does not need to know about the port based VLAN state
Changed in kunpeng920: | |
status: | New → In Progress |
Patch 132023de71 ("net: hns3: remove unnecessary updating port based VLAN") hits mainline kernel since v5.14 and not yet merged into focal GA or HWE kernel.
Try to cherry-pick and can be clean cherry-pick to focal HWE (5.13) but not GA (5.4). Next step is to reproduce the failure.