The unsigned vf->num_mac will be decreased to below zero and cause the VF port not working

Bug #1806845 reported by Alex Wang on 2018-12-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)

Bug Description

The unsigned vf->num_mac in Ubuntu18.04.1 LTS i40e driver 2.1.14-k will be decreased to below zero when VF is trying to delete the MAC address which is added by PF and then add a new MAC address. And after this issue happens, VF won't be able to send/receive packets, and excepting for broadcast address, mac_filter_hash is empty in dumped VSI info.

Ubuntu18.04.1 LTS kernel: 4.15.0-38-generic
i40e driver: 2.1.14-k
i40evf driver: 3.0.1-k

Actual results:
The unsigned vf->num_mac should decrease to below zero. The VF port doesn't work.

Expected results:
The unsigned vf->num_mac range is from 0 to 65535;
or the vf is not allowed to delete the MAC addr which is added by PF

Corresponding Patch is required for resolving this i40e driver issue

i40e: Prevent deleting MAC address from VF when set by PF

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → linux (Ubuntu)

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1806845

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Alex Wang (alexwang-bkc) wrote :

Here're the reproduce steps of this issue, also attached the errors in dmesg log which were triggered by this issue.

root@unassigned-hostname:~# ethtool -i enp24s0f0
driver: i40e
version: 2.1.14-k
firmware-version: 6.02 0x80003620 1.1747.0
bus-info: 0000:18:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
root@unassigned-hostname:~# echo 1 > /sys/bus/pci/devices/0000\:18\:00.0/sriov_numvfs
root@unassigned-hostname:~# ip link set dev enp24s0f0 vf 0 mac 00:10:00:00:00:00 root@unassigned-hostname:~# echo "dump vf 0" > /sys/kernel/debug/i40e/0000\:18\:00.0/command
root@unassigned-hostname:~# echo "dump vsi 394" > /sys/kernel/debug/i40e/0000\:18\:00.0/command
root@unassigned-hostname:~# ip link set dev enp24s2 address 00:10:00:00:00:00 root@unassigned-hostname:~# ip link set dev enp24s2 address 00:20:00:00:00:00 root@unassigned-hostname:~# echo "dump vsi 394" > /sys/kernel/debug/i40e/0000\:18\:00.0/command

quanxian (quanxian-wang) on 2018-12-07
information type: Public → Private
Kai-Heng Feng (kaihengfeng) wrote :

I think we need to apply the entire series as one. So I guess we need all these commits?
5907cf6c5bbe78be2ed18b875b316c6028b20634 i40e: Prevent deleting MAC address from VF when set by PF
babbcc60040abfb7a9e3caa1c58fe182ae73762a i40evf: cancel workqueue sync for adminq when a VF is removed
5cba17b14182696d6bb0ec83a1d087933f252241 i40e: hold the rtnl lock on clearing interrupt scheme
3bd77e2ae1477d6f87fc3f542c737119d5decf9f i40evf: Don't enable vlan stripping when rx offload is turned on
e78d9a39fd06109022d11c8ca444cfcec2abb290 i40e: Check and correct speed values for link on open

Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Brad Figg (brad-figg) wrote :


Why did you mark this bug private?

This can be made public bug.

quanxian (quanxian-wang) wrote :

I have changed it to public. I don't find why I change it to private. Sorry.

information type: Private → Public
Stefan Bader (smb) on 2019-02-15
Changed in linux (Ubuntu):
status: Expired → Confirmed
Brad Figg (brad-figg) on 2019-07-24
tags: added: cscc
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments