Tested the proposed focal kernel - looks good as well:

$ uname -r
5.4.0-98-generic

$ apt policy linux-image-5.4.0-98-generic
linux-image-5.4.0-98-generic:
  Installed: 5.4.0-98.111
  Candidate: 5.4.0-98.111
  Version table:
 *** 5.4.0-98.111 500
        500 http://ppa.launchpad.net/canonical-kernel-team/proposed/ubuntu 
focal/main amd64 Packages
        100 /var/lib/dpkg/status


$ readlink /sys/class/net/enp130s0f0v0/device
../../../0000:82:00.3
$ sudo lspci -s 0000:82:00.3 -v
82:00.3 Ethernet controller: Mellanox Technologies ConnectX Family mlx5Gen 
Virtual Function (rev 01)
        Subsystem: Mellanox Technologies ConnectX Family mlx5Gen Virtual 
Function
        Flags: bus master, fast devsel, latency 0, NUMA node 1
        Memory at 3c004000000 (64-bit, prefetchable) [virtual] [size=2M]
        Capabilities: [60] Express Endpoint, MSI 00
        Capabilities: [48] Vital Product Data
        Capabilities: [9c] MSI-X: Enable+ Count=12 Masked-
        Capabilities: [100] Vendor Specific Information: ID=0000 Rev=0 Len=00c 
<?>
        Capabilities: [150] Alternative Routing-ID Interpretation (ARI)
        Kernel driver in use: mlx5_core
        Kernel modules: mlx5_core

$ sudo lspci -s 0000:82:00.0 -v
82:00.0 Ethernet controller: Mellanox Technologies MT42822 BlueField-2 
integrated ConnectX-6 Dx network controller (rev 01)
        Subsystem: Mellanox Technologies MT42822 BlueField-2 integrated 
ConnectX-6 Dx network controller
        Flags: bus master, fast devsel, latency 0, IRQ 99, NUMA node 1
        Memory at 3c002000000 (64-bit, prefetchable) [size=32M]
        Expansion ROM at <ignored> [disabled]
        Capabilities: [60] Express Endpoint, MSI 00
        Capabilities: [48] Vital Product Data
        Capabilities: [9c] MSI-X: Enable+ Count=64 Masked-
        Capabilities: [c0] Vendor Specific Information: Len=18 <?>
        Capabilities: [40] Power Management version 3
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [150] Alternative Routing-ID Interpretation (ARI)
        Capabilities: [180] Single Root I/O Virtualization (SR-IOV)
        Capabilities: [1c0] Secondary PCI Express
        Capabilities: [230] Access Control Services
        Capabilities: [320] Lane Margining at the Receiver <?>
        Capabilities: [370] Physical Layer 16.0 GT/s <?>
        Capabilities: [420] Data Link Feature <?>
        Kernel driver in use: mlx5_core
        Kernel modules: mlx5_core

$ sudo ip link set enp130s0f0 vf 0 vlan 1 ; echo $?
RTNETLINK answers: Operation not permitted
2

$ sudo ip link set enp130s0f0 vf 0 vlan 0 ; echo $?
0


** Tags removed: verification-needed-focal
** Tags added: verification-done-focal

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1957753

Title:
  net/mlx5e: EPERM on vlan 0 programming

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Focal:
  Fix Committed
Status in linux source package in Hirsute:
  Won't Fix
Status in linux source package in Impish:
  Fix Committed
Status in linux source package in Jammy:
  In Progress

Bug description:
  [Impact]
  There is an issue with hypervisor host side mlx5 driver operation on
  Bluefield devices in kernels <=5.16

  From patch description:
  When using libvirt to passthrough VF to VM it will always set the VF vlan
  to 0 even if user didn’t request it, this will cause libvirt to fail to
  boot in case the PF isn't eswitch owner.

  Example of such case is the DPU host PF which isn't eswitch manager, so
  any attempt to passthrough VF of it using libvirt will fail.

  [Fix]
  * 7846665d net/mlx5e: Unblock setting vid 0 for VF in case PF isn't
   eswitch manager

  This patch can be cherry-picked into Impish and newer kernels, but it
  requires some backport work on F/H due to they're missing commit
  b55b3538 that split the legacy code out.

  The ESW_ALLOWED marco was later converted into a helper routine in
  commit b16f2bb6.

  [Test]
  Test kernels can be found here:
  F: https://people.canonical.com/~phlin/kernel/lp-1957753-mlx5e/F/
  H: https://people.canonical.com/~phlin/kernel/lp-1957753-mlx5e/H/
  I: https://people.canonical.com/~phlin/kernel/lp-1957753-mlx5e/I/
  J: https://people.canonical.com/~phlin/kernel/lp-1957753-mlx5e/J/

  Kernels tested on a SUT with this device by Dmitrii Shcherbakov, test
  passed with positive feedback.

  [Where problems could occur]
  If this patch is erroneous, it might cause issue to this mlx5 driver
  with certain operations (setting vid 0). And other programs such as
  libvirt that depends on this return value might be affected as well.

  [Original Bug Description]
  There is an issue with hypervisor host side mlx5 driver operation on 
Bluefield devices in kernels <=5.16 that was recently fixed in master with a 
one-liner:

  
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7846665d3504812acaebf920d1141851379a7f37

  It would be good to have this fix in Focal+ kernels.

  This is not needed in https://bugs.launchpad.net/ubuntu/+source/linux-
  bluefield since it's used at the DPU side whereas the issue in
  question affects the hypervisor side.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1957753/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to