🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
4 messages
4 total messages Started by saeed bishara Sun, 22 Nov 2026 08:32
Re: [RFC] net: ena: use tx-push-buf-len while tx-push is off
#20365
Author: saeed bishara
Date: Sun, 22 Nov 2026 08:32
33 lines
13219 bytes
> - We still need to tell the device how many header bytes to pull.
Just to be clear, the device eventually will read (pull) the entire packet
I think  tx-push-buf-len should have been called tx-inline-header-len,
as this is about how many bytes of the packet's header get written by
the driver into the Tx ring descriptor.
IMHO, we better introduce a new parameter, that is agnostic to
push/pull mode, we can choose to deprecate the current one in the long
term.

> - We want to use tx-push-buf-len for this, with tx-push off.
>
> ENA is the only in-tree driver that uses tx-push-buf-len, so this does
> not change any other driver.
>
> Example on a device that supports pull mode:
>
> ethtool -G <dev> tx-push off tx-push-buf-len 224
> ethtool -g <dev> -> TX Push: off, TX push buff len: 224
>
> The core already allows this. net/ethtool/rings.c checks only the
> capability bit and that the length is not above the max. It does not tie
> tx-push-buf-len to tx-push.
>
> In a 2023 review Gal Pressman suggested using tx-push-buf-len only when
> tx-push is on. That was never added as code or written as a rule.
> Link: https://lore.kernel.org/netdev/30cb3990-80ce-ca07-6d73-cdc00d0ad7b8@nvidia.com/
>
> Request: Please confirm this is fine or if not can you please suggest another
> way of achieving the pull mode len setup functionality.
>
> Thank you
>
Re: [RFC] net: ena: use tx-push-buf-len while tx-push is off
#21472
Author: Jakub Kicinski
Date: Tue, 24 Nov 2026 02:13
45 lines
9811 bytes
On Sun, 22 Nov 2026 10:32:31 +0200 saeed bishara wrote:
> > - We still need to tell the device how many header bytes to pull.  
> Just to be clear, the device eventually will read (pull) the entire packet
> I think  tx-push-buf-len should have been called tx-inline-header-len,
> as this is about how many bytes of the packet's header get written by
> the driver into the Tx ring descriptor.
> IMHO, we better introduce a new parameter, that is agnostic to
> push/pull mode, we can choose to deprecate the current one in the long
> term.

Agreed on new param, not sure about "agnostic to config mode".
Or if we can deprecate the old one since its uAPI.

The driver can store both values in one tho, effectively forcing 
them to be in sync.

All the new one tx-hdr-depth ? max-hdr-len would be more logical
but we use "max" to indicate the max value for a param.

You can add this to uAPI of ethtool or a driver-specific devlink param.

> > - We want to use tx-push-buf-len for this, with tx-push off.
> >
> > ENA is the only in-tree driver that uses tx-push-buf-len, so this does
> > not change any other driver.
> >
> > Example on a device that supports pull mode:
> >
> > ethtool -G <dev> tx-push off tx-push-buf-len 224
> > ethtool -g <dev> -> TX Push: off, TX push buff len: 224
> >
> > The core already allows this. net/ethtool/rings.c checks only the
> > capability bit and that the length is not above the max. It does not tie
> > tx-push-buf-len to tx-push.
> >
> > In a 2023 review Gal Pressman suggested using tx-push-buf-len only when
> > tx-push is on. That was never added as code or written as a rule.
> > Link: https://lore.kernel.org/netdev/30cb3990-80ce-ca07-6d73-cdc00d0ad7b8@nvidia.com/
> >
> > Request: Please confirm this is fine or if not can you please suggest another
> > way of achieving the pull mode len setup functionality.
> >
> > Thank you
> >  
Re: [RFC] net: ena: use tx-push-buf-len while tx-push is off
#21634
Author: saeed bishara
Date: Tue, 24 Nov 2026 09:08
32 lines
13643 bytes
On Tue, Nov 24, 2026 at 4:13 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Sun, 22 Nov 2026 10:32:31 +0200 saeed bishara wrote:
> > > - We still need to tell the device how many header bytes to pull.
> > Just to be clear, the device eventually will read (pull) the entire packet
> > I think  tx-push-buf-len should have been called tx-inline-header-len,
> > as this is about how many bytes of the packet's header get written by
> > the driver into the Tx ring descriptor.
> > IMHO, we better introduce a new parameter, that is agnostic to
> > push/pull mode, we can choose to deprecate the current one in the long
> > term.
>
> Agreed on new param, not sure about "agnostic to config mode".
> Or if we can deprecate the old one since its uAPI.
I mean the new param will be served whenever the driver inlines/copies
the packet header into the ring of descriptors, regardless to where
the ring is located (host or device)

>
> The driver can store both values in one tho, effectively forcing
> them to be in sync.
>
> All the new one tx-hdr-depth ? max-hdr-len would be more logical
> but we use "max" to indicate the max value for a param.
yeah, max doesn't work well here as the driver inlines this fixed
number of bytes, even when the packet is shorter, the driver pads with
zeros.
I think the name should highlight the "inline" attribute is it's a key one.
>
Re: [RFC] net: ena: use tx-push-buf-len while tx-push is off
#25130
Author: saeed bishara
Date: Tue, 01 Dec 2026 09:30
53 lines
14476 bytes
On Tue, Dec 1, 2026 at 10:29 AM Evgeny Ostrovsky <evostrov@amazon.com> wrote:
>
> On Tue, 24 Nov 2026 11:08:19 +0200 saeed bishara wrote:
> > On Tue, Nov 24, 2026 at 4:13AM Jakub Kicinski <kuba@kernel.org> wrote:
> > > On Sun, 22 Nov 2026 10:32:31 +0200 saeed bishara wrote:
> > > > IMHO, we better introduce a new parameter, that is agnostic to
> > > > push/pull mode, we can choose to deprecate the current one in the long
> > > > term.
> > >
> > > Agreed on new param, not sure about "agnostic to config mode".
> > > Or if we can deprecate the old one since its uAPI.
> > I mean the new param will be served whenever the driver inlines/copies
> > the packet header into the ring of descriptors, regardless to where
> > the ring is located (host or device)
>
> Thanks both. We will add a new parameter instead of reusing
> tx-push-buf-len. We will keep tx-push-buf-len, since it is uAPI.
>
> The new param is the number of header bytes the driver copies into
> the TX descriptor ring. It works the same whether the ring is in device
> memory (tx-push on) or in host memory (pull mode, tx-push off).
>
> > >
> > > The driver can store both values in one tho, effectively forcing
> > > them to be in sync.
>
> The driver will store the old and new values in one field, so they stay
> in sync.
>
> > >
> > > All the new one tx-hdr-depth ? max-hdr-len would be more logical
> > > but we use "max" to indicate the max value for a param.
> > yeah, max doesn't work well here as the driver inlines this fixed
> > number of bytes, even when the packet is shorter, the driver pads with
> > zeros.
> > I think the name should highlight the "inline" attribute is it's a key one.
>
> Agreed. We will add two attributes, the same way as the tx-push-buf-len
> and tx-push-buf-len-max pair:
>
>   - tx-inline-header-len: settable. The number of header bytes the
>     driver copies into the TX descriptor ring.
>   - tx-inline-header-len-max: read-only. The largest value the driver
>     supports.
>
> We plan to add both to the ethtool uAPI. Does that work for you?
Ack.
>
> Thanks
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads