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
                   ` (21 more replies)
  0 siblings, 22 replies; 26+ 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] 26+ messages in thread

end of thread, other threads:[~2024-11-26 15:28 UTC | newest]

Thread overview: 26+ 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

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).