[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47b4ab84-2910-4501-bbc8-c6a9b251d7a5@redhat.com>
Date: Mon, 19 Aug 2024 18:52:22 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, Madhu Chittim <madhu.chittim@...el.com>,
Sridhar Samudrala <sridhar.samudrala@...el.com>,
Simon Horman <horms@...nel.org>, John Fastabend <john.fastabend@...il.com>,
Sunil Kovvuri Goutham <sgoutham@...vell.com>,
Jamal Hadi Salim <jhs@...atatu.com>, Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH v3 03/12] net-shapers: implement NL get operation
On 8/19/24 13:53, Jiri Pirko wrote:
> Mon, Aug 19, 2024 at 11:33:28AM CEST, pabeni@...hat.com wrote:
>> Isn't the whole point of devlink to configure objects that are directly
>> related to any network device? Would be somewhat awkward accessing devlink
>> 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.
ndo_shaper_ops are basically net_device ndo. Any implementation of them
will operate 'trough some net_device'.
I'm still not sure which one of the following you mean:
1) the shaper NL interface must be able to manage devlink (rate)
objects. The core will lookup the devlink obj and use devlink_ops to do
the change.
2) the shaper NL interface must be able to manage devlink (rate)
objects, the core will use ndo_shaper_ops to do the actual change.
3) something else?
In my previous reply, I assumed you wanted option 2). If so, which kind
of object should implement the ndo_shaper_ops callbacks? net_device?
devlink? other?
> This is what I understood was a plan from very beginning.
Originally the scope was much more limited than what defined here. Jakub
asked to implement an interface capable to unify the network device
shaping/rate related callbacks.
In a previous revision, I stretched that to cover objects "above" the
network device level (e.g. PF/VF/SFs groups), but then I left them out
because:
- it caused several inconsistencies (among other thing we can't use the
'shaper cache' there and Jakub wants the cache in place).
- we already have devlink for that.
>> 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?
The revision of the series that I hope to share soon still used
net_device ndos. Shapers are identified within the network device by an
handle.
Cheers,
Paolo
Powered by blists - more mailing lists