netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Maxim Mikityanskiy <maximmi@mellanox.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: Tariq Toukan <tariqt@nvidia.com>,
	Yossi Kuperman <yossiku@nvidia.com>,
	Maxim Mikityanskiy <maximmi@nvidia.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH iproute2-next v3] tc/htb: Hierarchical QoS hardware offload
Date: Thu, 4 Feb 2021 21:57:52 -0700	[thread overview]
Message-ID: <acd468c6-c3cd-f7eb-7ef8-0d029f198feb@gmail.com> (raw)
In-Reply-To: <20210204145137.165298-1-maximmi@mellanox.com>

On 2/4/21 7:51 AM, Maxim Mikityanskiy wrote:
> This commit adds support for configuring HTB in offload mode. HTB
> offload eliminates the single qdisc lock in the datapath and offloads
> the algorithm to the NIC. The new 'offload' parameter is added to
> enable this mode:
> 
>     # tc qdisc replace dev eth0 root handle 1: htb offload
> 
> Classes are created as usual, but filters should be moved to clsact for
> lock-free classification (filters attached to HTB itself are not
> supported in the offload mode):
> 
>     # tc filter add dev eth0 egress protocol ip flower dst_port 80
>     action skbedit priority 1:10
> 
> tc qdisc show and tc class show will indicate whether the offload is
> enabled. Example output:
> 
> $ tc qdisc show dev eth1
> qdisc htb 1: root offloaded r2q 10 default 0 direct_packets_stat 0 direct_qlen 1000 offload
> qdisc pfifo 0: parent 1: limit 1000p
> qdisc pfifo 0: parent 1: limit 1000p
> qdisc pfifo 0: parent 1: limit 1000p
> qdisc pfifo 0: parent 1: limit 1000p
> qdisc pfifo 0: parent 1: limit 1000p
> qdisc pfifo 0: parent 1: limit 1000p
> qdisc pfifo 0: parent 1: limit 1000p
> qdisc pfifo 0: parent 1: limit 1000p
> $ tc class show dev eth1
> class htb 1:101 parent 1:1 prio 0 rate 4Gbit ceil 4Gbit burst 1000b cburst 1000b  offload
> class htb 1:1 root rate 100Gbit ceil 100Gbit burst 0b cburst 0b  offload
> class htb 1:103 parent 1:1 prio 0 rate 4Gbit ceil 4Gbit burst 1000b cburst 1000b  offload
> class htb 1:102 parent 1:1 prio 0 rate 4Gbit ceil 4Gbit burst 1000b cburst 1000b  offload
> class htb 1:105 parent 1:1 prio 0 rate 4Gbit ceil 4Gbit burst 1000b cburst 1000b  offload
> class htb 1:104 parent 1:1 prio 0 rate 4Gbit ceil 4Gbit burst 1000b cburst 1000b  offload
> class htb 1:107 parent 1:1 prio 0 rate 4Gbit ceil 4Gbit burst 1000b cburst 1000b  offload
> class htb 1:106 parent 1:1 prio 0 rate 4Gbit ceil 4Gbit burst 1000b cburst 1000b  offload
> class htb 1:108 parent 1:1 prio 0 rate 4Gbit ceil 4Gbit burst 1000b cburst 1000b  offload
> $ tc -j qdisc show dev eth1
> [{"kind":"htb","handle":"1:","root":true,"offloaded":true,"options":{"r2q":10,"default":"0","direct_packets_stat":0,"direct_qlen":1000,"offload":null}},{"kind":"pfifo","handle":"0:","parent":"1:","options":{"limit":1000}},{"kind":"pfifo","handle":"0:","parent":"1:","options":{"limit":1000}},{"kind":"pfifo","handle":"0:","parent":"1:","options":{"limit":1000}},{"kind":"pfifo","handle":"0:","parent":"1:","options":{"limit":1000}},{"kind":"pfifo","handle":"0:","parent":"1:","options":{"limit":1000}},{"kind":"pfifo","handle":"0:","parent":"1:","options":{"limit":1000}},{"kind":"pfifo","handle":"0:","parent":"1:","options":{"limit":1000}},{"kind":"pfifo","handle":"0:","parent":"1:","options":{"limit":1000}}]
> 
> Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
> Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
> ---
>  man/man8/tc-htb.8 |  5 ++++-
>  tc/q_htb.c        | 10 +++++++++-
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 

applied to iproute2-next. Thanks



      reply	other threads:[~2021-02-05  4:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 14:51 [PATCH iproute2-next v3] tc/htb: Hierarchical QoS hardware offload Maxim Mikityanskiy
2021-02-05  4:57 ` David Ahern [this message]

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=acd468c6-c3cd-f7eb-7ef8-0d029f198feb@gmail.com \
    --to=dsahern@gmail.com \
    --cc=maximmi@mellanox.com \
    --cc=maximmi@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=tariqt@nvidia.com \
    --cc=yossiku@nvidia.com \
    /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).