All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bowers, AndrewX <andrewx.bowers@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [RFC PATCH v3 1/6] mqprio: Introduce new hardware offload mode and shaper in mqprio
Date: Wed, 13 Sep 2017 21:43:31 +0000	[thread overview]
Message-ID: <26D9FDECA4FBDD4AADA65D8E2FC68A4A10EAA2A7@ORSMSX104.amr.corp.intel.com> (raw)
In-Reply-To: <150478200636.24662.17572491925361676670.stgit@anamdev.jf.intel.com>

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Amritha Nambiar
> Sent: Thursday, September 7, 2017 4:00 AM
> To: intel-wired-lan at lists.osuosl.org; Kirsher, Jeffrey T
> <jeffrey.t.kirsher@intel.com>
> Cc: netdev at vger.kernel.org
> Subject: [Intel-wired-lan] [RFC PATCH v3 1/6] mqprio: Introduce new
> hardware offload mode and shaper in mqprio
> 
> The offload types currently supported in mqprio are 0 (no offload) and
> 1 (offload only TCs) by setting these values for the 'hw' option. If offloads are
> supported by setting the 'hw' option to 1, the default offload mode is 'dcb'
> where only the TC values are offloaded to the device. This patch introduces a
> new hardware offload mode called 'channel' with 'hw' set to 1 in mqprio
> which makes full use of the mqprio options, the TCs, the queue
> configurations and the QoS parameters for the TCs. This is achieved through
> a new netlink attribute for the 'mode' option which takes values such as 'dcb'
> (default) and 'channel'.
> The 'channel' mode also supports QoS attributes for traffic class such as
> minimum and maximum values for bandwidth rate limits.
> 
> This patch enables configuring additional HW shaper attributes associated
> with a traffic class. Currently the shaper for bandwidth rate limiting is
> supported which takes options such as minimum and maximum bandwidth
> rates and are offloaded to the hardware in the 'channel' mode. The min and
> max limits for bandwidth rates are provided by the user along with the the
> TCs and the queue configurations when creating the mqprio qdisc. The
> interface can be extended to support new HW shapers in future through the
> 'shaper'
> attribute.
> 
> Introduces a new datastructure 'tc_mqprio_qopt_offload' for offloading
> mqprio queue options and use this to be shared between the kernel and
> device driver. This contains a copy of the exisiting datastructure for mqprio
> queue options. This new datastructure can be extended when adding new
> attributes for traffic class such as mode, shaper, shaper parameters
> (bandwidth rate limits). The existing datastructure for mqprio queue options
> will be shared between the kernel and userspace.
> 
> Example:
> # tc qdisc add dev eth0 root mqprio num_tc 2 map 0 0 0 0 1 1 1 1\
>   queues 4 at 0 4 at 4 hw 1 mode channel shaper bw_rlimit\
>   min_rate 1Gbit 2Gbit max_rate 4Gbit 5Gbit
> 
> To dump the bandwidth rates:
> 
> # tc qdisc show dev eth0
> 
> qdisc mqprio 804a: root  tc 2 map 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0
>              queues:(0:3) (4:7)
>              mode:channel
>              shaper:bw_rlimit   min_rate:1Gbit 2Gbit   max_rate:4Gbit 5Gbit
> 
> v3 : Removed supporting new offloads through value 2 for 'hw' option,
> introduced new netlink based options for offload mode and HW shaper.
> v2 : Jiri's changes accepted upstream removes the struct tc_to_netdev. Clean
> up the full offload related changes added to
> mqprio_init() and mqprio_destroy() to rebase on these changes.
> 
> Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
> ---
>  include/net/pkt_cls.h          |    9 ++
>  include/uapi/linux/pkt_sched.h |   32 +++++++
>  net/sched/sch_mqprio.c         |  183
> ++++++++++++++++++++++++++++++++++++++--
>  3 files changed, 215 insertions(+), 9 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



  reply	other threads:[~2017-09-13 21:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 11:00 [RFC PATCH v3 0/6] Configuring traffic classes via new hardware offload mechanism in tc/mqprio Amritha Nambiar
2017-09-07 11:00 ` [Intel-wired-lan] " Amritha Nambiar
2017-09-07 11:00 ` [RFC PATCH v3 1/6] mqprio: Introduce new hardware offload mode and shaper in mqprio Amritha Nambiar
2017-09-07 11:00   ` [Intel-wired-lan] " Amritha Nambiar
2017-09-13 21:43   ` Bowers, AndrewX [this message]
2017-09-07 11:00 ` [RFC PATCH v3 2/6] i40e: Add macro for PF reset bit Amritha Nambiar
2017-09-07 11:00   ` [Intel-wired-lan] " Amritha Nambiar
2017-09-13 21:44   ` Bowers, AndrewX
2017-09-07 11:00 ` [RFC PATCH v3 3/6] i40e: Add infrastructure for queue channel support Amritha Nambiar
2017-09-07 11:00   ` [Intel-wired-lan] " Amritha Nambiar
2017-09-13 21:44   ` Bowers, AndrewX
2017-09-07 11:00 ` [RFC PATCH v3 4/6] i40e: Enable 'channel' mode in mqprio for TC configs Amritha Nambiar
2017-09-07 11:00   ` [Intel-wired-lan] " Amritha Nambiar
2017-09-13 21:45   ` Bowers, AndrewX
2017-09-07 11:00 ` [RFC PATCH v3 5/6] i40e: Refactor VF BW rate limiting Amritha Nambiar
2017-09-07 11:00   ` [Intel-wired-lan] " Amritha Nambiar
2017-09-13 21:45   ` Bowers, AndrewX
2017-09-07 11:00 ` [RFC PATCH v3 6/6] i40e: Add support setting TC max bandwidth rates Amritha Nambiar
2017-09-07 11:00   ` [Intel-wired-lan] " Amritha Nambiar
2017-09-13 21:46   ` Bowers, AndrewX
2017-09-07 16:45 ` [Intel-wired-lan] [RFC PATCH v3 0/6] Configuring traffic classes via new hardware offload mechanism in tc/mqprio Shannon Nelson
2017-09-07 16:45   ` Shannon Nelson
2017-09-07 17:22   ` Nambiar, Amritha
2017-09-07 17:22     ` Nambiar, Amritha
2017-09-07 17:38     ` Shannon Nelson
2017-09-07 17:38       ` Shannon Nelson
2017-09-07 18:34 ` Florian Fainelli
2017-09-07 18:34   ` [Intel-wired-lan] " Florian Fainelli
2017-09-07 20:09   ` Nambiar, Amritha
2017-09-07 20:09     ` [Intel-wired-lan] " Nambiar, Amritha

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=26D9FDECA4FBDD4AADA65D8E2FC68A4A10EAA2A7@ORSMSX104.amr.corp.intel.com \
    --to=andrewx.bowers@intel.com \
    --cc=intel-wired-lan@osuosl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.