net: ena: use tx-push-buf-len while tx-push is off
Subsystems (3)
From: Evgeny Ostrovsky <[email protected]>
We want to confirm one point before sending the driver patches:
we would like to allow setting the tx-push-buf-len when tx-push is off, but the name is problematic so we are not sure what will be the correct way to achieve this.
Current state:
- ethtool has tx-push and tx-push-buf-len.
- tx-push on means the driver writes the packet header into device memory.
- tx-push-buf-len is the length of that header.
- Today the driver uses tx-push-buf-len only when tx-push is on.
We are adding a new LLQ mode to ENA: pull mode.
- In pull mode the header stays in host memory and the device reads it.
- So tx-push is off.
- We still need to tell the device how many header bytes to pull.
- 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.
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
Quoted 1 line
- 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.
Quoted 23 lines
- 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.cchecks 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.
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
Jakub Kicinski
maintainerQuoted 8 lines · On Sun, 22 Nov 2026 10:32:31 +0200 saeed bishara wrote:
Quoted 1 line
- 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.
Quoted 23 lines
Quoted 23 lines
- 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.cchecks 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.
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
Quoted 11 lines · Jakub Kicinski
Quoted 8 lines · On Sun, 22 Nov 2026 10:32:31 +0200 saeed bishara wrote:
Quoted 1 line
- 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.
Quoted 2 lines
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)
Quoted 6 lines
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.