Skip to content

RFC Cleanup IRQ affinity checks in several drivers

Joe Damato intel-wired-lan linux-rdma lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6netdevice: Add napi_affinity_no_changeinclude/linux/netdevice.h net/core/dev.c+22 -06 replies
2/6mlx5: Use napi_affinity_no_changedrivers/net/ethernet/mellanox/mlx5/core/en.h drivers/net/ethernet/mellanox/mlx5/core/en_main.c drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c+3 -100 replies
3/6gve: Use napi_affinity_no_changedrivers/net/ethernet/google/gve/gve_main.c+1 -133 replies
4/6i40e: Use napi_affinity_no_changedrivers/net/ethernet/intel/i40e/i40e.h drivers/net/ethernet/intel/i40e/i40e_main.c drivers/net/ethernet/intel/i40e/i40e_txrx.c+3 -50 replies
5/6iavf: Use napi_affinity_no_changedrivers/net/ethernet/intel/iavf/iavf.h drivers/net/ethernet/intel/iavf/iavf_main.c drivers/net/ethernet/intel/iavf/iavf_txrx.c+5 -40 replies
6/6mlx4: Use napi_affinity_no_changedrivers/net/ethernet/mellanox/mlx4/en_cq.c drivers/net/ethernet/mellanox/mlx4/en_rx.c drivers/net/ethernet/mellanox/mlx4/eq.c +2 more+8 -90 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC net-next 0/6] Cleanup IRQ affinity checks in several drivers

Greetings:

Several drivers make a check in their napi poll functions to determine if the CPU affinity of the IRQ has changed. If it has, the napi poll function returns a value less than the budget to force polling mode to be disabled, so that it can be rescheduled on the correct CPU next time the softirq is raised.

This code is repeated in at least 5 drivers that I found, but there might be more I missed (please let me know and I'll fix them). IMHO, it'd be nice to fix this in existing drivers and avoid future drivers repeating the same pattern.

FWIW, it's possible that patch 4, 5, and 6 could be separated into "fixes" for the type mismatches and then, separaately, new code, but that seemed like a lot of noise for the list and maybe unnecessary.

If I should first send fixes for 4, 5, and 6 and then send this cleanup series after, let me know and I'll do that.

Sending as an RFC because:
- I wanted to see if this cleanup was desirable overall, and
- If so, do I need to send fixes for 4-6 first?

Thanks,
Joe

Joe Damato (6):
netdevice: Add napi_affinity_no_change
mlx5: Use napi_affinity_no_change
gve: Use napi_affinity_no_change
i40e: Use napi_affinity_no_change
iavf: Use napi_affinity_no_change
mlx4: Use napi_affinity_no_change

 drivers/net/ethernet/google/gve/gve_main.c        | 14 +-------------
 drivers/net/ethernet/intel/i40e/i40e.h            |  2 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c       |  2 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c       |  4 +---
 drivers/net/ethernet/intel/iavf/iavf.h            |  1 +
 drivers/net/ethernet/intel/iavf/iavf_main.c       |  4 +++-
 drivers/net/ethernet/intel/iavf/iavf_txrx.c       |  4 +---
 drivers/net/ethernet/mellanox/mlx4/en_cq.c        |  6 ++++--
 drivers/net/ethernet/mellanox/mlx4/en_rx.c        |  6 +-----
 drivers/net/ethernet/mellanox/mlx4/eq.c           |  2 +-
 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h      |  1 +
 drivers/net/ethernet/mellanox/mlx5/core/en.h      |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c |  9 +--------
 include/linux/mlx4/device.h                       |  2 +-
 include/linux/netdevice.h                         |  8 ++++++++
 net/core/dev.c                                    | 14 ++++++++++++++
 17 files changed, 42 insertions(+), 41 deletions(-)
Signature · 1 line
2.25.1