Skip to content

Conversation

@shreeya-patel98
Copy link
Collaborator

@shreeya-patel98 shreeya-patel98 commented Jan 11, 2026

Commits

    scsi: storvsc: Prefer returning channel with the same CPU as on the I/O issuing CPU
    
    jira LE-4537
    commit-author Long Li <longli@microsoft.com>
    commit b69ffeaa0ae43892683113b3f4ddf156398738b9
    RDMA/mana_ib: Extend modify QP
    
    jira LE-4521
    commit-author Shiraz Saleem <shirazsaleem@microsoft.com>
    commit 2bd7dd383609f11330814ecc0d3c10b67073a6be
    net: mana: Reduce waiting time if HWC not responding
    
    jira LE-4497
    commit-author Haiyang Zhang <haiyangz@microsoft.com>
    commit c4deabbc1abe452ea230b86d53ed3711e5a8a062
    net: hv_netvsc: fix loss of early receive events from host during channel open.
    
    jira LE-4494
    commit-author Dipayaan Roy <dipayanroy@linux.microsoft.com>
    commit 9448ccd853368582efa9db05db344f8bb9dffe0f
    RDMA/mana_ib: Drain send wrs of GSI QP
    
    jira LE-4524
    commit-author Konstantin Taranov <kotaranov@microsoft.com>
    commit 44d69d3cf2e8047c279cbb9708f05e2c43e33234
    RDMA/mana_ib: add additional port counters
    
    jira LE-4527
    commit-author Zhiyue Qiu <zhiyueqiu@microsoft.com>
    commit 084f35b84f57e059b542ea44240a51b294a096a1
    net: mana: Fix build errors when CONFIG_NET_SHAPER is disabled
    
    jira LE-4473
    commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
    commit 11cd0206987205ee05b0abd70a8eafa400ba89e3
    net: mana: Handle unsupported HWC commands
   
   jira LE-4473
   commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
   commit ca8ac489ca33c986ff02ee14c3e1c10b86355428
   upstream-diff There were conflicts seen when applying this
   patch due to the following patch being in our tree before
   this one.
   7a3c23599984 ("net: mana: Handle Reset Request from MANA NIC")
    net: mana: Add speed support in mana_get_link_ksettings
    
    jira LE-4473
    commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
    commit a6d5edf11e0cf5a4650f1d353d20ec29de093813
    net: mana: Add support for net_shaper_ops
    
    jira LE-4473
    commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
    commit 75cabb46935b6de8e2bdfde563e460ac41cfff12
    net: mana: Allocate MSI-X vectors dynamically
    
    jira LE-4467
    commit-author Shradha Gupta <shradhagupta@linux.microsoft.com>
    commit 755391121038c06cb653241aa94dcabd87179f62
    upstream-diff There were conflicts seen when applying this patch
    due to following commit present in our tree before this patch.
    590bcf15ae4a ("net: mana: Add handler for hardware servicing events")
    net: mana: Allow irq_setup() to skip cpus for affinity
    
    jira LE-4467
    commit-author Shradha Gupta <shradhagupta@linux.microsoft.com>
    commit 845c62c543d6bd5d8b80f53835997789e4bb8e29
    net: mana: explain irq_setup() algorithm
    
    jira LE-4467
    commit-author Yury Norov <yury.norov@gmail.com>
    commit 4607617af1b4747df0284ea8c1ddcecb21cae528
    PCI: hv: Allow dynamic MSI-X vector allocation
    
    jira LE-4467
    commit-author Shradha Gupta <shradhagupta@linux.microsoft.com>
    commit ad518f2557b971976fc9d99a6a8cd2b453742bf9
    PCI/MSI: Export pci_msix_prepare_desc() for dynamic MSI-X allocations
   
   jira LE-4467
   commit-author Shradha Gupta <shradhagupta@linux.microsoft.com>
   commit 5da8a8b8090b5f79a816ba016af3a70a9d7287bf
    RDMA/mana_ib: Add device statistics support
    
    jira LE-4478
    commit-author Shiraz Saleem <shirazsaleem@microsoft.com>
    commit baa640d924e55eee9210164ac068ad32dbd69c20

Kernel Build

/home/azureuser/ciq/kernel-src-tree
Skipping make mrproper
[TIMER]{MRPROPER}: 0s
x86_64 architecture detected, copying config
'configs/kernel-x86_64-rhel.config' -> '.config'
Setting Local Version for build
CONFIG_LOCALVERSION="-no-47299eaddb72"
Making olddefconfig
#
# configuration written to .config
#
Starting Build
  SYNC    include/config/auto.conf
mkdir -p /home/azureuser/ciq/kernel-src-tree/tools/objtool && make O=/home/azureuser/ciq/kernel-src-tree subdir=tools/objtool --no-print-directory -C objtool
mkdir -p /home/azureuser/ciq/kernel-src-tree/tools/bpf/resolve_btfids && make O=/home/azureuser/ciq/kernel-src-tree subdir=tools/bpf/resolve_btfids --no-print-directory -C bpf/resolve_btfids
  INSTALL libsubcmd_headers
  INSTALL libsubcmd_headers
  CALL    scripts/checksyscalls.sh
  CHK     kernel/kheaders_data.tar.xz
  TEST    posttest
arch/x86/tools/insn_decoder_test: success: Decoded and checked 8239636 instructions
  TEST    posttest
arch/x86/tools/insn_sanity: Success: decoded and checked 1000000 random instructions with 0 errors (seed:0xfcaedf98)
Kernel: arch/x86/boot/bzImage is ready  (#5)
[TIMER]{BUILD}: 50s
Making Modules
  SYMLINK /lib/modules/6.12.0-no-47299eaddb72+/build
  INSTALL /lib/modules/6.12.0-no-47299eaddb72+/modules.order
  INSTALL /lib/modules/6.12.0-no-47299eaddb72+/modules.builtin
  INSTALL /lib/modules/6.12.0-no-47299eaddb72+/modules.builtin.mod
  <--snip-->
    INSTALL /lib/modules/6.12.0-no-47299eaddb72+/kernel/net/qrtr/qrtr-mhi.ko
  INSTALL /lib/modules/6.12.0-no-47299eaddb72+/kernel/virt/lib/irqbypass.ko
  SIGN    /lib/modules/6.12.0-no-47299eaddb72+/kernel/net/hsr/hsr.ko
  SIGN    /lib/modules/6.12.0-no-47299eaddb72+/kernel/net/qrtr/qrtr.ko
  STRIP   /lib/modules/6.12.0-no-47299eaddb72+/kernel/net/qrtr/qrtr-mhi.ko
  STRIP   /lib/modules/6.12.0-no-47299eaddb72+/kernel/virt/lib/irqbypass.ko
  SIGN    /lib/modules/6.12.0-no-47299eaddb72+/kernel/virt/lib/irqbypass.ko
  SIGN    /lib/modules/6.12.0-no-47299eaddb72+/kernel/net/qrtr/qrtr-mhi.ko
  DEPMOD  /lib/modules/6.12.0-no-47299eaddb72+
[TIMER]{MODULES}: 10s
Making Install
  INSTALL /boot 
[TIMER]{INSTALL}: 22s
Checking kABI
kABI check passed
Setting Default Kernel to /boot/vmlinuz-6.12.0-no-47299eaddb72+ and Index to 1
The default is /boot/loader/entries/9bf81e45d6034cada9fc047cb070e25f-6.12.0-no-47299eaddb72+.conf with index 1 and kernel /boot/vmlinuz-6.12.0-no-47299eaddb72+
The default is /boot/loader/entries/9bf81e45d6034cada9fc047cb070e25f-6.12.0-no-47299eaddb72+.conf with index 1 and kernel /boot/vmlinuz-6.12.0-no-47299eaddb72+
Generating grub configuration file ...
Warning: Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.
Adding boot menu entry for UEFI Firmware Settings ...
done
Hopefully Grub2.0 took everything ... rebooting after time metrices
[TIMER]{MRPROPER}: 0s
[TIMER]{BUILD}: 50s
[TIMER]{MODULES}: 10s
[TIMER]{INSTALL}: 22s
[TIMER]{TOTAL} 83s
Rebooting in 10 seconds

kernel-build.log

Kselftest Results

Note :- Differences are not related to the patches added.

azureuser@shreeya-rlc10 ~/ciq> grep -a ^ok kselftest-after.log | wc -l
568
azureuser@shreeya-rlc10 ~/ciq> grep -a ^ok kselftest-before.log | wc -l
572

kselftest-after.log
kselftest-before.log

Testing

Note :- There are some errors seen related to MANA module but they are present even without the patches added.

[azureuser@shreeya-rlc10 ~]$ sudo dmesg | grep mana
[    4.237789] mana 7870:00:00.0: enabling device (0000 -> 0002)
[    4.260477] mana 7870:00:00.0: Microsoft Azure Network Adapter protocol version: 0.1.1
[    4.265374] mana 7870:00:00.0 eth1: joined to eth0
[    4.268520] mana 7870:00:00.0 enP30832s1: renamed from eth1
[    6.164678] mana 7870:00:00.0: HWC: Failed hw_channel req: 0xe0000000
[    6.165271] mana 7870:00:00.0 mana_0: Failed modify qp err -71
[    6.165817] infiniband mana_0: Couldn't change QP1 state to RTS: -71
[    6.166477] infiniband mana_0: Couldn't start port
[    6.167321] infiniband mana_0: Couldn't open port 1
[    7.679577] mana 7870:00:00.0 enP30832s1: Configured vPort 0 PD 18 DB 16
[    7.687037] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[    7.690630] mana 7870:00:00.0 mana_0: Port: 1 Link ACTIVE
[    8.888716] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[    8.893162] mana 7870:00:00.0 mana_0: Port: 1 Link DOWN
[    9.070096] mana 7870:00:00.0 enP30832s1: Configured vPort 0 PD 18 DB 16
[    9.077499] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[    9.079573] mana 7870:00:00.0 mana_0: Port: 1 Link ACTIVE
[azureuser@shreeya-rlc10 ~]$ lsmod | grep hv_netvsc
hv_netvsc             126976  0
hv_vmbus              192512  9 hv_balloon,hv_utils,hv_netvsc,hid_hyperv,hv_storvsc,hyperv_keyboard,hyperv_drm,hv_sock,pci_hyperv
[azureuser@shreeya-rlc10 ~]$ ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 60:45:bd:d3:9a:fc brd ff:ff:ff:ff:ff:ff
    altname enx6045bdd39afc
    inet 10.9.0.4/24 brd 10.9.0.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::6245:bdff:fed3:9afc/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
[azureuser@shreeya-rlc10 ~]$ ip route show default
default via 10.9.0.1 dev eth0 proto dhcp src 10.9.0.4 metric 100 
[azureuser@shreeya-rlc10 ~]$ ping -c 4 10.9.0.4
PING 10.9.0.4 (10.9.0.4) 56(84) bytes of data.
64 bytes from 10.9.0.4: icmp_seq=1 ttl=64 time=0.032 ms
64 bytes from 10.9.0.4: icmp_seq=2 ttl=64 time=0.030 ms
64 bytes from 10.9.0.4: icmp_seq=3 ttl=64 time=0.028 ms
64 bytes from 10.9.0.4: icmp_seq=4 ttl=64 time=0.056 ms

--- 10.9.0.4 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3056ms
rtt min/avg/max/mdev = 0.028/0.036/0.056/0.011 ms
[azureuser@shreeya-rlc10 ~]$ ping -c 20 -s 1472 10.9.0.4
PING 10.9.0.4 (10.9.0.4) 1472(1500) bytes of data.
1480 bytes from 10.9.0.4: icmp_seq=1 ttl=64 time=0.027 ms
1480 bytes from 10.9.0.4: icmp_seq=2 ttl=64 time=0.029 ms
1480 bytes from 10.9.0.4: icmp_seq=3 ttl=64 time=0.043 ms
1480 bytes from 10.9.0.4: icmp_seq=4 ttl=64 time=0.059 ms
1480 bytes from 10.9.0.4: icmp_seq=5 ttl=64 time=0.063 ms
1480 bytes from 10.9.0.4: icmp_seq=6 ttl=64 time=0.059 ms
1480 bytes from 10.9.0.4: icmp_seq=7 ttl=64 time=0.055 ms
1480 bytes from 10.9.0.4: icmp_seq=8 ttl=64 time=0.055 ms
1480 bytes from 10.9.0.4: icmp_seq=9 ttl=64 time=0.062 ms
1480 bytes from 10.9.0.4: icmp_seq=10 ttl=64 time=0.043 ms
1480 bytes from 10.9.0.4: icmp_seq=11 ttl=64 time=0.045 ms
1480 bytes from 10.9.0.4: icmp_seq=12 ttl=64 time=0.055 ms
1480 bytes from 10.9.0.4: icmp_seq=13 ttl=64 time=0.057 ms
1480 bytes from 10.9.0.4: icmp_seq=14 ttl=64 time=0.059 ms
1480 bytes from 10.9.0.4: icmp_seq=15 ttl=64 time=0.059 ms
1480 bytes from 10.9.0.4: icmp_seq=16 ttl=64 time=0.056 ms
1480 bytes from 10.9.0.4: icmp_seq=17 ttl=64 time=0.051 ms
1480 bytes from 10.9.0.4: icmp_seq=18 ttl=64 time=0.066 ms
1480 bytes from 10.9.0.4: icmp_seq=19 ttl=64 time=0.066 ms
1480 bytes from 10.9.0.4: icmp_seq=20 ttl=64 time=0.056 ms

--- 10.9.0.4 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19466ms
rtt min/avg/max/mdev = 0.027/0.053/0.066/0.010 ms
[azureuser@shreeya-rlc10 ~]$ sudo dmesg | grep hv_netvsc
[    3.062384] hv_vmbus: registering driver hv_netvsc
[    3.071220] hv_netvsc f8615163-0000-1000-2000-6045bdd39afc (unnamed net_device) (uninitialized): VF slot 1 added
[    4.263903] hv_netvsc f8615163-0000-1000-2000-6045bdd39afc eth0: VF registering: eth1
[    7.689064] hv_netvsc f8615163-0000-1000-2000-6045bdd39afc eth0: Data path switched to VF: enP30832s1
[    8.887786] hv_netvsc f8615163-0000-1000-2000-6045bdd39afc eth0: Data path switched from VF: enP30832s1
[    9.078907] hv_netvsc f8615163-0000-1000-2000-6045bdd39afc eth0: Data path switched to VF: enP30832s1
[azureuser@shreeya-rlc10 ~]$ ip route show
default via 10.9.0.1 dev eth0 proto dhcp src 10.9.0.4 metric 100 
10.9.0.0/24 dev eth0 proto kernel scope link src 10.9.0.4 metric 100 
168.63.129.16 via 10.9.0.1 dev eth0 proto dhcp src 10.9.0.4 metric 100 
169.254.169.254 via 10.9.0.1 dev eth0 proto dhcp src 10.9.0.4 metric 100 
[azureuser@shreeya-rlc10 ~]$ lspci
7870:00:00.0 Ethernet controller: Microsoft Corporation Device 00ba
c05b:00:00.0 Non-Volatile memory controller: Microsoft Corporation Device 00a9
eae9:00:00.0 Non-Volatile memory controller: Microsoft Corporation Device b111 (rev 01)
[azureuser@shreeya-rlc10 ~]$ ethtool -S eth0 | grep -E "^[ \t]+vf"
     vf_rx_packets: 3482
     vf_rx_bytes: 568376
     vf_tx_packets: 3780
     vf_tx_bytes: 696303
     vf_tx_dropped: 0
[azureuser@shreeya-rlc10 ~]$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 60:45:bd:d3:9a:fc brd ff:ff:ff:ff:ff:ff
    alias Network Device
    altname enx6045bdd39afc
3: enP30832s1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master eth0 state UP mode DEFAULT group default qlen 1000
    link/ether 60:45:bd:d3:9a:fc brd ff:ff:ff:ff:ff:ff
    altname enP30832p0s0
[azureuser@shreeya-rlc10 ~]$ sudo ip addr add 10.9.0.4/24 dev enP30832s1
[azureuser@shreeya-rlc10 ~]$ sudo ip link set enP30832s1 up
[azureuser@shreeya-rlc10 ~]$ sudo ip route add 10.9.0.4/24 dev enP30832s1
Error: Invalid prefix for given prefix length.
[azureuser@shreeya-rlc10 ~]$ ip route show
default via 10.9.0.1 dev eth0 proto dhcp src 10.9.0.4 metric 100 
10.9.0.0/24 dev enP30832s1 proto kernel scope link src 10.9.0.4 
10.9.0.0/24 dev eth0 proto kernel scope link src 10.9.0.4 metric 100 
168.63.129.16 via 10.9.0.1 dev eth0 proto dhcp src 10.9.0.4 metric 100 
169.254.169.254 via 10.9.0.1 dev eth0 proto dhcp src 10.9.0.4 metric 100 
[azureuser@shreeya-rlc10 ~]$ ip -6 addr show dev enP30832s1
[azureuser@shreeya-rlc10 ~]$ sudo dmesg | grep mana
[    4.237789] mana 7870:00:00.0: enabling device (0000 -> 0002)
[    4.260477] mana 7870:00:00.0: Microsoft Azure Network Adapter protocol version: 0.1.1
[    4.265374] mana 7870:00:00.0 eth1: joined to eth0
[    4.268520] mana 7870:00:00.0 enP30832s1: renamed from eth1
[    6.164678] mana 7870:00:00.0: HWC: Failed hw_channel req: 0xe0000000
[    6.165271] mana 7870:00:00.0 mana_0: Failed modify qp err -71
[    6.165817] infiniband mana_0: Couldn't change QP1 state to RTS: -71
[    6.166477] infiniband mana_0: Couldn't start port
[    6.167321] infiniband mana_0: Couldn't open port 1
[    7.679577] mana 7870:00:00.0 enP30832s1: Configured vPort 0 PD 18 DB 16
[    7.687037] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[    7.690630] mana 7870:00:00.0 mana_0: Port: 1 Link ACTIVE
[    8.888716] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[    8.893162] mana 7870:00:00.0 mana_0: Port: 1 Link DOWN
[    9.070096] mana 7870:00:00.0 enP30832s1: Configured vPort 0 PD 18 DB 16
[    9.077499] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[    9.079573] mana 7870:00:00.0 mana_0: Port: 1 Link ACTIVE
[azureuser@shreeya-rlc10 ~]$ 

jira LE-4478
commit-author Shiraz Saleem <shirazsaleem@microsoft.com>
commit baa640d

Add support for mana device level statistics.

Co-developed-by: Solom Tamawy <solom.tamawy@microsoft.com>
	Signed-off-by: Solom Tamawy <solom.tamawy@microsoft.com>
	Signed-off-by: Shiraz Saleem <shirazsaleem@microsoft.com>
	Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://patch.msgid.link/1749559717-3424-1-git-send-email-kotaranov@linux.microsoft.com
	Reviewed-by: Long Li <longli@microsoft.com>
	Signed-off-by: Leon Romanovsky <leon@kernel.org>
(cherry picked from commit baa640d)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4467
commit-author Shradha Gupta <shradhagupta@linux.microsoft.com>
commit 5da8a8b

For supporting dynamic MSI-X vector allocation by PCI controllers, enabling
the flag MSI_FLAG_PCI_MSIX_ALLOC_DYN is not enough, msix_prepare_msi_desc()
to prepare the MSI descriptor is also needed.

Export pci_msix_prepare_desc() to allow PCI controllers to support dynamic
MSI-X vector allocation.

	Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
	Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
	Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
	Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
	Acked-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit 5da8a8b)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4467
commit-author Shradha Gupta <shradhagupta@linux.microsoft.com>
commit ad518f2

Allow dynamic MSI-X vector allocation for pci_hyperv PCI controller
by adding support for the flag MSI_FLAG_PCI_MSIX_ALLOC_DYN and using
pci_msix_prepare_desc() to prepare the MSI-X descriptors.

Feature support added for both x86 and ARM64

	Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
	Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
	Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
	Acked-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit ad518f2)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4467
commit-author Yury Norov <yury.norov@gmail.com>
commit 4607617

Commit 91bfe21 ("net: mana: add a function to spread IRQs per CPUs")
added the irq_setup() function that distributes IRQs on CPUs according
to a tricky heuristic. The corresponding commit message explains the
heuristic.

Duplicate it in the source code to make available for readers without
digging git in history. Also, add more detailed explanation about how
the heuristics is implemented.

	Signed-off-by: Yury Norov <yury.norov@gmail.com>
	Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
(cherry picked from commit 4607617)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4467
commit-author Shradha Gupta <shradhagupta@linux.microsoft.com>
commit 845c62c

In order to prepare the MANA driver to allocate the MSI-X IRQs
dynamically, we need to enhance irq_setup() to allow skipping
affinitizing IRQs to the first CPU sibling group.

This would be for cases when the number of IRQs is less than or equal
to the number of online CPUs. In such cases for dynamically added IRQs
the first CPU sibling group would already be affinitized with HWC IRQ.

	Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
	Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
	Reviewed-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
(cherry picked from commit 845c62c)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4467
commit-author Shradha Gupta <shradhagupta@linux.microsoft.com>
commit 7553911
upstream-diff There were conflicts seen when applying this patch
due to following commit present in our tree before this patch.
590bcf1 ("net: mana: Add handler for hardware servicing events")

Currently, the MANA driver allocates MSI-X vectors statically based on
MANA_MAX_NUM_QUEUES and num_online_cpus() values and in some cases ends
up allocating more vectors than it needs. This is because, by this time
we do not have a HW channel and do not know how many IRQs should be
allocated.

To avoid this, we allocate 1 MSI-X vector during the creation of HWC and
after getting the value supported by hardware, dynamically add the
remaining MSI-X vectors.

	Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
	Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
(cherry picked from commit 7553911)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4473
commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
commit 75cabb4

Introduce support for net_shaper_ops in the MANA driver,
enabling configuration of rate limiting on the MANA NIC.

To apply rate limiting, the driver issues a HWC command via
mana_set_bw_clamp() and updates the corresponding shaper object
in the net_shaper cache. If an error occurs during this process,
the driver restores the previous speed by querying the current link
configuration using mana_query_link_cfg().

The minimum supported bandwidth is 100 Mbps, and only values that are
exact multiples of 100 Mbps are allowed. Any other values are rejected.

To remove a shaper, the driver resets the bandwidth to the maximum
supported by the SKU using mana_set_bw_clamp() and clears the
associated cache entry. If an error occurs during this process,
the shaper details are retained.

On the hardware that does not support these APIs, the net-shaper
calls to set speed would fail.

Set the speed:
./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/net_shaper.yaml \
 --do set --json '{"ifindex":'$IFINDEX',
		   "handle":{"scope": "netdev", "id":'$ID' },
		   "bw-max": 200000000 }'

Get the shaper details:
./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/net_shaper.yaml \
 --do get --json '{"ifindex":'$IFINDEX',
		      "handle":{"scope": "netdev", "id":'$ID' }}'

> {'bw-max': 200000000,
> 'handle': {'scope': 'netdev'},
> 'ifindex': $IFINDEX,
> 'metric': 'bps'}

Delete the shaper object:
./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/net_shaper.yaml \
 --do delete --json '{"ifindex":'$IFINDEX',
		      "handle":{"scope": "netdev","id":'$ID' }}'

	Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
	Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
	Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
	Reviewed-by: Saurabh Singh Sengar <ssengar@linux.microsoft.com>
	Reviewed-by: Long Li <longli@microsoft.com>
Link: https://patch.msgid.link/1750144656-2021-3-git-send-email-ernis@linux.microsoft.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit 75cabb4)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4473
commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
commit a6d5edf

Allow mana ethtool get_link_ksettings operation to report
the maximum speed supported by the SKU in mbps.

The driver retrieves this information by issuing a
HWC command to the hardware via mana_query_link_cfg(),
which retrieves the SKU's maximum supported speed.

These APIs when invoked on hardware that are older/do
not support these APIs, the speed would be reported as UNKNOWN.

Before:
$ethtool enP30832s1
> Settings for enP30832s1:
        Supported ports: [  ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Full
        Auto-negotiation: off
        Port: Other
        PHYAD: 0
        Transceiver: internal
        Link detected: yes

After:
$ethtool enP30832s1
> Settings for enP30832s1:
        Supported ports: [  ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 16000Mb/s
        Duplex: Full
        Auto-negotiation: off
        Port: Other
        PHYAD: 0
        Transceiver: internal
        Link detected: yes

	Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
	Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
	Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
	Reviewed-by: Saurabh Singh Sengar <ssengar@linux.microsoft.com>
	Reviewed-by: Long Li <longli@microsoft.com>
Link: https://patch.msgid.link/1750144656-2021-4-git-send-email-ernis@linux.microsoft.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit a6d5edf)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4473
commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
commit ca8ac48
upstream-diff There were conflicts seen when applying this
patch due to the following patch being in our tree before
this one.
7a3c235 ("net: mana: Handle Reset Request from MANA NIC")

If any of the HWC commands are not recognized by the
underlying hardware, the hardware returns the response
header status of -1. Log the information using
netdev_info_once to avoid multiple error logs in dmesg.

	Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
	Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
	Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
	Reviewed-by: Saurabh Singh Sengar <ssengar@linux.microsoft.com>
	Reviewed-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
Link: https://patch.msgid.link/1750144656-2021-5-git-send-email-ernis@linux.microsoft.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit ca8ac48)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4473
commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
commit 11cd020

Fix build errors when CONFIG_NET_SHAPER is disabled, including:

drivers/net/ethernet/microsoft/mana/mana_en.c:804:10: error:
'const struct net_device_ops' has no member named 'net_shaper_ops'

     804 |         .net_shaper_ops         = &mana_shaper_ops,

drivers/net/ethernet/microsoft/mana/mana_en.c:804:35: error:
initialization of 'int (*)(struct net_device *, struct neigh_parms *)'
from incompatible pointer type 'const struct net_shaper_ops *'
[-Werror=incompatible-pointer-types]

     804 |         .net_shaper_ops         = &mana_shaper_ops,

	Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Fixes: 75cabb4 ("net: mana: Add support for net_shaper_ops")
	Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506230625.bfUlqb8o-lkp@intel.com/
	Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/1750851355-8067-1-git-send-email-ernis@linux.microsoft.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 11cd020)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4527
commit-author Zhiyue Qiu <zhiyueqiu@microsoft.com>
commit 084f35b

Add packet and request port counters to mana_ib.

	Signed-off-by: Zhiyue Qiu <zhiyueqiu@microsoft.com>
	Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://patch.msgid.link/1752143395-5324-1-git-send-email-kotaranov@linux.microsoft.com
	Reviewed-by: Long Li <longli@microsoft.com>
	Signed-off-by: Leon Romanovsky <leon@kernel.org>
(cherry picked from commit 084f35b)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4524
commit-author Konstantin Taranov <kotaranov@microsoft.com>
commit 44d69d3

Drain send WRs of the GSI QP on device removal.

In rare servicing scenarios, the hardware may delete the
state of the GSI QP, preventing it from generating CQEs
for pending send WRs. Since WRs submitted to the GSI QP
hold CM resources, the device cannot be removed until
those WRs are completed. This patch marks all pending
send WRs as failed, allowing the GSI QP to release the CM
resources and enabling safe device removal.

	Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://patch.msgid.link/1753779618-23629-1-git-send-email-kotaranov@linux.microsoft.com
	Signed-off-by: Leon Romanovsky <leon@kernel.org>
(cherry picked from commit 44d69d3)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
…nnel open.

jira LE-4494
commit-author Dipayaan Roy <dipayanroy@linux.microsoft.com>
commit 9448ccd

The hv_netvsc driver currently enables NAPI after opening the primary and
subchannels. This ordering creates a race: if the Hyper-V host places data
in the host -> guest ring buffer and signals the channel before
napi_enable() has been called, the channel callback will run but
napi_schedule_prep() will return false. As a result, the NAPI poller never
gets scheduled, the data in the ring buffer is not consumed, and the
receive queue may remain permanently stuck until another interrupt happens
to arrive.

Fix this by enabling NAPI and registering it with the RX/TX queues before
vmbus channel is opened. This guarantees that any early host signal after
open will correctly trigger NAPI scheduling and the ring buffer will be
drained.

Fixes: 76bb5db ("netvsc: fix use after free on module removal")
	Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
Link: https://patch.msgid.link/20250825115627.GA32189@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 9448ccd)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4497
commit-author Haiyang Zhang <haiyangz@microsoft.com>
commit c4deabb

If HW Channel (HWC) is not responding, reduce the waiting time, so further
steps will fail quickly.
This will prevent getting stuck for a long time (30 minutes or more), for
example, during unloading while HWC is not responding.

	Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Link: https://patch.msgid.link/1757537841-5063-1-git-send-email-haiyangz@linux.microsoft.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit c4deabb)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4521
commit-author Shiraz Saleem <shirazsaleem@microsoft.com>
commit 2bd7dd3

Extend modify QP to support further attributes: local_ack_timeout, UD qkey,
rate_limit, qp_access_flags, flow_label, max_rd_atomic.

	Signed-off-by: Shiraz Saleem <shirazsaleem@microsoft.com>
	Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://patch.msgid.link/1757923172-4475-1-git-send-email-kotaranov@linux.microsoft.com
	Signed-off-by: Leon Romanovsky <leon@kernel.org>
(cherry picked from commit 2bd7dd3)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
…/O issuing CPU

jira LE-4537
commit-author Long Li <longli@microsoft.com>
commit b69ffea

When selecting an outgoing channel for I/O, storvsc tries to select a
channel with a returning CPU that is not the same as issuing CPU. This
worked well in the past, however it doesn't work well when the Hyper-V
exposes a large number of channels (up to the number of all CPUs). Use a
different CPU for returning channel is not efficient on Hyper-V.

Change this behavior by preferring to the channel with the same CPU as
the current I/O issuing CPU whenever possible.

Tests have shown improvements in newer Hyper-V/Azure environment, and no
regression with older Hyper-V/Azure environments.

	Tested-by: Raheel Abdul Faizy <rabdulfaizy@microsoft.com>
	Signed-off-by: Long Li <longli@microsoft.com>
Message-Id: <1759381530-7414-1-git-send-email-longli@linux.microsoft.com>
	Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit b69ffea)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
@shreeya-patel98 shreeya-patel98 self-assigned this Jan 11, 2026
@shreeya-patel98 shreeya-patel98 requested a review from a team January 12, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants