DPDK patches and discussions
 help / color / mirror / Atom feed
* [RFC PATCH 00/21] Reduce code duplication across Intel NIC drivers
@ 2024-11-22 12:53 Bruce Richardson
  2024-11-22 12:53 ` [RFC PATCH 01/21] common/intel_eth: add pkt reassembly fn for intel drivers Bruce Richardson
                   ` (24 more replies)
  0 siblings, 25 replies; 101+ messages in thread
From: Bruce Richardson @ 2024-11-22 12:53 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

This RFC attempts to reduce the amount of code duplication across a
number of Intel NIC drivers, specifically: ixgbe, i40e, iavf, and ice.

The first patch extract a function from the Rx side, otherwise the
majority of the changes are on the Tx side, leading to a converged Tx
queue structure across the 4 drivers, and a large number of common
functions.

Open question:
* How should common code across drivers within a single device class be
  managed?
  - For now, I've created an "intel_eth" folder within the "common"
    driver directory, thinking about it after, it  implies to me that
    it is common across driver classes.
  - Would it be better to create an "intel_common" directory within the
    "net" folder?

Bruce Richardson (21):
  common/intel_eth: add pkt reassembly fn for intel drivers
  common/intel_eth: provide common Tx entry structures
  common/intel_eth: add Tx mbuf ring replenish fn
  drivers/net: align Tx queue struct field names
  drivers/net: add prefix for driver-specific structs
  common/intel_eth: merge ice and i40e Tx queue struct
  net/iavf: use common Tx queue structure
  net/ixgbe: convert Tx queue context cache field to ptr
  net/ixgbe: use common Tx queue structure
  common/intel_eth: pack Tx queue structure
  common/intel_eth: add post-Tx buffer free function
  common/intel_eth: add Tx buffer free fn for AVX-512
  net/iavf: use common Tx free fn for AVX-512
  net/ice: move Tx queue mbuf cleanup fn to common
  net/i40e: use common Tx queue mbuf cleanup fn
  net/ixgbe: use common Tx queue mbuf cleanup fn
  net/iavf: use common Tx queue mbuf cleanup fn
  net/ice: use vector SW ring for all vector paths
  net/i40e: use vector SW ring for all vector paths
  net/iavf: use vector SW ring for all vector paths
  net/ixgbe: use common Tx backlog entry fn

 drivers/common/intel_eth/ieth_rxtx.h          | 153 +++++++++++
 .../common/intel_eth/ieth_rxtx_vec_common.h   | 260 ++++++++++++++++++
 drivers/net/i40e/i40e_ethdev.c                |   4 +-
 drivers/net/i40e/i40e_ethdev.h                |   8 +-
 drivers/net/i40e/i40e_fdir.c                  |  10 +-
 .../net/i40e/i40e_recycle_mbufs_vec_common.c  |   6 +-
 drivers/net/i40e/i40e_rxtx.c                  | 194 +++++--------
 drivers/net/i40e/i40e_rxtx.h                  |  61 +---
 drivers/net/i40e/i40e_rxtx_vec_altivec.c      |  26 +-
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         |  26 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c       | 144 +---------
 drivers/net/i40e/i40e_rxtx_vec_common.h       | 144 +---------
 drivers/net/i40e/i40e_rxtx_vec_neon.c         |  26 +-
 drivers/net/i40e/i40e_rxtx_vec_sse.c          |  26 +-
 drivers/net/i40e/meson.build                  |   2 +-
 drivers/net/iavf/iavf.h                       |   2 +-
 drivers/net/iavf/iavf_ethdev.c                |   4 +-
 drivers/net/iavf/iavf_rxtx.c                  | 180 +++++-------
 drivers/net/iavf/iavf_rxtx.h                  |  61 +---
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         |  46 ++--
 drivers/net/iavf/iavf_rxtx_vec_avx512.c       | 213 +++-----------
 drivers/net/iavf/iavf_rxtx_vec_common.h       | 160 +----------
 drivers/net/iavf/iavf_rxtx_vec_sse.c          |  57 ++--
 drivers/net/iavf/iavf_vchnl.c                 |   6 +-
 drivers/net/iavf/meson.build                  |   2 +-
 drivers/net/ice/ice_dcf.c                     |   4 +-
 drivers/net/ice/ice_dcf_ethdev.c              |  21 +-
 drivers/net/ice/ice_diagnose.c                |   2 +-
 drivers/net/ice/ice_ethdev.c                  |   2 +-
 drivers/net/ice/ice_ethdev.h                  |   7 +-
 drivers/net/ice/ice_rxtx.c                    | 164 +++++------
 drivers/net/ice/ice_rxtx.h                    |  52 +---
 drivers/net/ice/ice_rxtx_vec_avx2.c           |  26 +-
 drivers/net/ice/ice_rxtx_vec_avx512.c         | 153 +----------
 drivers/net/ice/ice_rxtx_vec_common.h         | 190 +------------
 drivers/net/ice/ice_rxtx_vec_sse.c            |  30 +-
 drivers/net/ice/meson.build                   |   2 +-
 drivers/net/ixgbe/base/ixgbe_osdep.h          |   2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |   4 +-
 .../ixgbe/ixgbe_recycle_mbufs_vec_common.c    |   6 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                | 137 ++++-----
 drivers/net/ixgbe/ixgbe_rxtx.h                |  73 +----
 drivers/net/ixgbe/ixgbe_rxtx_vec_common.h     | 119 +-------
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c       |  33 +--
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c        |  33 +--
 drivers/net/ixgbe/meson.build                 |   2 +-
 46 files changed, 1008 insertions(+), 1875 deletions(-)
 create mode 100644 drivers/common/intel_eth/ieth_rxtx.h
 create mode 100644 drivers/common/intel_eth/ieth_rxtx_vec_common.h

--
2.43.0


^ permalink raw reply	[flat|nested] 101+ messages in thread

end of thread, other threads:[~2024-12-11 17:36 UTC | newest]

Thread overview: 101+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-22 12:53 [RFC PATCH 00/21] Reduce code duplication across Intel NIC drivers Bruce Richardson
2024-11-22 12:53 ` [RFC PATCH 01/21] common/intel_eth: add pkt reassembly fn for intel drivers Bruce Richardson
2024-11-22 12:53 ` [RFC PATCH 02/21] common/intel_eth: provide common Tx entry structures Bruce Richardson
2024-11-22 12:53 ` [RFC PATCH 03/21] common/intel_eth: add Tx mbuf ring replenish fn Bruce Richardson
2024-11-22 12:53 ` [RFC PATCH 04/21] drivers/net: align Tx queue struct field names Bruce Richardson
2024-11-22 12:53 ` [RFC PATCH 05/21] drivers/net: add prefix for driver-specific structs Bruce Richardson
2024-11-22 12:53 ` [RFC PATCH 06/21] common/intel_eth: merge ice and i40e Tx queue struct Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 07/21] net/iavf: use common Tx queue structure Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 08/21] net/ixgbe: convert Tx queue context cache field to ptr Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 09/21] net/ixgbe: use common Tx queue structure Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 10/21] common/intel_eth: pack " Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 11/21] common/intel_eth: add post-Tx buffer free function Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 12/21] common/intel_eth: add Tx buffer free fn for AVX-512 Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 13/21] net/iavf: use common Tx " Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 14/21] net/ice: move Tx queue mbuf cleanup fn to common Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 15/21] net/i40e: use common Tx queue mbuf cleanup fn Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 16/21] net/ixgbe: " Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 17/21] net/iavf: " Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 18/21] net/ice: use vector SW ring for all vector paths Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 19/21] net/i40e: " Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 20/21] net/iavf: " Bruce Richardson
2024-11-22 12:54 ` [RFC PATCH 21/21] net/ixgbe: use common Tx backlog entry fn Bruce Richardson
2024-11-25 16:25 ` [RFC PATCH 00/21] Reduce code duplication across Intel NIC drivers David Marchand
2024-11-25 16:31   ` Bruce Richardson
2024-11-26 14:57     ` Thomas Monjalon
2024-11-26 15:27       ` Bruce Richardson
2024-12-02 11:24 ` [PATCH v1 " Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 01/21] net/_common_intel: add pkt reassembly fn for intel drivers Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 02/21] net/_common_intel: provide common Tx entry structures Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 03/21] net/_common_intel: add Tx mbuf ring replenish fn Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 04/21] drivers/net: align Tx queue struct field names Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 05/21] drivers/net: add prefix for driver-specific structs Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 06/21] net/_common_intel: merge ice and i40e Tx queue struct Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 07/21] net/iavf: use common Tx queue structure Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 08/21] net/ixgbe: convert Tx queue context cache field to ptr Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 09/21] net/ixgbe: use common Tx queue structure Bruce Richardson
2024-12-02 13:51     ` Medvedkin, Vladimir
2024-12-02 14:09       ` Bruce Richardson
2024-12-02 15:15         ` Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 10/21] net/_common_intel: pack " Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 11/21] net/_common_intel: add post-Tx buffer free function Bruce Richardson
2024-12-02 12:59     ` David Marchand
2024-12-02 13:12       ` Bruce Richardson
2024-12-02 13:24       ` Bruce Richardson
2024-12-02 13:55         ` David Marchand
2024-12-02 11:24   ` [PATCH v1 12/21] net/_common_intel: add Tx buffer free fn for AVX-512 Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 13/21] net/iavf: use common Tx " Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 14/21] net/ice: move Tx queue mbuf cleanup fn to common Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 15/21] net/i40e: use common Tx queue mbuf cleanup fn Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 16/21] net/ixgbe: " Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 17/21] net/iavf: " Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 18/21] net/ice: use vector SW ring for all vector paths Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 19/21] net/i40e: " Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 20/21] net/iavf: " Bruce Richardson
2024-12-02 11:24   ` [PATCH v1 21/21] net/ixgbe: use common Tx backlog entry fn Bruce Richardson
2024-12-03 16:41 ` [PATCH v2 00/22] Reduce code duplication across Intel NIC drivers Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 01/22] net/_common_intel: add pkt reassembly fn for intel drivers Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 02/22] net/_common_intel: provide common Tx entry structures Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 03/22] net/_common_intel: add Tx mbuf ring replenish fn Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 04/22] drivers/net: align Tx queue struct field names Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 05/22] drivers/net: add prefix for driver-specific structs Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 06/22] net/_common_intel: merge ice and i40e Tx queue struct Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 07/22] net/iavf: use common Tx queue structure Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 08/22] net/ixgbe: convert Tx queue context cache field to ptr Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 09/22] net/ixgbe: use common Tx queue structure Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 10/22] net/_common_intel: pack " Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 11/22] net/_common_intel: add post-Tx buffer free function Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 12/22] net/_common_intel: add Tx buffer free fn for AVX-512 Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 13/22] net/iavf: use common Tx " Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 14/22] net/ice: move Tx queue mbuf cleanup fn to common Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 15/22] net/i40e: use common Tx queue mbuf cleanup fn Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 16/22] net/ixgbe: " Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 17/22] net/iavf: " Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 18/22] net/ice: use vector SW ring for all vector paths Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 19/22] net/i40e: " Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 20/22] net/iavf: " Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 21/22] net/_common_intel: remove unneeded code Bruce Richardson
2024-12-03 16:41   ` [PATCH v2 22/22] net/ixgbe: use common Tx backlog entry fn Bruce Richardson
2024-12-11 17:33 ` [PATCH v3 00/22] Reduce code duplication across Intel NIC drivers Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 01/22] net/_common_intel: add pkt reassembly fn for intel drivers Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 02/22] net/_common_intel: provide common Tx entry structures Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 03/22] net/_common_intel: add Tx mbuf ring replenish fn Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 04/22] drivers/net: align Tx queue struct field names Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 05/22] drivers/net: add prefix for driver-specific structs Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 06/22] net/_common_intel: merge ice and i40e Tx queue struct Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 07/22] net/iavf: use common Tx queue structure Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 08/22] net/ixgbe: convert Tx queue context cache field to ptr Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 09/22] net/ixgbe: use common Tx queue structure Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 10/22] net/_common_intel: pack " Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 11/22] net/_common_intel: add post-Tx buffer free function Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 12/22] net/_common_intel: add Tx buffer free fn for AVX-512 Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 13/22] net/iavf: use common Tx " Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 14/22] net/ice: move Tx queue mbuf cleanup fn to common Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 15/22] net/i40e: use common Tx queue mbuf cleanup fn Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 16/22] net/ixgbe: " Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 17/22] net/iavf: " Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 18/22] net/ice: use vector SW ring for all vector paths Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 19/22] net/i40e: " Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 20/22] net/iavf: " Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 21/22] net/_common_intel: remove unneeded code Bruce Richardson
2024-12-11 17:33   ` [PATCH v3 22/22] net/ixgbe: use common Tx backlog entry fn Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).