[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR12MB356448156B75DD719E24E41DBC329@DM6PR12MB3564.namprd12.prod.outlook.com>
Date: Fri, 28 Oct 2022 10:32:22 +0000
From: Shai Malin <smalin@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Aurelien Aptel <aaptel@...dia.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"pabeni@...hat.com" <pabeni@...hat.com>,
Saeed Mahameed <saeedm@...dia.com>,
Tariq Toukan <tariqt@...dia.com>,
"leon@...nel.org" <leon@...nel.org>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"sagi@...mberg.me" <sagi@...mberg.me>, "hch@....de" <hch@....de>,
"kbusch@...nel.org" <kbusch@...nel.org>,
"axboe@...com" <axboe@...com>,
Chaitanya Kulkarni <chaitanyak@...dia.com>,
Or Gerlitz <ogerlitz@...dia.com>,
Yoray Zack <yorayz@...dia.com>,
Boris Pismenny <borisp@...dia.com>,
"aurelien.aptel@...il.com" <aurelien.aptel@...il.com>,
"malin1024@...il.com" <malin1024@...il.com>
Subject: RE: [PATCH v7 01/23] net: Introduce direct data placement tcp offload
On Wed, 26 Oct 2022 at 17:24, Jakub Kicinski <kuba@...nel.org> wrote:
> On Wed, 26 Oct 2022 15:01:42 +0000 Shai Malin wrote:
> > > > @@ -14,7 +14,7 @@ typedef u64 netdev_features_t;
> > > > enum {
> > > > NETIF_F_SG_BIT, /* Scatter/gather IO. */
> > > > NETIF_F_IP_CSUM_BIT, /* Can checksum TCP/UDP over
> IPv4. */
> > > > - __UNUSED_NETIF_F_1,
> > > > + NETIF_F_HW_ULP_DDP_BIT, /* ULP direct data placement
> offload */
> > >
> > > Why do you need a feature bit if there is a whole caps / limit querying
> > > mechanism?
> >
> > The caps are used for the HW device to publish the supported
> > capabilities/limitation, while the feature bit is used for the DDP
> > enablement "per net-device".
> >
> > Disabling will be required in case that another feature which is
> > mutually exclusive to the DDP is needed (as an example in the mlx case,
> > CQE compress which is controlled from ethtool).
>
> It's a big enough feature to add a genetlink or at least a ethtool
> command to control. If you add more L5 protos presumably you'll want
> to control disable / enable separately for them. Also it'd be cleaner
> to expose the full capabilities and report stats via a dedicated API.
> Feature bits are not a good fix for complex control-pathy features.
With our existing design, we are supporting a bundle of DDP + CRC offload.
We don't see the value of letting the user control it individually.
The capabilities bits were added in order to allow future devices which
supported only one of the capabilities to plug into the infrastructure
or to allow additional capabilities/protocols.
We could expose the caps via ethtool as regular netdev features, it would
make everything simpler and cleaner, but the problem is that features have
run out of bits (all 64 are taken, and we understand the challenge with
changing that).
We could add a new ethtool command, but on the kernel side it would be
quite redundant as we would essentially re-implement feature flag processing
(comparing string of features names and enabling bits).
What do you think?
>
> > > It's somewhat unclear to me why we add ops to struct net_device,
> > > rather than to ops.. can you explain?
> >
> > We were trying to follow the TLS design which is similar.
>
> Ack, TLS should really move as well, IMHO, but that's a separate convo.
>
> > Can you please clarify what do you mean by "rather than to ops.."?
>
> Add the ulp_dpp_ops pointer to struct net_device_ops rather than struct
> net_device.
Sure, will be fixed in v8.
Powered by blists - more mailing lists