mbox series

[v2,ethtool-next,0/2] Add tx push buf len param to ethtool

Message ID 20230423144948.650717-1-shayagr@amazon.com (mailing list archive)
Headers show
Series Add tx push buf len param to ethtool | expand

Message

Shay Agroskin April 23, 2023, 2:49 p.m. UTC
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]

Shay Agroskin (2):
  update UAPI header copies
  ethtool: Add support for configuring tx-push-buf-len

 ethtool.8.in                 |  5 +++++
 ethtool.c                    |  1 +
 netlink/desc-ethtool.c       |  2 ++
 netlink/rings.c              | 38 +++++++++++++++++++++++-------------
 uapi/linux/ethtool_netlink.h |  2 ++
 uapi/linux/rtnetlink.h       |  1 +
 6 files changed, 35 insertions(+), 14 deletions(-)