| From: |
| Ahmed Zaki <ahmed.zaki-AT-intel.com> |
| To: |
| netdev-AT-vger.kernel.org |
| Subject: |
| [PATCH net-next v3 0/6] net: napi: add CPU affinity to napi->config |
| Date: |
| Fri, 03 Jan 2025 17:43:08 -0700 |
| Message-ID: |
| <20250104004314.208259-1-ahmed.zaki@intel.com> |
| Cc: |
| intel-wired-lan-AT-lists.osuosl.org, andrew+netdev-AT-lunn.ch, edumazet-AT-google.com, kuba-AT-kernel.org, pabeni-AT-redhat.com, davem-AT-davemloft.net, michael.chan-AT-broadcom.com, tariqt-AT-nvidia.com, anthony.l.nguyen-AT-intel.com, przemyslaw.kitszel-AT-intel.com, jdamato-AT-fastly.com, shayd-AT-nvidia.com, akpm-AT-linux-foundation.org, Ahmed Zaki <ahmed.zaki-AT-intel.com> |
| Archive-link: |
| Article |
Move the IRQ affinity management to the napi struct. Since there can only
be one IRQ affinity notifier, the ARFS rmap management is moved to CORE
(patches 1 and 2), then the new notifier is extended to save the user-set
IRQ affinity mask in napi_config.
Tested on bnxt, ice and idpf.
v3:
- Assign one cpu per mask starting from local NUMA node (Shay Drori).
- Keep the new ARFS and Affinity flags per nedev (Jakub).
v2:
- https://lore.kernel.org/netdev/202412190454.nwvp3hU2-lkp@...
- Also move the ARFS IRQ affinity management from drivers to core. Via
netif_napi_set_irq(), drivers can ask the core to add the IRQ to the
ARFS rmap (already allocated by the driver).
RFC -> v1:
- https://lore.kernel.org/netdev/20241210002626.366878-1-ah...
- move static inline affinity functions to net/dev/core.c
- add the new napi->irq_flags (patch 1)
- add code changes to bnxt, mlx4 and ice.
Ahmed Zaki (6):
net: move ARFS rmap management to core
net: napi: add internal ARFS rmap management
net: napi: add CPU affinity to napi_config
bnxt: use napi's irq affinity
ice: use napi's irq affinity
idpf: use napi's irq affinity
drivers/net/ethernet/amazon/ena/ena_netdev.c | 38 +----
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 53 ++-----
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 -
drivers/net/ethernet/intel/ice/ice.h | 3 -
drivers/net/ethernet/intel/ice/ice_arfs.c | 17 +--
drivers/net/ethernet/intel/ice/ice_base.c | 7 +-
drivers/net/ethernet/intel/ice/ice_lib.c | 6 -
drivers/net/ethernet/intel/ice/ice_main.c | 47 +------
drivers/net/ethernet/intel/idpf/idpf_lib.c | 1 +
drivers/net/ethernet/intel/idpf/idpf_txrx.c | 22 +--
drivers/net/ethernet/intel/idpf/idpf_txrx.h | 6 +-
include/linux/cpu_rmap.h | 1 +
include/linux/netdevice.h | 23 ++-
lib/cpu_rmap.c | 2 +-
net/core/dev.c | 139 ++++++++++++++++++-
15 files changed, 186 insertions(+), 181 deletions(-)
--
2.43.0