From: Saeed Mahameed <saeedm@nvidia.com>
To: Parav Pandit <parav@nvidia.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
Saeed Mahameed <saeed@kernel.org>,
Sunil Sudhakar Rani <sunrani@nvidia.com>,
Jiri Pirko <jiri@nvidia.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
Bodong Wang <bodong@nvidia.com>
Subject: Re: [PATCH net-next 1/2] devlink: Add support to set port function as trusted
Date: Wed, 19 Jan 2022 16:40:39 -0800 [thread overview]
Message-ID: <20220120004039.qriwo4vrvizz7qry@sx1> (raw)
In-Reply-To: <PH0PR12MB5481978B796DC00AF681FAC0DC599@PH0PR12MB5481.namprd12.prod.outlook.com>
On 19 Jan 05:49, Parav Pandit wrote:
>
>> From: Jakub Kicinski <kuba@kernel.org>
>> Sent: Wednesday, January 19, 2022 5:46 AM
>>
>> On Tue, 18 Jan 2022 14:33:28 -0800 Saeed Mahameed wrote:
>> > On 18 Jan 10:02, Jakub Kicinski wrote:
>> > >On Fri, 14 Jan 2022 22:15:48 -0800 Saeed Mahameed wrote:
>> > >> I think the term privilege is misused here, due to the global knob
>> > >> proposed initially. Anyway the issue is exactly as I explained
>> > >> above, SW steering requires FW pre-allocated resources and
>> > >> initializations, for VFs it is disabled since there was no demand for it and
>> FW wanted to save on resources.
>> > >>
>> > >> Now as SW steering is catching up with FW steering in terms of
>> > >> functionality, people want it also on VFs to help with rule
>> > >> insertion rate for use cases other than switchdev and TC, e.g TLS,
>> > >> connection tracking, etc ..
>> > >
>> > >Sorry long weekend here, thanks for the explanation!
>> > >
>> > >Where do we stand? Are you okay with an explicit API for enabling /
>> > >disabling VF features? If SMFS really is about conntrack and TLS
>> > >maybe
>> >
>> > I am as skeptical as you are. But what other options do we have ? It's
>> > a fact that "Smart" VFs have different use-cases and customization is
>> > necessary to allow full scalability and better system resource
>> > utilization.
>> >
>> > As you already said, PTP for instance makes total sense as a VF
>> > feature knob
>>
>> To be clear when I was talking about PTP initially I was thinking about real PTP
>> clocks. "Modern" NICs sometimes do shenanigans in the FW to pretend they
>> have more clocks that they really have.
>> There is a difference between delegating the PHC to the VF and allowing the
>> VF to use some SW pretend clock. I'm not sure which camp your PTP falls into.
>>
delegating.
>> > for the same reason I would say any standard stateful feature/offloads
>> > (e.g Crypto) also deserve own knobs.
>> >
>> > If we agree on the need for a VF customization API, I would use one
>> > API for all features. Having explicit enable/disable API for some then
>> > implicit resources re-size API for other features is a bit confusing.
>> >
>> > e.g.
>> >
>> > # Enable ptp on specific vf
>> > devlink port function <port idx> set feature PTP ON/OFF
>> >
>> > # disable TLS on specific vf
>> > devlink resource set <DEV> TLS size 0
>> >
>> > And I am pretty sure resource API is not yet available for port
>> > functions (e.g before VF instantiation, which is one of the main
>> > points of this RFC, so some plumbing is necessary to expose resource API for
>> port functions.
>> >
>> > TBH, I actually like your resources idea, i would like to explore that
>> > more with Parav, see what we can do about it ..
>>
>> Right, that'd be great, although I'd imagine if the resource is very flexible (e.g.
>> memory) delegating N bytes to a function does not tell the device how to
>> perform the "diet". Obviously that's pure speculation I don't know how things
>> work on your SmartNIC :)
>>
>Right, we at least need to tell fw that only X bytes are allowed for sw_steering diet.
>And _right_ amount of X bytes specific for sw_steering was not very clear.
>Hence the on/off resource knob looked more doable and abtract.
>
>I do agree you and Saeed that instead of port function param, port function resource is more suitable here even though its bool.
>
I believe flexibility can be achieved with some FW message? Parav can you
investigate ? To be clear here the knob must be specific to sw_steering
exposed as memory resource.
>> > >it can be implied by the delegation of appropriate bits meaningful to
>> > >netdev world?
>> >
>> > I don't get this point, netdev bits are known only after the VF has
>> > been fully initialized.
>>
>> I meant this as a simple starting point to enumerate the features.
>> It was an off-cuff suggestion, really. Reusing some approximation of existing
>> bits with clear code-driven semantics is simpler than defining and
>> documenting new ones.
>>
doable, although can be confusing.
>> We can start a new enum.
>>
>> I hope you didn't mean "PTP" to be a string carried all the way to the driver in
>> your example command?
>>
No :), well defined enums, similar to devlink params. but yes we need a
clear cut of what is vendor specific and what's not.
>Yet to sync with Saeed, but I think it will be a enum + string during resource registration time.
>For generic features, enum and string are defined by devlink core.
>For smfs kind of rare knob, enum and string is supplied by driver.
next prev parent reply other threads:[~2022-01-20 0:40 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 14:43 [PATCH net-next 0/2] Extend devlink for port trust setting Sunil Rani
2021-11-22 14:43 ` [PATCH net-next 1/2] devlink: Add support to set port function as trusted Sunil Rani
2021-11-23 1:22 ` Jakub Kicinski
2021-11-30 22:17 ` Sunil Sudhakar Rani
2021-12-01 3:12 ` Jakub Kicinski
2021-12-01 7:07 ` Saeed Mahameed
2021-12-02 17:31 ` Jakub Kicinski
2021-12-02 19:06 ` Saeed Mahameed
2021-12-15 18:19 ` Saeed Mahameed
2021-12-15 19:22 ` Jakub Kicinski
2021-12-15 22:15 ` Saeed Mahameed
2021-12-15 23:04 ` Jakub Kicinski
2021-12-16 16:17 ` Sunil Sudhakar Rani
2021-12-16 16:28 ` Jakub Kicinski
2022-01-11 16:57 ` Parav Pandit
2022-01-11 18:20 ` Jakub Kicinski
2022-01-11 18:26 ` Parav Pandit
2022-01-11 19:24 ` Jakub Kicinski
2022-01-11 19:39 ` Parav Pandit
2022-01-11 19:57 ` Jakub Kicinski
2022-01-12 4:40 ` Parav Pandit
2022-01-13 0:35 ` Jakub Kicinski
2022-01-13 3:37 ` Parav Pandit
2022-01-14 4:42 ` Jakub Kicinski
2022-01-14 4:52 ` Parav Pandit
2022-01-15 2:34 ` Jakub Kicinski
2022-01-15 6:15 ` Saeed Mahameed
2022-01-18 18:02 ` Jakub Kicinski
2022-01-18 22:33 ` Saeed Mahameed
2022-01-19 0:16 ` Jakub Kicinski
2022-01-19 5:49 ` Parav Pandit
2022-01-20 0:40 ` Saeed Mahameed [this message]
2022-01-20 4:52 ` Parav Pandit
2022-01-20 6:03 ` Saeed Mahameed
2022-01-20 6:19 ` Parav Pandit
2022-02-03 18:35 ` Parav Pandit
2022-02-03 19:16 ` Saeed Mahameed
2022-02-07 14:45 ` Parav Pandit
2022-02-09 4:21 ` Parav Pandit
2022-01-14 9:15 ` Jiri Pirko
2022-01-15 2:10 ` Jakub Kicinski
2021-11-22 14:43 ` [PATCH net-next 2/2] net/mlx5: SF/VF, Port function trust set support Sunil Rani
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=20220120004039.qriwo4vrvizz7qry@sx1 \
--to=saeedm@nvidia.com \
--cc=bodong@nvidia.com \
--cc=davem@davemloft.net \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=parav@nvidia.com \
--cc=saeed@kernel.org \
--cc=sunrani@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