Skip to content

Conversation

shreeya-patel98
Copy link
Collaborator

Commit Messages

    net: mana: Handle Reset Request from MANA NIC
    
    jira LE-3924
    commit-author Haiyang Zhang <[email protected]>
    commit fbe346ce9d626680a4dd0f079e17c7b5dd32ffad
    upstream-diff There were conflicts seen when applying this
    patch due to the following missing commits :-
    ca8ac489ca33 ("net: mana: Handle unsupported HWC commands")
    505cc26bcae0 ("net: mana: Add support for auxiliary device servicing
    events")
    
    Upon receiving the Reset Request, pause the connection and clean up
    queues, wait for the specified period, then resume the NIC.
    In the cleanup phase, the HWC is no longer responding, so set hwc_timeout
    to zero to skip waiting on the response.
    
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

    net: mana: Add handler for hardware servicing events
    
    jira LE-3920
    commit-author Haiyang Zhang <[email protected]>
    commit 7768c5f417336fa58dbfef9bb7ecd7eeec6d8886
    
    To collaborate with hardware servicing events, upon receiving the special
    EQE notification from the HW channel, remove the devices on this bus.
    Then, after a waiting period based on the device specs, rescan the parent
    bus to recover the devices.
    
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––


    net: mana: Expose additional hardware counters for drop and TC via ethtool.
    
    jira LE-3916
    commit-author Dipayaan Roy <[email protected]>
    commit c09ef59e17c6921c577d54bc8da4331b955d01a7
    
    Add support for reporting additional hardware counters for drop and
    TC using the ethtool -S interface.
    
    These counters include:
    
    - Aggregate Rx/Tx drop counters
    - Per-TC Rx/Tx packet counters
    - Per-TC Rx/Tx byte counters
    - Per-TC Rx/Tx pause frame counters
    
    The counters are exposed using ethtool_ops->get_ethtool_stats and
    ethtool_ops->get_strings. This feature/counters are not available
    to all versions of hardware.
    

Kernel Build

/home/rocky/workspace/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="-shreeya_sig-cloud-10_6.12.0-55.27.1.el10_0-6e3de78e39"
Making olddefconfig
#
# configuration written to .config
#
Starting Build
  SYNC    include/config/auto.conf
mkdir -p /home/rocky/workspace/kernel-src-tree/tools/bpf/resolve_btfids && make O=/home/rocky/workspace/kernel-src-tree subdir=tools/bpf/resolve_btfids --no-print-directory -C bpf/resolve_btfids 
mkdir -p /home/rocky/workspace/kernel-src-tree/tools/objtool && make O=/home/rocky/workspace/kernel-src-tree subdir=tools/objtool --no-print-directory -C objtool 
  INSTALL libsubcmd_headers
  INSTALL libsubcmd_headers
  CALL    scripts/checksyscalls.sh
  CC      mm/show_mem.o
  CC      fs/fs-writeback.o
  CC      mm/interval_tree.o
  CC      kernel/smpboot.o
  CC      mm/list_lru.o
  CC      security/selinux/netlink.o
  CC      crypto/rsapubkey.asn1.o
  CC      arch/x86/hyperv/hv_init.o
  <--snip-->  
net/qrtr/qrtr.ko
  SIGN    /lib/modules/6.12.0-shreeya_sig-cloud-10_6.12.0-55.27.1.el10_0-6e3de78e39+/kernel/net/qrtr/qrtr-mhi.ko
  SIGN    /lib/modules/6.12.0-shreeya_sig-cloud-10_6.12.0-55.27.1.el10_0-6e3de78e39+/kernel/net/hsr/hsr.ko
  DEPMOD  /lib/modules/6.12.0-shreeya_sig-cloud-10_6.12.0-55.27.1.el10_0-6e3de78e39+
[TIMER]{MODULES}: 11s
Making Install
  INSTALL /boot
[TIMER]{INSTALL}: 21s
Checking kABI
kABI check passed
Setting Default Kernel to /boot/vmlinuz-6.12.0-shreeya_sig-cloud-10_6.12.0-55.27.1.el10_0-6e3de78e39+ and Index to 2
The default is /boot/loader/entries/84036c9f517e49babbf8bc36ab6de809-6.12.0-shreeya_sig-cloud-10_6.12.0-55.27.1.el10_0-6e3de78e39+.conf with index 2 and kernel /boot/vmlinuz-6.12.0-shreeya_sig-cloud-10_6.12.0-55.27.1.el10_0-6e3de78e39+
The default is /boot/loader/entries/84036c9f517e49babbf8bc36ab6de809-6.12.0-shreeya_sig-cloud-10_6.12.0-55.27.1.el10_0-6e3de78e39+.conf with index 2 and kernel /boot/vmlinuz-6.12.0-shreeya_sig-cloud-10_6.12.0-55.27.1.el10_0-6e3de78e39+
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}: 1708s
[TIMER]{MODULES}: 11s
[TIMER]{INSTALL}: 21s
[TIMER]{TOTAL} 1742s
Rebooting in 10 seconds

kernel-build.log

Kselftest

[rocky@shreeya-scn10 workspace]$ grep '^ok ' kselftest-before.log | wc -l && grep '^ok ' kselftest-after.log | wc -l
524
523
[rocky@shreeya-scn10 workspace]$ grep '^not ok ' kselftest-before.log | wc -l && grep '^not ok ' kselftest-after.log | wc -l
133
134

Note :- Failure is not related to the changes

kselftest-after.log
kselftest-before.log

Testing

[rocky@shreeya-scn10 kernel-src-tree]$ sudo dmesg | grep mana
[    9.493409] mana 7870:00:00.0: enabling device (0000 -> 0002)
[    9.514951] mana 7870:00:00.0: Microsoft Azure Network Adapter protocol version: 0.1.1
[    9.536882] mana 7870:00:00.0 eth1: joined to eth0
[    9.550749] mana 7870:00:00.0 enP30832s1: renamed from eth1
[   11.259958] mana 7870:00:00.0 enP30832s1: Configured vPort 0 PD 18 DB 16
[   11.268452] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[   13.341136] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[   13.538456] mana 7870:00:00.0 enP30832s1: Configured vPort 0 PD 18 DB 16
[   13.547304] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[rocky@shreeya-scn10 kernel-src-tree]$ lspci
7870:00:00.0 Ethernet controller: Microsoft Corporation Device 00ba
bdb2:00:00.0 Non-Volatile memory controller: Microsoft Corporation Device b111 (rev 01)
c05b:00:00.0 Non-Volatile memory controller: Microsoft Corporation Device 00a9
[rocky@shreeya-scn10 kernel-src-tree]$ 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 00:0d:3a:8e:ba:c0 brd ff:ff:ff:ff:ff:ff
    alias Network Device
    altname enx000d3a8ebac0
3: enP30832s1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master eth0 state UP mode DEFAULT group default qlen 1000
    link/ether 00:0d:3a:8e:ba:c0 brd ff:ff:ff:ff:ff:ff
    altname enP30832p0s0
[rocky@shreeya-scn10 kernel-src-tree]$ ethtool -S eth0 | grep -E "^[ \t]+vf"
     vf_rx_packets: 682338
     vf_rx_bytes: 129069527
     vf_tx_packets: 747058
     vf_tx_bytes: 172370052
     vf_tx_dropped: 0
[rocky@shreeya-scn10 kernel-src-tree]$ sudo rmmod mana_ib
[rocky@shreeya-scn10 kernel-src-tree]$ sudo rmmod mana
[rocky@shreeya-scn10 kernel-src-tree]$ 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 00:0d:3a:8e:ba:c0 brd ff:ff:ff:ff:ff:ff
    alias Network Device
    altname enx000d3a8ebac0
[rocky@shreeya-scn10 kernel-src-tree]$ sudo modprobe mana
[rocky@shreeya-scn10 kernel-src-tree]$ sudo modprobe mana_ib
[rocky@shreeya-scn10 kernel-src-tree]$ 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 00:0d:3a:8e:ba:c0 brd ff:ff:ff:ff:ff:ff
    alias Network Device
    altname enx000d3a8ebac0
4: enP30832s1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master eth0 state UP mode DEFAULT group default qlen 1000
    link/ether 00:0d:3a:8e:ba:c0 brd ff:ff:ff:ff:ff:ff
    altname enP30832p0s0
[rocky@shreeya-scn10 kernel-src-tree]$ sudo dmesg | grep mana
[    9.493409] mana 7870:00:00.0: enabling device (0000 -> 0002)
[    9.514951] mana 7870:00:00.0: Microsoft Azure Network Adapter protocol version: 0.1.1
[    9.536882] mana 7870:00:00.0 eth1: joined to eth0
[    9.550749] mana 7870:00:00.0 enP30832s1: renamed from eth1
[   11.259958] mana 7870:00:00.0 enP30832s1: Configured vPort 0 PD 18 DB 16
[   11.268452] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[   13.341136] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[   13.538456] mana 7870:00:00.0 enP30832s1: Configured vPort 0 PD 18 DB 16
[   13.547304] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[57758.593409] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[57793.263103] mana 7870:00:00.0: Microsoft Azure Network Adapter protocol version: 0.1.1
[57793.271757] mana 7870:00:00.0 eth1: joined to eth0
[57793.281197] mana 7870:00:00.0 enP30832s1: renamed from eth1
[57793.377923] mana 7870:00:00.0 enP30832s1: Configured vPort 0 PD 18 DB 16
[57793.388011] mana 7870:00:00.0 enP30832s1: Configured steering vPort 0 entries 64
[rocky@shreeya-scn10 kernel-src-tree]$ 
    

…htool.

jira LE-3916
commit-author Dipayaan Roy <[email protected]>
commit c09ef59

Add support for reporting additional hardware counters for drop and
TC using the ethtool -S interface.

These counters include:

- Aggregate Rx/Tx drop counters
- Per-TC Rx/Tx packet counters
- Per-TC Rx/Tx byte counters
- Per-TC Rx/Tx pause frame counters

The counters are exposed using ethtool_ops->get_ethtool_stats and
ethtool_ops->get_strings. This feature/counters are not available
to all versions of hardware.

	Signed-off-by: Dipayaan Roy <[email protected]>
	Reviewed-by: Subbaraya Sundeep <[email protected]>
	Reviewed-by: Haiyang Zhang <[email protected]>
Link: https://patch.msgid.link/20250609100103.GA7102@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
	Signed-off-by: Jakub Kicinski <[email protected]>
(cherry picked from commit c09ef59)
	Signed-off-by: Shreeya Patel <[email protected]>
jira LE-3920
commit-author Haiyang Zhang <[email protected]>
commit 7768c5f

To collaborate with hardware servicing events, upon receiving the special
EQE notification from the HW channel, remove the devices on this bus.
Then, after a waiting period based on the device specs, rescan the parent
bus to recover the devices.

	Signed-off-by: Haiyang Zhang <[email protected]>
	Reviewed-by: Shradha Gupta <[email protected]>
	Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Signed-off-by: Jakub Kicinski <[email protected]>
(cherry picked from commit 7768c5f)
	Signed-off-by: Shreeya Patel <[email protected]>
Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you may have picked up a couple of lines accidently in one patch (commented)

if (err || resp->status) {
if (req->req.msg_type != MANA_QUERY_PHY_STAT)
if (err == -EOPNOTSUPP)
return err;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was adding these two lines intentional? I don't think they are part of this changeset

jira LE-3924
commit-author Haiyang Zhang <[email protected]>
commit fbe346c
upstream-diff There were conflicts seen when applying this
patch due to the following missing commits :-
ca8ac48 ("net: mana: Handle unsupported HWC commands")
505cc26 ("net: mana: Add support for auxiliary device servicing
events")

Upon receiving the Reset Request, pause the connection and clean up
queues, wait for the specified period, then resume the NIC.
In the cleanup phase, the HWC is no longer responding, so set hwc_timeout
to zero to skip waiting on the response.

	Signed-off-by: Haiyang Zhang <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Signed-off-by: Jakub Kicinski <[email protected]>
(cherry picked from commit fbe346c)
	Signed-off-by: Shreeya Patel <[email protected]>
@shreeya-patel98 shreeya-patel98 force-pushed the {shreeya}_sig-cloud-10/6.12.0-55.27.1.el10_0 branch from 38fdbdb to bc7f299 Compare September 5, 2025 13:15
Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

Copy link
Collaborator

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@shreeya-patel98 shreeya-patel98 merged commit e39cb4e into sig-cloud-10/6.12.0-55.27.1.el10_0 Sep 5, 2025
4 checks passed
@shreeya-patel98 shreeya-patel98 deleted the {shreeya}_sig-cloud-10/6.12.0-55.27.1.el10_0 branch September 5, 2025 15:19
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.

3 participants