Skip to content

Add tx push buf len param to ethtool

Shay Agroskin netdev 9 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 posting 2/22 patches 0 repliesNew
  2. v8 Latest7 patches 1 replyIn review
  3. v77 patches 1 replySuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v67 patches10 repliesSuperseded
v56 patches2 repliesSuperseded
v45 patches13 repliesSuperseded
v3 RFC5 patches1 replySuperseded
v2 RFC posting 1/24 patches9 repliesSuperseded
v1 RFC5 patches4 repliesSuperseded

Changes in v8 from the cover letter

- Changed netlink policy macro to a more elegant solution.

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7netlink: Add a macro to set policy message with format stringinclude/linux/netlink.h+13 -00 replies
2/7ethtool: Add support for configuring tx_push_buf_lenDocumentation/netlink/specs/ethtool.yaml Documentation/networking/ethtool-netlink.rst include/linux/ethtool.h +3 more+84 -230 replies
3/7net: ena: Make few cosmetic preparations to support large LLQdrivers/net/ethernet/amazon/ena/ena_netdev.c+67 -661 reply
4/7net: ena: Add an option to configure large LLQ headersdrivers/net/ethernet/amazon/ena/ena_netdev.c drivers/net/ethernet/amazon/ena/ena_netdev.h+76 -220 replies
5/7net: ena: Recalculate TX state variables every device resetdrivers/net/ethernet/amazon/ena/ena_netdev.c+9 -10 replies
6/7net: ena: Add support to changing tx_push_buf_lendrivers/net/ethernet/amazon/ena/ena_eth_com.h drivers/net/ethernet/amazon/ena/ena_ethtool.c drivers/net/ethernet/amazon/ena/ena_netdev.c +1 more+82 -120 replies
7/7net: ena: Advertise TX push supportdrivers/net/ethernet/amazon/ena/ena_ethtool.c+10 -10 replies

Reviews trailers per patch

5 of 7 patches have a Reviewed-by or Acked-by.

PatchSimon HormanMichal Kubiak
1/7
2/7
3/7R-b R-b
4/7R-b R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 net-next 0/7] Add tx push buf len param to ethtool

Changes since v7:
- Changed netlink policy macro to a more elegant solution.

Changes since v6:
- Modify netlink policy macro to avoid evaluating the macro argument more than once.

Changes since v5:
- Added a print of the maximum tx-push-buf-len when user tries to configure a value which exceeds it.

Changes since v4:
- Added advertisement for tx-push-mode in ENA driver
- Modified the documentation to make the distinction from tx-copybreak clearer

Changes since v3:
- Removed RFC tag and added a Jakub's signoff on one of the first patch

Changes since v2:
- Added a check that the driver advertises support for TX push buffer instead of defaulting the response to 0.
- Moved cosmetic changes to their own commits
- Removed usage of gotos which goes against Linux coding style
- Make ENA driver reject an attempt to configure TX push buffer when it's not supported (no LLQ is used)

Changes since v1:
- Added the new ethtool param to generic netlink specs
- Dropped dynamic advertisement of tx push buff support in ENA. The driver will advertise it for all platforms

This patchset adds a new sub-configuration to ethtool get/set queue params (ethtool -g) called 'tx-push-buf-len'.

This configuration specifies the maximum number of bytes of a transmitted packet a driver can push directly to the underlying device ('push' mode). The motivation for pushing some of the bytes to the device has the advantages of

- Allowing a smart device to take fast actions based on the packet's header
- Reducing latency for small packets that can be copied completely into the device

This new param is practically similar to tx-copybreak value that can be set using ethtool's tunable but conceptually serves a different purpose. While tx-copybreak is used to reduce the overhead of DMA mapping and makes no sense to use if less than the whole segment gets copied, tx-push-buf-len allows to improve performance by analyzing the packet's data (usually headers) before performing the DMA operation.

The configuration can be queried and set using the commands:

    $ ethtool -g [interface]
    # ethtool -G [interface] tx-push-buf-len [number of bytes]

This patchset also adds support for the new configuration in ENA driver for which this parameter ensures efficient resources management on the device side.

David Arinzon (1):
net: ena: Add an option to configure large LLQ headers

Shay Agroskin (6):
netlink: Add a macro to set policy message with format string
ethtool: Add support for configuring tx_push_buf_len
net: ena: Make few cosmetic preparations to support large LLQ
net: ena: Recalculate TX state variables every device reset
net: ena: Add support to changing tx_push_buf_len
net: ena: Advertise TX push support

 Documentation/netlink/specs/ethtool.yaml      |   8 +
 Documentation/networking/ethtool-netlink.rst  |  47 ++--
 drivers/net/ethernet/amazon/ena/ena_eth_com.h |   4 +
 drivers/net/ethernet/amazon/ena/ena_ethtool.c |  66 ++++-
 drivers/net/ethernet/amazon/ena/ena_netdev.c  | 259 +++++++++++-------
 drivers/net/ethernet/amazon/ena/ena_netdev.h  |  15 +-
 include/linux/ethtool.h                       |  14 +-
 include/linux/netlink.h                       |  13 +
 include/uapi/linux/ethtool_netlink.h          |   2 +
 net/ethtool/netlink.h                         |   2 +-
 net/ethtool/rings.c                           |  34 ++-
 11 files changed, 340 insertions(+), 124 deletions(-)
Signature · 1 line
2.25.1