Skip to content

ethtool per queue parameters support

Kan Liang netdev 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest8 patches 6 repliesIn review
  2. v66 of 8 patches 1 replySuperseded
  3. v56 of 8 patches 2 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v46 of 8 patches4 repliesSuperseded
v36 patches6 repliesSuperseded
v25 patches4 repliesSuperseded
v1 RFC5 patches11 repliesSuperseded

Changes in v7 from the cover letter

- Rebase on commit 76d13b568776. Did minor change in patch 6.

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8lib/bitmap.c: conversion routines to/from u32 arrayinclude/linux/bitmap.h lib/bitmap.c+99 -00 replies
2/8test_bitmap: unit tests for lib/bitmap.clib/Kconfig.debug lib/Makefile lib/test_bitmap.c +2 more+378 -10 replies
3/8net/ethtool: introduce a new ioctl for per queue settinginclude/uapi/linux/ethtool.h net/core/ethtool.c+42 -20 replies
4/8net/ethtool: support get coalesce per queueinclude/linux/ethtool.h net/core/ethtool.c+41 -20 replies
5/8net/ethtool: support set coalesce per queueinclude/linux/ethtool.h net/core/ethtool.c+68 -00 replies
6/8i40e: queue-specific settings for interrupt moderationdrivers/net/ethernet/intel/i40e/i40e.h drivers/net/ethernet/intel/i40e/i40e_debugfs.c drivers/net/ethernet/intel/i40e/i40e_ethtool.c +3 more+120 -701 reply
7/8i40e/ethtool: support coalesce getting by queuedrivers/net/ethernet/intel/i40e/i40e_ethtool.c+7 -01 reply
8/8i40e/ethtool: support coalesce setting by queuedrivers/net/ethernet/intel/i40e/i40e_ethtool.c+7 -01 reply

Reviews trailers per patch

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

PatchBen HutchingsShannon NelsonJeff Kirsher
1/8R-b
2/8
3/8R-b
4/8R-b
5/8R-b
6/8A-b A-b
7/8A-b
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [PATCH V7 0/8] ethtool per queue parameters support

Modern network interface controllers usually support multiple receive and transmit queues. Each queue may have its own parameters. For example, Intel XL710/X710 hardware supports per queue interrupt moderation. However, current ethtool does not support per queue parameters option. User has to set parameters for the whole NIC. This series extends ethtool to support per queue parameters option.

Since the support of per queue parameters vary with different cards, it is impossible to address all cards in one patch. This series only supports per queue coalesce options on i40e driver. The framework used in the patch can be easily extended to other cards and parameters.

The lib bitmap needs to be extended to facilitate exchanging queue bitmaps between user space and kernel space. Two patches from David's latest V8 patch series are also cited in this series. You may refer to
https://lkml.org/lkml/2016/2/9/919 for more details.

Changes since V6:
- Rebase on commit 76d13b568776. Did minor change in patch 6.

Changes since V5:
- Add test_bitmap.c and bitmap.sh in the series. They are forgot to be added previously.
- Update the first two patches to David's latest V8 version. The changes include
- bitmap u32 API returns number of bits copied, unit tests updated
- module_exit in test_bitmap
- Also change the mode of bitmap.sh to 755 according to Ben's suggestion

Changes since V4:
- Modify set/get_per_queue_coalesce function description
- Change the queue number to be u32
- Correct an error of calculating coalesce backup buffer address
- Rename queue_num to n_queues
- Don't log error message in __i40e_get_coalesce

Changes since V3:
- Based on David's lib bitmap.
- ETHTOOL_PERQUEUE should be handled before the containing switch
- Make the rollback code unconditional
- some minor changes according to Ben's feedback

Changes since V2:
- Add queue-specific settings for interrupt moderation in i40e

Changes since V1:
- Checking the sub-command number to determine whether the command requires CAP_NET_ADMIN
- Refine the struct ethtool_per_queue_op and improve the comments
- Use bitmap functions to parse queue mask
- Improve comments
- Use bitmap functions to parse queue mask
- Improve comments
- Add rollback support
- Correct the way to find the vector for specific queue.

David Decotigny (2):
lib/bitmap.c: conversion routines to/from u32 array
test_bitmap: unit tests for lib/bitmap.c

Kan Liang (6)
net/ethtool: introduce a new ioctl for per queue setting net/ethtool: support get coalesce per queue net/ethtool: support set coalesce per queue
i40e: queue-specific settings for interrupt moderation i40e/ethtool: support coalesce getting by queue i40e/ethtool: support coalesce setting by queue

 drivers/net/ethernet/intel/i40e/i40e.h         |   7 -
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c |  15 +-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 151 +++++++----
 drivers/net/ethernet/intel/i40e/i40e_main.c    |  12 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c    |   9 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.h    |   8 +
 include/linux/bitmap.h                         |  10 +
 include/linux/ethtool.h                        |  15 +-
 include/uapi/linux/ethtool.h                   |  17 ++
 lib/Kconfig.debug                              |   8 +
 lib/Makefile                                   |   1 +
 lib/bitmap.c                                   |  89 ++++++
 lib/test_bitmap.c                              | 358 +++++++++++++++++++++++++
 net/core/ethtool.c                             | 121 ++++++++-
 tools/testing/selftests/lib/Makefile           |   2 +-
 tools/testing/selftests/lib/bitmap.sh          |  10 +
 16 files changed, 760 insertions(+), 73 deletions(-)
 create mode 100644 lib/test_bitmap.c
 create mode 100755 tools/testing/selftests/lib/bitmap.sh
Signature · 1 line
1.8.3.1