]> git.ipfire.org Git - thirdparty/linux.git/commit
Merge branch 'support-bandwidth-clamping-in-mana-using-net-shapers'
authorPaolo Abeni <pabeni@redhat.com>
Thu, 19 Jun 2025 13:13:51 +0000 (15:13 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 19 Jun 2025 13:13:51 +0000 (15:13 +0200)
commitcf11cf12a1e22364c4c63ed603606876c1845cb9
tree166809e814a39f9dbe4ef05ac71f8bc5ecbd5dbb
parentd3623dd5bd4e1fc9acfc08dd0064658bbbf1e8de
parentca8ac489ca33c986ff02ee14c3e1c10b86355428
Merge branch 'support-bandwidth-clamping-in-mana-using-net-shapers'

Erni Sri Satya Vennela says:

====================
Support bandwidth clamping in mana using net shapers

This patchset introduces hardware-backed bandwidth rate limiting
for MANA NICs via the net_shaper_ops interface, enabling efficient and
fine-grained traffic shaping directly on the device.

Previously, MANA lacked a mechanism for user-configurable bandwidth
control. With this addition, users can now configure shaping parameters,
allowing better traffic management and performance isolation.

The implementation includes the net_shaper_ops callbacks in the MANA
driver and supports one shaper per vport. Add shaping support via
mana_set_bw_clamp(), allowing the configuration of bandwidth rates
in 100 Mbps increments (minimum 100 Mbps). The driver validates input
and rejects unsupported values. On failure, it restores the previous
configuration which is queried using mana_query_link_cfg() or
retains the current state.

To prevent potential deadlocks introduced by net_shaper_ops, switch to
_locked variants of NAPI APIs when netdevops_lock is held during
VF setup and teardown.

Also, Add support for ethtool get_link_ksettings to report the maximum
link speed supported by the SKU in mbps.

These APIs when invoked on hardware that are older or that do
not support these APIs, the speed would be reported as UNKNOWN and
the net-shaper calls to set speed would fail.
====================

Link: https://patch.msgid.link/1750144656-2021-1-git-send-email-ernis@linux.microsoft.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>