net: stmmac: add per-q coalesce support
Status from this message: This patch was applied to netdev/net-next.git (refs/heads/master):
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest1 patch 1 replyApplied 1/1
- v11 patch 2 repliesSuperseded
Changes in v2 from the cover letter
* make unsupported queue coalesce params to return '0'.
* remove unrequired coalesce params check in __stmmac_set_coalesce as supported coalesce params are already listed in supported_coalesce_params.
Patches in v2 All 1 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | net: stmmac: add per-queue TX & RX coalesce ethtool supportdrivers/ drivers/ drivers/ +4 more | +143 | 1 reply | Applied |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Jakub Kicinski |
|---|---|
| 1/1 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next v2 0/1] net: stmmac: add per-q coalesce support
Hi,
This patch adds per-queue RX & TX coalesce control so that user can adjust the RX & TX interrupt moderation per queue. This is beneficial for mixed criticality control (according to VLAN priority) by user application.
The v2 patch has been tested (with added negative tests) and results from the output of the ethtool looks correct.
########################################################################
########################################
# Ethtool: RX and TX coalesce: Show Test
########################################
Quoted 1 line
ethtool --show-coalesce eth0
Coalesce parameters for eth0:
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Quoted 1 line
ethtool --per-queue eth0
queue_mask0xFF--show-coalesce
Queue: 0
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 1
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 2
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 3
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 4
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 5
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 6
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 7
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
############################################
# Ethtool: RX and TX coalesce: Positive Test
############################################
Quoted 3 lines
ethtool --per-queue eth0
queue_mask0x02--coalesce rx-usecs 100 rx-frames 5 ethtool --per-queue eth0queue_mask0x20--coalesce rx-usecs 100 rx-frames 5 ethtool --per-queue eth0queue_mask0x22--show-coalesce
Queue: 1
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 99
rx-frames: 5
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 5
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 99
rx-frames: 5
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Quoted 3 lines
ethtool --per-queue eth0
queue_mask0x04--coalesce tx-usecs 156 tx-frames 26 ethtool --per-queue eth0queue_mask0x40--coalesce tx-usecs 156 tx-frames 26 ethtool --per-queue eth0queue_mask0x44--show-coalesce
Queue: 2
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 200
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 156
tx-frames: 26
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 6
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 200
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 156
tx-frames: 26
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
############################################
# Ethtool: RX and TX coalesce: Negative Test
############################################
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x101--coalesce rx-usecs 107 rx-frames 7
Cannot get device per queue parameters: Invalid argument Cannot get device per queue parameters: Invalid argument
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x100--coalesce rx-usecs 107 rx-frames 7
Cannot get device per queue parameters: Invalid argument Cannot get device per queue parameters: Invalid argument
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x101--coalesce tx-usecs 157 tx-frames 27
Cannot get device per queue parameters: Invalid argument Cannot get device per queue parameters: Invalid argument
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x100--coalesce tx-usecs 157 tx-frames 27
Cannot get device per queue parameters: Invalid argument Cannot get device per queue parameters: Invalid argument
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x101--show-coalesce
Cannot get device per queue parameters: Invalid argument Cannot get device per queue parameters: Invalid argument
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x100--show-coalesce
Cannot get device per queue parameters: Invalid argument Cannot get device per queue parameters: Invalid argument
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce adaptive-rx on
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce adaptive-tx off
adaptive-tx unmodified, ignoring
Queue 0, no coalesce parameters changed
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce rx-usecs-irq 10
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce rx-frames-irq 10
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce tx-usecs-irq 10
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce tx-frames-irq 10
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce stats-block-usecs 10
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce pkt-rate-low 10
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce rx-usecs-low 100
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce rx-frames-low 100
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce tx-usecs-low 100
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce tx-frames-low 100
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce pkt-rate-high 10
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce rx-usecs-high 100
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce rx-frames-high 100
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce tx-usecs-high 100
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce tx-frames-high 100
Cannot set device per queue parameters: Operation not supported
Quoted 1 line
ethtool --per-queue eth0
queue_mask0x01--coalesce sample-interval 100
Cannot set device per queue parameters: Operation not supported
#########################################################
# Ethtool: RX and TX coalesce: Restore to driver default
#########################################################
Quoted 1 line
ethtool --per-queue eth0
queue_mask0xFF--coalesce rx-usecs 204 rx-frames 0
rx-frames unmodified, ignoring
rx-frames unmodified, ignoring
rx-frames unmodified, ignoring
rx-frames unmodified, ignoring
rx-frames unmodified, ignoring
rx-frames unmodified, ignoring
Quoted 1 line
ethtool --per-queue eth0
queue_mask0xFF--coalesce tx-usecs 1000 tx-frames 25
tx-usecs unmodified, ignoring
tx-frames unmodified, ignoring
Queue 0, no coalesce parameters changed
tx-usecs unmodified, ignoring
tx-frames unmodified, ignoring
Queue 1, no coalesce parameters changed
tx-usecs unmodified, ignoring
tx-frames unmodified, ignoring
Queue 3, no coalesce parameters changed
tx-usecs unmodified, ignoring
tx-frames unmodified, ignoring
Queue 4, no coalesce parameters changed
tx-usecs unmodified, ignoring
tx-frames unmodified, ignoring
Queue 5, no coalesce parameters changed
tx-usecs unmodified, ignoring
tx-frames unmodified, ignoring
Queue 7, no coalesce parameters changed
########################################
# Ethtool: RX and TX coalesce: Show Test
########################################
Quoted 1 line
ethtool --show-coalesce eth0
Coalesce parameters for eth0:
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Quoted 1 line
ethtool --per-queue eth0
queue_mask0xFF--show-coalesce
Queue: 0
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 1
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 2
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 3
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 4
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 5
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 6
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
Queue: 7
Adaptive RX: off TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0
rx-usecs: 202
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 1000
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frames-low: 0
tx-usecs-low: 0
tx-frames-low: 0
rx-usecs-high: 0
rx-frames-high: 0
tx-usecs-high: 0
tx-frames-high: 0
########################################################################
ChangeLogs:
v1 -> v2:
* make unsupported queue coalesce params to return '0'.
* remove unrequired coalesce params check in __stmmac_set_coalesce as supported coalesce params are already listed in supported_coalesce_params.
Thanks
Boon Leong
Ong Boon Leong (1):
net: stmmac: add per-queue TX & RX coalesce ethtool support
.../ethernet/stmicro/stmmac/dwmac1000_dma.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac4_dma.c | 7 +- .../ethernet/stmicro/stmmac/dwxgmac2_dma.c | 7 +- drivers/net/ethernet/stmicro/stmmac/hwif.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 8 +- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 118 +++++++++++++++--- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 48 ++++--- 7 files changed, 143 insertions(+), 49 deletions(-)
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel