net: hns3: remove unnecessary updating port based VLAN

Bug #1979873 reported by Fred Kimmy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kunpeng920
Incomplete
Undecided
Unassigned
Ubuntu-20.04-hwe
Incomplete
Undecided
Unassigned

Bug Description

[Bug Description]
dmesg show “Add port vlan failed.” and “PF failed(-22) to config VF’s VLAN” . Actually, the VLAN is successfully created. This led to an error in judgment.

[Steps to Reproduce]
1)echo 1 > /sys/class/net/<ethx>/device/sriov_numvfs
2)ip link set dev <pf_name> vf 0 vlan 1
3)

[Actual Results]
hns30000:7d:00.0:Add port vlan failed, vport 1 is already in vlan 1
hns30000:7d:00.0:PF failed(-22)to config VF‘s VLAN

[Expected Results]
Not error print, VLAN creat success.

[Reproducibility]
must appear

[Additional information]
(Firmware version, kernel version, affected hardware, etc. if required2022053108513):
kernel version Linux ubuntu 5.13.0-30-generic #33~20.04.1-Ubuntu SMP Mon Feb 7 14:28:43 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

[Resolution]
net: hns3: remove unnecessary updating port based VLAN
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=132023de7149e7dde4b457328cb233dc58561b54)

description: updated
Revision history for this message
Ike Panhc (ikepanhc) wrote :

I have different error. Is there any patch needed too?

ubuntu@segers:~$ uname -a
Linux segers 5.13.0-51-generic #58~20.04.1-Ubuntu SMP Mon Jun 13 20:00:13 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@segers:~$ echo 1 | sudo tee /sys/devices/pci0000:7c/0000:7c:00.0/0000:7d:00.0/sriov_numvfs
1
ubuntu@segers:~$ sudo ip link set dev enp125s0f0v0 vf 0 vlan 1
RTNETLINK answers: Input/output error
ubuntu@segers:~$ dmesg | tail -3
[ 275.159698] hns3 0000:7d:01.0: finished initializing hclgevf driver
[ 275.161721] hns3 0000:7d:01.0: using random MAC address c6:a2:a3:37:50:27
[ 275.203320] hns3 0000:7d:01.0 enp125s0f0v0: renamed from eth0

Changed in kunpeng920:
status: New → Incomplete
Revision history for this message
Fred Kimmy (kongzizaixian) wrote :

root@ubuntu:~# echo 1 > /sys/class/net/enp189s0f2/device/sriov_numvfs
root@ubuntu:~# dmesg
[92104.864205] pci 0000:bd:01.6: [19e5:a22f] type 00 class 0x020000
[92104.864252] pci 0000:bd:01.6: enabling Extended Tags
[92104.865261] hns3 0000:bd:01.6: Adding to iommu group 49
[92104.868288] hns3 0000:bd:01.6: enabling device (0000 -> 0002)
[92104.868474] hns3 0000:bd:01.6: The firmware version is 1.20.0.17
[92104.882273] hns3 0000:bd:01.6: finished initializing hclgevf driver
[92104.884027] hns3 0000:bd:01.6: using random MAC address 7e:ab:7e:bb:c0:9e
[92104.892165] hns3 0000:bd:01.6 enp189s0f2v0: renamed from eth0
root@ubuntu:~# ip link set dev enp189s0f2 vf 0 vlan 1
root@ubuntu:~# dmesg
[92104.864205] pci 0000:bd:01.6: [19e5:a22f] type 00 class 0x020000
[92104.864252] pci 0000:bd:01.6: enabling Extended Tags
[92104.865261] hns3 0000:bd:01.6: Adding to iommu group 49
[92104.868288] hns3 0000:bd:01.6: enabling device (0000 -> 0002)
[92104.868474] hns3 0000:bd:01.6: The firmware version is 1.20.0.17
[92104.882273] hns3 0000:bd:01.6: finished initializing hclgevf driver
[92104.884027] hns3 0000:bd:01.6: using random MAC address 7e:ab:7e:bb:c0:9e
[92104.892165] hns3 0000:bd:01.6 enp189s0f2v0: renamed from eth0
[92116.376545] hns3 0000:bd:00.2: Add port vlan failed, vport 1 is already in vlan 1
[92116.384023] hns3 0000:bd:00.2: PF failed(-22) to config VF's VLAN

Ike Panhc (ikepanhc)
Changed in kunpeng920:
status: Incomplete → New
Revision history for this message
Ike Panhc (ikepanhc) wrote :

I tried eno1 and enp189s0f2 but still can not reproudce with Ubuntu 5.15 kernel. Is there anything missing?

ubuntu@kreiken:~$ echo 1 | sudo tee /sys/class/net/enp189s0f2/device/sriov_numvfs
1
ubuntu@kreiken:~$ sudo ip link set dev enp189s0f2 vf 0 vlan 1
sudo ip link set dev enp189s0f2 vf 0 vlan 1
ubuntu@kreiken:~$ dmesg | tail -2
[ 6755.782856] hns3 0000:bd:01.6: using random MAC address 5e:**:**:**:79:d5
[ 6755.801403] hns3 0000:bd:01.6 enp189s0f2v0: renamed from eth0
ubuntu@kreiken:~$ uname -a
Linux kreiken 5.15.0-41-generic #44~20.04.1-Ubuntu SMP Sat Jun 25 06:34:19 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

Changed in kunpeng920:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.