Netdev List
 help / color / mirror / Atom feed
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: Thu, 3 Feb 2022 11:16:44 -0800	[thread overview]
Message-ID: <20220203191644.focn4z5nmcjba4ri@sx1> (raw)
In-Reply-To: <PH0PR12MB5481901FE559D9911BCE9548DC289@PH0PR12MB5481.namprd12.prod.outlook.com>

On 03 Feb 18:35, Parav Pandit wrote:
>Hi Jakub, Saeed,
>
>> From: Saeed Mahameed <saeedm@nvidia.com>
>> Sent: Thursday, January 20, 2022 6:11 AM
>
>> >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.
>>
>I investigated this further with hw and fw teams.
>The memory resource allocator doesn't understand the resource type for page allocation.
>And even if somehow it is extended, when the pages are freed, they are returned to the common pool cache instead of returning immediately to the driver. We will miss the efficiency gained with the caching and reusing these pages for other functions and for other resource types too.
>This cache efficiency is far more important for speed of resource allocation.
>
>And additionally, it is after all boolean feature to enable/disable a functionality.
>So I suggest, how about we do something like below?
>It is similar to ethtool -k option, but applicable at the HV PF side to enable/disable a feature for the functions.
>
>$ devlink port function feature set ptp/ipsec/tlsoffload on/off
>$ devlink port function feature set device_specific_feature1 on/off
>
>$ devlink port show
>pci/0000:06:00.0/1: type eth netdev eth0 flavour pcivf pfnum 0 vfnum 0
>  function:
>    hw_addr 00:00:00:00:00:00
>    feature:
>      tlsoffload <on/off>
>      ipsec <on/off>
>      ptp <on/off>
>      device_specific_feature1 <on/off>
>

Given the HW limitation of differentiating between memory allocated for
different resources, and after a second though about the fact that most of
ConnectX resources are mapped to ICM memory which is managed by FW,
although it would've been very useful to manager resources this way,
such architecture is very specific to ConnectX and might not suite other
vendors, so explicit API as the above sounds like a better compromise, 
but I would put device_specific_feature(s) into a separate category/list

basically you are looking for:

1) ethtool -k equivalent for devlink
2) ethtool --show-priv-flags equivalent for devlink

I think that's reasonable.

>This enables having well defined features per function and odd device specific feature.
>It also doesn't overload the device on doing accounting pages for boolean functionality.
>Does it look reasonable?

  reply	other threads:[~2022-02-03 19:16 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
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 [this message]
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=20220203191644.focn4z5nmcjba4ri@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