Skip to content

enic: Add support for rx_copybreak

Govindarajulu Varadarajan netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 1 replyIn review
  2. v33 patches 7 repliesSuperseded
  3. v23 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch0 repliesSuperseded

Changes in v4 from the cover letter

Validate tunable length in ethtool_get_tunable, not in driver implemented function.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3enic: implement rx_copybreakdrivers/net/ethernet/cisco/enic/enic.h drivers/net/ethernet/cisco/enic/enic_main.c+48 -30 replies
2/3ethtool: Add generic options for tunablesinclude/linux/ethtool.h include/uapi/linux/ethtool.h net/core/ethtool.c+113 -00 replies
3/3enic: Add tunable_ops support for rx_copybreakdrivers/net/ethernet/cisco/enic/enic_ethtool.c+39 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH net-next v4 0/3] enic: Add support for rx_copybreak

The following series implements rx_copybreak.

dma_map_single()/dma_unmap_single() is more expensive than alloc_skb & memcpy for smaller packets. By doing this we can reuse the dma buff which is already mapped. This is very useful when iommu is on. The default skb copybreak value is 256.

When iommu is on, we can go much higher than 256. All the drivers that supports rx_copybreak provides module parameter to change this value. Since module parameter is the least preferred way for changing driver values, this series adds ethtool support for setting rx_copybreak.

v4:
Validate tunable length in ethtool_get_tunable, not in driver implemented function.

Loose tunable_ops array for each tunable type. Define one function and let the driver use switch case for each type.

Use double underscore for data type in UAPI headers. Use const qualifier where possible.

v3:
Add tunable namespace to ethtool. Use new ethtool cmd ETHTOOL_S/GTUNABLE to set/get rx_copybreak from userspace.

v2:
Add new ethtool_cmd for DMA buffer parameters, instead of adding new members to existing ethtool_ringparam.

Govindarajulu Varadarajan (3):
enic: implement rx_copybreak
ethtool: Add generic options for tunables
enic: Add tunable_ops support for rx_copybreak

 drivers/net/ethernet/cisco/enic/enic.h         |  1 +
 drivers/net/ethernet/cisco/enic/enic_ethtool.c | 39 +++++++++++++
 drivers/net/ethernet/cisco/enic/enic_main.c    | 50 +++++++++++++++-
 include/linux/ethtool.h                        |  4 ++
 include/uapi/linux/ethtool.h                   | 28 +++++++++
 net/core/ethtool.c                             | 81 ++++++++++++++++++++++++++
 6 files changed, 200 insertions(+), 3 deletions(-)
Signature · 1 line
2.1.0