public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	intel-wired-lan@lists.osuosl.org, qi.z.zhang@intel.com,
	Wenjun Wu <wenjun1.wu@intel.com>,
	maxtram95@gmail.com, "Chittim, Madhu" <madhu.chittim@intel.com>,
	"Samudrala, Sridhar" <sridhar.samudrala@intel.com>,
	Simon Horman <simon.horman@redhat.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 0/5] iavf: Add devlink and devlink rate support'
Date: Fri, 15 Dec 2023 13:30:32 +0100	[thread overview]
Message-ID: <ZXxG6MFb3KO-RVw9@nanopsycho> (raw)
In-Reply-To: <7b0c2e0132b71b131fc9a5407abd27bc0be700ee.camel@redhat.com>

Fri, Dec 15, 2023 at 12:06:52PM CET, pabeni@redhat.com wrote:
>On Thu, 2023-12-14 at 17:46 -0800, Jakub Kicinski wrote:
>> On Thu, 14 Dec 2023 21:29:51 +0100 Paolo Abeni wrote:
>> > Together with Simon, I spent some time on the above. We think the
>> > ndo_setup_tc(TC_SETUP_QDISC_TBF) hook could be used as common basis for
>> > this offloads, with some small extensions (adding a 'max_rate' param,
>> > too).
>> 
>> uAPI aside, why would we use ndo_setup_tc(TC_SETUP_QDISC_TBF)
>> to implement common basis?
>> 
>> Is it not cleaner to have a separate driver API, with its ops
>> and capabilities?
>
>We understand one of the end goal is consolidating the existing rate-
>related in kernel interfaces.  Adding a new one does not feel a good
>starting to reach that goal, see [1] & [2] ;). ndo_setup_tc() feels
>like the natural choice for H/W offload and TBF is the existing
>interface IMHO nearest to the requirements here.
>
>The devlink rate API could be a possible alternative...

Again, devlink rate was introduced for the rate configuration of the
entity that is not present (by netdev for example) on a host.
If we have netdev, let's use it.


>
>> > The idea would be:
>> > - 'fixing' sch_btf so that the s/w path became a no-op when h/w offload
>> > is enabled
>> > - extend sch_btf to support max rate
>> > - do the relevant ice implementation
>> > - ndo_set_tx_maxrate could be replaced with the mentioned ndo call (the
>> > latter interface is a strict super-set of former)
>> > - ndo_set_vf_rate could also be replaced with the mentioned ndo call
>> > (with another small extension to the offload data)
>> > 
>> > I think mqprio deserves it's own separate offload interface, as it
>> > covers multiple tasks other than shaping (grouping queues and mapping
>> > priority to classes)
>> > 
>> > In the long run we could have a generic implementation of the
>> > ndo_setup_tc(TC_SETUP_QDISC_TBF) in term of devlink rate adding a
>> > generic way to fetch the devlink_port instance corresponding to the
>> > given netdev and mapping the TBF features to the devlink_rate API.
>> > 
>> > Not starting this due to what Jiri mentioned [1].
>> 
>> Jiri, AFAIU, is against using devlink rate *uAPI* to configure network
>> rate limiting. That's separate from the internal representation.
>
>... with a couples of caveats:
>
>1) AFAICS devlink (and/or devlink_port) does not have fine grained, per
>queue representation and intel want to be able to configure shaping on
>per queue basis. I think/hope we don't want to bring the discussion to
>extending the devlink interface with queue support, I fear that will
>block us for a long time. Perhaps I’m missing or misunderstanding
>something here. Otherwise in retrospect this looks like a reasonable
>point to completely avoid devlink here.
>
>2) My understanding of Jiri statement was more restrictive. @Jiri it
>would great if could share your genuine interpretation: are you ok with
>using the devlink_port rate API as a basis to replace
>ndo_set_tx_maxrate() (via dev->devlink_port->devlink->) and possibly

Does not make any sense to me.


>ndo_set_vf_rate(). Note the given the previous point, this option would

ndo_set_vf_rate() (and the rest of ndo_[gs]et_vf_*() ndo) is the
legacy way. Devlink rate replaced that when switchdev eswich mode is
configured by:
$ sudo devlink dev eswitch set pci/0000:08:00.1 mode switchdev

In drivers, ndo_set_vf_rate() and devlink rate are implemented in the
same way. See mlx5 for example:
mlx5_esw_qos_set_vport_rate()
mlx5_esw_devlink_rate_leaf_tx_share_set()



>still feel problematic.
>
>Cheers,
>
>Paolo
>
>[1] https://xkcd.com/927/
>[2] https://www.youtube.com/watch?v=f8kO_L-pDwo
>

  parent reply	other threads:[~2023-12-15 12:30 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230727021021.961119-1-wenjun1.wu@intel.com>
2023-08-08  1:57 ` [PATCH iwl-next v2 0/5] iavf: Add devlink and devlink rate support Wenjun Wu
2023-08-08  1:57   ` [PATCH iwl-next v2 1/5] virtchnl: support queue rate limit and quanta size configuration Wenjun Wu
2023-08-08  1:57   ` [PATCH iwl-next v2 2/5] ice: Support VF " Wenjun Wu
2023-08-16 16:54     ` Brett Creeley
2023-08-08  1:57   ` [PATCH iwl-next v2 3/5] iavf: Add devlink and devlink port support Wenjun Wu
2023-08-16 17:11     ` Brett Creeley
2023-08-08  1:57   ` [PATCH iwl-next v2 4/5] iavf: Add devlink port function rate API support Wenjun Wu
2023-08-08 20:49     ` Simon Horman
2023-08-09 18:43       ` Zhang, Xuejun
2023-08-16 17:27     ` Brett Creeley
2023-08-08  1:57   ` [PATCH iwl-next v2 5/5] iavf: Add VIRTCHNL Opcodes Support for Queue bw Setting Wenjun Wu
2023-08-08 20:54     ` Simon Horman
2023-08-09 18:44       ` Zhang, Xuejun
2023-08-16 17:32     ` Brett Creeley
2023-08-16  3:33 ` [PATCH iwl-next v3 0/5] iavf: Add devlink and devlink rate support Wenjun Wu
2023-08-16  3:33   ` [PATCH iwl-next v3 1/5] virtchnl: support queue rate limit and quanta size configuration Wenjun Wu
2023-08-16  3:33   ` [PATCH iwl-next v3 2/5] ice: Support VF " Wenjun Wu
2023-08-16  3:33   ` [PATCH iwl-next v3 3/5] iavf: Add devlink and devlink port support Wenjun Wu
2023-08-16  3:33   ` [PATCH iwl-next v3 4/5] iavf: Add devlink port function rate API support Wenjun Wu
2023-08-16  3:33   ` [PATCH iwl-next v3 5/5] iavf: Add VIRTCHNL Opcodes Support for Queue bw Setting Wenjun Wu
2023-08-16  9:14     ` Simon Horman
2023-08-22  3:39 ` [PATCH iwl-next v4 0/5] iavf: Add devlink and devlink rate support Wenjun Wu
2023-08-22  3:39   ` [PATCH iwl-next v4 1/5] virtchnl: support queue rate limit and quanta size configuration Wenjun Wu
2023-08-22  3:40   ` [PATCH iwl-next v4 2/5] ice: Support VF " Wenjun Wu
2023-08-22  3:40   ` [PATCH iwl-next v4 3/5] iavf: Add devlink and devlink port support Wenjun Wu
2023-08-22  3:40   ` [PATCH iwl-next v4 4/5] iavf: Add devlink port function rate API support Wenjun Wu
2023-08-22  3:40   ` [PATCH iwl-next v4 5/5] iavf: Add VIRTCHNL Opcodes Support for Queue bw Setting Wenjun Wu
2023-08-22  6:12   ` [PATCH iwl-next v4 0/5] iavf: Add devlink and devlink rate support Jiri Pirko
2023-08-22 15:12     ` Jakub Kicinski
2023-08-22 15:34       ` [PATCH iwl-next v4 0/5] iavf: Add devlink and devlink rate support' Jiri Pirko
2023-08-23 21:39         ` Zhang, Xuejun
     [not found]         ` <0893327b-1c84-7c25-d10c-1cc93595825a@intel.com>
2023-08-24  7:04           ` Jiri Pirko
2023-08-28 22:46             ` Zhang, Xuejun
2023-11-17  5:52               ` [Intel-wired-lan] " Zhang, Xuejun
2023-11-17 11:21                 ` Jiri Pirko
2023-11-21  9:04                   ` Paolo Abeni
2023-11-18 16:48                 ` Jakub Kicinski
2023-11-22 22:19                   ` Zhang, Xuejun
2023-11-23  3:22                     ` Jakub Kicinski
2023-11-28  0:15                       ` Zhang, Xuejun
2023-11-28  1:43                         ` Jakub Kicinski
2023-12-14 20:29                           ` Paolo Abeni
2023-12-15  1:46                             ` Jakub Kicinski
2023-12-15 11:06                               ` Paolo Abeni
2023-12-15 11:47                                 ` Paolo Abeni
2023-12-15 12:30                                 ` Jiri Pirko [this message]
2023-12-15 22:41                                 ` Jakub Kicinski
2023-12-18 20:12                                   ` Paolo Abeni
2023-12-18 21:33                                     ` Jakub Kicinski
2023-12-15 12:22                               ` Jiri Pirko
2023-10-18  9:05             ` Paolo Abeni

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=ZXxG6MFb3KO-RVw9@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=madhu.chittim@intel.com \
    --cc=maxtram95@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=qi.z.zhang@intel.com \
    --cc=simon.horman@redhat.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=wenjun1.wu@intel.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