netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Madhu Chittim <madhu.chittim@intel.com>,
	Sridhar Samudrala <sridhar.samudrala@intel.com>,
	Simon Horman <horms@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Sunil Kovvuri Goutham <sgoutham@marvell.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH v3 03/12] net-shapers: implement NL get operation
Date: Mon, 19 Aug 2024 13:53:07 +0200	[thread overview]
Message-ID: <ZsMyI0UOn4o7OfBj@nanopsycho.orion> (raw)
In-Reply-To: <4cb6fe12-a561-47a4-9046-bb54ad1f4d4e@redhat.com>

Mon, Aug 19, 2024 at 11:33:28AM CEST, pabeni@redhat.com wrote:
>
>
>On 8/16/24 11:16, Jiri Pirko wrote:
>> Fri, Aug 16, 2024 at 10:52:58AM CEST, pabeni@redhat.com wrote:
>> > On 8/14/24 10:37, Jiri Pirko wrote:
>> > > Tue, Aug 13, 2024 at 05:17:12PM CEST, pabeni@redhat.com wrote:
>> > > > On 8/1/24 15:42, Jiri Pirko wrote:
>> > > > [...]
>> > > > > > int net_shaper_nl_get_doit(struct sk_buff *skb, struct genl_info *info)
>> > > > > > {
>> > > > > > -	return -EOPNOTSUPP;
>> > > > > > +	struct net_shaper_info *shaper;
>> > > > > > +	struct net_device *dev;
>> > > > > > +	struct sk_buff *msg;
>> > > > > > +	u32 handle;
>> > > > > > +	int ret;
>> > > > > > +
>> > > > > > +	ret = fetch_dev(info, &dev);
>> > > > > 
>> > > > > This is quite net_device centric. Devlink rate shaper should be
>> > > > > eventually visible throught this api as well, won't they? How do you
>> > > > > imagine that?
>> > > > 
>> > > > I'm unsure we are on the same page. Do you foresee this to replace and
>> > > > obsoleted the existing devlink rate API? It was not our so far.
>> > > 
>> > > Driver-api-wise, yes. I believe that was the goal, to have drivers to
>> > > implement one rate api.
>> > 
>> > I initially underlooked at this point, I'm sorry.
>> > 
>> > Re-reading this I think we are not on the same page.
>> > 
>> > The net_shaper_ops are per network device operations: they are aimed (also)
>> > at consolidating network device shaping related callbacks, but they can't
>> > operate on non-network device objects (devlink port).
>> 
>> Why not?
>
>Isn't the whole point of devlink to configure objects that are directly
>related to any network device? Would be somewhat awkward accessing devlink

Yeah, not even network. Just "a device".


>port going through some net_device?

I'm not sure why you are asking that. I didn't suggest anything like
that. On contrary, as your API is netdev centric, I suggested to
disconnect from netdev to the shapers could be used not only with them.
This is what I understood was a plan from very beginning. I may be wrong
though....


>
>Side note: I experimented adding the 'binging' abstraction to this API and
>gives a quite significant uglification to the user syntax (due to the
>additional nesting required) and the code.
>
>Still, if there is a very strong need for controlling devlink rate via this
>API _and_ we can assume that each net_device "relates" (/references/is
>connected to) at most a single devlink object (out of sheer ignorance on my
>side I'm unsure about this point, but skimming over the existing
>implementations it looks so), the current API definition would be IMHO
>sufficient and clean enough to reach for both devlink port rate objects and
>devlink node rate objects.

Don't assume this. Not always true.


>
>We could define additional scopes for each of such objects and use the id to
>discriminate the specific port or node within the relevant devlink.

But you still want to use some netdevice as a handle IIUC, is that
right?


>
>I think such scopes definition should come with related implementation, e.g.
>not with this series.
>
>Thanks,
>
>Paolo
>

  reply	other threads:[~2024-08-19 11:53 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 20:39 [PATCH v3 00/12] net: introduce TX H/W shaping API Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 01/12] tools: ynl: lift an assumption about spec file name Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 02/12] netlink: spec: add shaper YAML spec Paolo Abeni
2024-07-31 21:13   ` Donald Hunter
2024-08-01 14:31     ` Paolo Abeni
2024-08-02 10:57       ` Jiri Pirko
2024-08-02 11:15       ` Donald Hunter
2024-08-05 14:35         ` Paolo Abeni
2024-08-05 20:37           ` Jakub Kicinski
2024-08-01 13:10   ` Jiri Pirko
2024-08-01 14:40     ` Jakub Kicinski
2024-08-01 15:12     ` Paolo Abeni
2024-08-02 10:49       ` Jiri Pirko
2024-08-05 15:11         ` Paolo Abeni
2024-08-06  7:06           ` Jiri Pirko
2024-08-12 14:58             ` Paolo Abeni
2024-08-12 15:25               ` Jakub Kicinski
2024-08-12 16:50                 ` Jiri Pirko
2024-08-12 17:42                   ` Jakub Kicinski
2024-08-13  5:38                     ` Jiri Pirko
2024-08-13 14:12                       ` Jakub Kicinski
2024-08-13 14:47                         ` Paolo Abeni
2024-08-13 14:58                           ` Jakub Kicinski
2024-08-13 15:31                             ` Paolo Abeni
2024-08-13 15:43                               ` Jakub Kicinski
2024-08-14  8:56                           ` Donald Hunter
2024-08-13 17:12                 ` Donald Hunter
2024-08-14 14:21                   ` Paolo Abeni
2024-08-15  9:07                     ` Donald Hunter
2024-08-02 11:19   ` Jiri Pirko
2024-08-02 11:26   ` Jiri Pirko
2024-08-02 16:04   ` Jiri Pirko
2024-07-30 20:39 ` [PATCH v3 03/12] net-shapers: implement NL get operation Paolo Abeni
2024-08-01 13:42   ` Jiri Pirko
2024-08-13 15:17     ` Paolo Abeni
2024-08-14  8:37       ` Jiri Pirko
2024-08-16  8:52         ` Paolo Abeni
2024-08-16  9:16           ` Jiri Pirko
2024-08-19  9:33             ` Paolo Abeni
2024-08-19 11:53               ` Jiri Pirko [this message]
2024-08-19 16:52                 ` Paolo Abeni
2024-08-22 12:02                   ` Jiri Pirko
2024-08-22 14:41                     ` Jakub Kicinski
2024-08-22 20:30                       ` Paolo Abeni
2024-08-22 22:56                         ` Jakub Kicinski
2024-08-23 11:50                           ` Jiri Pirko
2024-08-23 12:58                             ` Paolo Abeni
2024-08-23 13:36                               ` Jiri Pirko
2024-08-23 14:23                                 ` Paolo Abeni
2024-08-26  9:31                                   ` Jiri Pirko
2024-08-27 14:37                                     ` Paolo Abeni
2024-08-27 14:54                                       ` Jakub Kicinski
2024-08-27 20:43                                         ` Paolo Abeni
2024-08-27 21:03                                           ` Jakub Kicinski
2024-08-27 21:54                                             ` Paolo Abeni
2024-08-28  6:40                                               ` Jiri Pirko
2024-08-28 10:55                                                 ` Paolo Abeni
2024-08-28 13:02                                                   ` Jiri Pirko
2024-08-28 20:30                                                   ` Jakub Kicinski
2024-08-28 21:13                                                     ` Paolo Abeni
2024-08-29 11:45                                                       ` Jiri Pirko
2024-08-01 15:09   ` Jakub Kicinski
2024-08-02 11:53   ` Jiri Pirko
2024-07-30 20:39 ` [PATCH v3 04/12] net-shapers: implement NL set and delete operations Paolo Abeni
2024-08-01 15:00   ` Jakub Kicinski
2024-08-01 15:25     ` Paolo Abeni
2024-08-01 15:39       ` Jakub Kicinski
2024-08-02 16:15         ` Jiri Pirko
2024-08-02 22:01           ` Jakub Kicinski
2024-08-05 15:23           ` Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 05/12] net-shapers: implement NL group operation Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 06/12] netlink: spec: add shaper introspection support Paolo Abeni
2024-08-02 11:21   ` Donald Hunter
2024-07-30 20:39 ` [PATCH v3 07/12] net: shaper: implement " Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 08/12] testing: net-drv: add basic shaper test Paolo Abeni
2024-07-31  7:52   ` Paolo Abeni
2024-08-01  1:55     ` Jakub Kicinski
2024-08-05 14:22       ` Simon Horman
2024-08-05 19:36         ` Jakub Kicinski
2024-08-06 15:21           ` Simon Horman
2024-08-08 12:20             ` Simon Horman
2024-08-08 14:17               ` Jakub Kicinski
2024-08-08 14:34                 ` Simon Horman
2024-08-11 12:40                   ` Simon Horman
2024-08-12 15:31                     ` Jakub Kicinski
2024-08-12 16:03                 ` Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 09/12] virtchnl: support queue rate limit and quanta size configuration Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 10/12] ice: Support VF " Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 11/12] iavf: Add net_shaper_ops support Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 12/12] iavf: add support to exchange qos capabilities Paolo Abeni
2024-08-01 12:57 ` [PATCH v3 00/12] net: introduce TX H/W shaping API Jiri Pirko

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=ZsMyI0UOn4o7OfBj@nanopsycho.orion \
    --to=jiri@resnulli.us \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=madhu.chittim@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sgoutham@marvell.com \
    --cc=sridhar.samudrala@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;
as well as URLs for NNTP newsgroup(s).