netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
	decui@microsoft.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	longli@microsoft.com, kotaranov@microsoft.com, horms@kernel.org,
	mhklinux@outlook.com, pasha.tatashin@soleen.com,
	ernis@linux.microsoft.com, kent.overstreet@linux.dev,
	brett.creeley@amd.com, schakrabarti@linux.microsoft.com,
	shradhagupta@linux.microsoft.com, ssengar@linux.microsoft.com,
	leon@kernel.org, rosenp@gmail.com, paulros@microsoft.com,
	linux-hyperv@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: [PATCH v2 0/3] net: mana: Add HTB Qdisc offload support
Date: Sun, 20 Apr 2025 23:33:37 -0700	[thread overview]
Message-ID: <1745217220-11468-1-git-send-email-ernis@linux.microsoft.com> (raw)

Introduce support for HTB Qdisc offload on the mana ethernet 
controller to enable bandwidth clamping for egress traffic.

The controller offloads only one HTB leaf to support bandwidth
clamping on the hardware. This involves calling the function 
mana_set_bw_clamp() which internally calls a HWC command 
to the hardware to set the speed.

The minimum supported bandwidth is 100 Mbps, and only multiples
of 100 Mbps are supported by the hardware. The speed will be reset to
maximum bandwidth supported by the SKU, when the HTB leaf is deleted.

Also add speed support in mana_get_link_ksettings to display speed in the
standard port information using ethtool. This involves calling
mana_query_link_config(), which internally sends a HWC command to
the hardware to query speed information.

Note that this feature is not supported by all hardware.

---
Changes in v2:
* Use -EOPNOTSUPP instead of -EPROTO in mana_query_link_cfg() 
  and mana_set_bw_clamp()
* Change link_speed to link_speed_mbps in struct mana_set_bw_clamp_req.
---
Erni Sri Satya Vennela (3):
  net: mana: Add speed support in mana_get_link_ksettings
  net: mana: Add sched HTB offload support
  net: mana: Handle unsupported HWC commands

 .../net/ethernet/microsoft/mana/hw_channel.c  |   4 +
 drivers/net/ethernet/microsoft/mana/mana_en.c | 191 ++++++++++++++++++
 .../ethernet/microsoft/mana/mana_ethtool.c    |   6 +
 include/net/mana/mana.h                       |  36 ++++
 4 files changed, 237 insertions(+)

-- 
2.34.1


             reply	other threads:[~2025-04-21  6:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-21  6:33 Erni Sri Satya Vennela [this message]
2025-04-21  6:33 ` [PATCH v2 1/3] net: mana: Add speed support in mana_get_link_ksettings Erni Sri Satya Vennela
2025-04-21 12:36   ` Andrew Lunn
2025-04-21 18:14     ` Erni Sri Satya Vennela
2025-04-21  6:33 ` [PATCH v2 2/3] net: mana: Add sched HTB offload support Erni Sri Satya Vennela
2025-04-22  0:03   ` Jakub Kicinski
2025-04-22 19:48     ` Erni Sri Satya Vennela
2025-04-23  0:18       ` Jakub Kicinski
2025-04-23 15:27         ` [EXTERNAL] " Haiyang Zhang
2025-04-23 21:57           ` Jakub Kicinski
2025-04-21  6:33 ` [PATCH v2 3/3] net: mana: Handle unsupported HWC commands Erni Sri Satya Vennela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1745217220-11468-1-git-send-email-ernis@linux.microsoft.com \
    --to=ernis@linux.microsoft.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=decui@microsoft.com \
    --cc=edumazet@google.com \
    --cc=haiyangz@microsoft.com \
    --cc=horms@kernel.org \
    --cc=kent.overstreet@linux.dev \
    --cc=kotaranov@microsoft.com \
    --cc=kuba@kernel.org \
    --cc=kys@microsoft.com \
    --cc=leon@kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=mhklinux@outlook.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=paulros@microsoft.com \
    --cc=rosenp@gmail.com \
    --cc=schakrabarti@linux.microsoft.com \
    --cc=shradhagupta@linux.microsoft.com \
    --cc=ssengar@linux.microsoft.com \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).