Skip to contentSkip to conversation

remove non-base files from base folders

PATCH Superseded Bruce Richardson 3 participants 32 messages Aug 14 – Aug 25

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover remove non-base files from base folders

The base code folders for intel drivers contained the compatibility *_osdep.h files as well as meson.build files, both of which are editable via regular DPDK patches. Although the DPDK documentation allows this arrangement, I (for one) have always found it a little awkward and confusing to have editable and non-editable files mixed.

For Intel drivers only, this patchset moves osdep file out of base, and merges the (in most cases trivial) meson.build files from base into the main driver meson.build file.

After this patch we have a clean separation - any files in base, with no exceptions, should be updated only via snapshot update patchsets from Intel. All files outside base are normal DPDK files that can be modified by any patch.

Bruce Richardson (8):
net/e1000: move editable files out of base folder net/fm10k: move editable files out of base folder net/i40e: move editable files out of base folder net/iavf: move editable files out of base folder net/ice: move editable files out of base folder net/idpf: move editable files out of base folder net/ixgbe: move editable files out of base folder net/ice: consolidate the sources list

 drivers/net/intel/cpfl/cpfl_actions.h         |  2 +-
 drivers/net/intel/cpfl/cpfl_controlq.h        |  2 +-
 drivers/net/intel/e1000/base/README           |  9 ---
 drivers/net/intel/e1000/base/meson.build      | 24 -------
 .../net/intel/e1000/{base => }/e1000_osdep.c  |  0
 .../net/intel/e1000/{base => }/e1000_osdep.h  |  4 +-
 drivers/net/intel/e1000/em_rxtx.c             |  2 +-
 drivers/net/intel/e1000/igc_ethdev.h          |  2 +-
 drivers/net/intel/e1000/meson.build           | 22 ++++++-
 drivers/net/intel/fm10k/base/meson.build      | 11 ----
 .../net/intel/fm10k/{base => }/fm10k_osdep.h  |  4 +-
 drivers/net/intel/fm10k/meson.build           |  9 ++-
 drivers/net/intel/i40e/base/README            |  8 ---
 drivers/net/intel/i40e/base/meson.build       | 12 ----
 .../net/intel/i40e/{base => }/i40e_osdep.h    |  4 +-
 drivers/net/intel/i40e/meson.build            | 10 ++-
 drivers/net/intel/iavf/base/README            |  8 ---
 .../iavf/{base/iavf_impl.c => iavf_osdep.c}   |  0
 .../net/intel/iavf/{base => }/iavf_osdep.h    |  2 +
 drivers/net/intel/iavf/meson.build            |  2 +-
 drivers/net/intel/ice/base/README             |  8 ---
 drivers/net/intel/ice/base/meson.build        | 51 ---------------
 drivers/net/intel/ice/{base => }/ice_osdep.h  |  4 +-
 drivers/net/intel/ice/meson.build             | 62 ++++++++++++++++---
 drivers/net/intel/idpf/base/README            |  8 ---
 drivers/net/intel/idpf/base/meson.build       |  7 ---
 .../net/intel/idpf/{base => }/idpf_osdep.h    |  4 +-
 drivers/net/intel/idpf/idpf_ptp.h             |  2 +-
 drivers/net/intel/idpf/meson.build            |  5 +-
 drivers/net/intel/ixgbe/base/README           |  9 ---
 drivers/net/intel/ixgbe/base/meson.build      | 19 ------
 drivers/net/intel/ixgbe/ixgbe_ethdev.c        | 12 ++--
 drivers/net/intel/ixgbe/ixgbe_flow.c          | 12 ++--
 .../net/intel/ixgbe/{base => }/ixgbe_osdep.h  |  2 +
 drivers/net/intel/ixgbe/meson.build           | 17 ++++-
 35 files changed, 148 insertions(+), 211 deletions(-)
 delete mode 100644 drivers/net/intel/e1000/base/meson.build
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.c (100%)
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.h (98%)
 delete mode 100644 drivers/net/intel/fm10k/base/meson.build
 rename drivers/net/intel/fm10k/{base => }/fm10k_osdep.h (98%)
 delete mode 100644 drivers/net/intel/i40e/base/meson.build
 rename drivers/net/intel/i40e/{base => }/i40e_osdep.h (98%)
 rename drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} (100%)
 rename drivers/net/intel/iavf/{base => }/iavf_osdep.h (98%)
 delete mode 100644 drivers/net/intel/ice/base/meson.build
 rename drivers/net/intel/ice/{base => }/ice_osdep.h (99%)
 delete mode 100644 drivers/net/intel/idpf/base/meson.build
 rename drivers/net/intel/idpf/{base => }/idpf_osdep.h (99%)
 delete mode 100644 drivers/net/intel/ixgbe/base/meson.build
 rename drivers/net/intel/ixgbe/{base => }/ixgbe_osdep.h (99%)

--
2.53.0

#1 lore raw

PATCH 1/8 net/e1000: move editable files out of base folder

The osdep files contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/e1000/base/README           |  9 -------
 drivers/net/intel/e1000/base/meson.build      | 24 -------------------
 .../net/intel/e1000/{base => }/e1000_osdep.c  |  0
 .../net/intel/e1000/{base => }/e1000_osdep.h  |  4 +++-
 drivers/net/intel/e1000/em_rxtx.c             |  2 +-
 drivers/net/intel/e1000/igc_ethdev.h          |  2 +-
 drivers/net/intel/e1000/meson.build           | 22 ++++++++++++++++-
 7 files changed, 26 insertions(+), 37 deletions(-)
 delete mode 100644 drivers/net/intel/e1000/base/meson.build
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.c (100%)
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.h (98%)
drivers/net/intel/e1000/base/README +0 -9
index f0c1e4af48..861b2650aa 100644
@@ -27,12 +27,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Controller I226
 * Intel® Ethernet Controller I354 Series
 * Intel® Ethernet Controller DH89XXCC Series
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    e1000_osdep.c
-    e1000_osdep.h
drivers/net/intel/e1000/base/meson.build deleted +0 -24
deleted file mode 100644
index 4fe86dc6df..0000000000
@@ -1,24 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
-
-base_sources = files(
-        'e1000_base.c',
-        'e1000_80003es2lan.c',
-        'e1000_82540.c',
-        'e1000_82541.c',
-        'e1000_82542.c',
-        'e1000_82543.c',
-        'e1000_82571.c',
-        'e1000_82575.c',
-        'e1000_api.c',
-        'e1000_i210.c',
-        'e1000_i225.c',
-        'e1000_ich8lan.c',
-        'e1000_mac.c',
-        'e1000_manage.c',
-        'e1000_mbx.c',
-        'e1000_nvm.c',
-        'e1000_osdep.c',
-        'e1000_phy.c',
-        'e1000_vf.c',
-)
drivers/net/intel/e1000/e1000_osdep.c renamed from drivers/net/intel/e1000/base/e1000_osdep.c +0 -0
similarity index 100%
rename from drivers/net/intel/e1000/base/e1000_osdep.c
rename to drivers/net/intel/e1000/e1000_osdep.c
drivers/net/intel/e1000/e1000_osdep.h renamed from drivers/net/intel/e1000/base/e1000_osdep.h +3 -1
similarity index 98%
rename from drivers/net/intel/e1000/base/e1000_osdep.h
rename to drivers/net/intel/e1000/e1000_osdep.h
index 895ffa5182..2a8da37476 100644
@@ -5,6 +5,8 @@
 #ifndef _E1000_OSDEP_H_
 #define _E1000_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <stdint.h>
 #include <stdio.h>
 #include <stdarg.h>
@@ -17,7 +19,7 @@
 #include <rte_byteorder.h>
 #include <rte_io.h>
 
-#include "../e1000_logs.h"
+#include "e1000_logs.h"
 
 #define DELAY(x) rte_delay_us_sleep(x)
 #define usec_delay(x) DELAY(x)
drivers/net/intel/e1000/em_rxtx.c +1 -1
index f9665127df..3e18ac994a 100644
@@ -43,7 +43,7 @@
 #include "e1000_logs.h"
 #include "base/e1000_api.h"
 #include "e1000_ethdev.h"
-#include "base/e1000_osdep.h"
+#include "e1000_osdep.h"
 
 #define	E1000_TXD_VLAN_SHIFT	16
 
drivers/net/intel/e1000/igc_ethdev.h +1 -1
index 7fa7877adf..e36fa4755e 100644
@@ -9,7 +9,7 @@
 #include <rte_flow.h>
 #include <rte_time.h>
 
-#include "base/e1000_osdep.h"
+#include "e1000_osdep.h"
 #include "base/e1000_hw.h"
 #include "base/e1000_i225.h"
 #include "base/e1000_api.h"
drivers/net/intel/e1000/meson.build +21 -1
index 924fe4ecae..6f1e300718 100644
@@ -1,10 +1,30 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-subdir('base')
+base_sources = files(
+        'base/e1000_base.c',
+        'base/e1000_80003es2lan.c',
+        'base/e1000_82540.c',
+        'base/e1000_82541.c',
+        'base/e1000_82542.c',
+        'base/e1000_82543.c',
+        'base/e1000_82571.c',
+        'base/e1000_82575.c',
+        'base/e1000_api.c',
+        'base/e1000_i210.c',
+        'base/e1000_i225.c',
+        'base/e1000_ich8lan.c',
+        'base/e1000_mac.c',
+        'base/e1000_manage.c',
+        'base/e1000_mbx.c',
+        'base/e1000_nvm.c',
+        'base/e1000_phy.c',
+        'base/e1000_vf.c',
+)
 
 sources += files(
         'e1000_logs.c',
+        'e1000_osdep.c',
         'em_ethdev.c',
         'em_rxtx.c',
         'igb_ethdev.c',
Signature · 1 line
2.53.0
#2 lore raw

PATCH 2/8 net/fm10k: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/fm10k/base/meson.build         | 11 -----------
 drivers/net/intel/fm10k/{base => }/fm10k_osdep.h |  4 +++-
 drivers/net/intel/fm10k/meson.build              |  9 ++++++++-
 3 files changed, 11 insertions(+), 13 deletions(-)
 delete mode 100644 drivers/net/intel/fm10k/base/meson.build
 rename drivers/net/intel/fm10k/{base => }/fm10k_osdep.h (98%)
drivers/net/intel/fm10k/base/meson.build deleted +0 -11
deleted file mode 100644
index c45b31d6b2..0000000000
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
-
-base_sources = files(
-        'fm10k_api.c',
-        'fm10k_common.c',
-        'fm10k_mbx.c',
-        'fm10k_pf.c',
-        'fm10k_tlv.c',
-        'fm10k_vf.c',
-)
drivers/net/intel/fm10k/fm10k_osdep.h renamed from drivers/net/intel/fm10k/base/fm10k_osdep.h +3 -1
similarity index 98%
rename from drivers/net/intel/fm10k/base/fm10k_osdep.h
rename to drivers/net/intel/fm10k/fm10k_osdep.h
index 5f8ff10474..69c542a6d0 100644
@@ -5,6 +5,8 @@
 #ifndef _FM10K_OSDEP_H_
 #define _FM10K_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <stdint.h>
 #include <stdbool.h>
 #include <string.h>
@@ -13,7 +15,7 @@
 #include <rte_cycles.h>
 #include <rte_io.h>
 
-#include "../fm10k_logs.h"
+#include "fm10k_logs.h"
 
 /* TODO: this does not look like it should be used... */
 #define ERROR_REPORT2(v1, v2, v3)   do { } while (0)
drivers/net/intel/fm10k/meson.build +8 -1
index fac4750f8d..a532b35818 100644
@@ -7,7 +7,14 @@ if is_windows
     subdir_done()
 endif
 
-subdir('base')
+base_sources = files(
+        'base/fm10k_api.c',
+        'base/fm10k_common.c',
+        'base/fm10k_mbx.c',
+        'base/fm10k_pf.c',
+        'base/fm10k_tlv.c',
+        'base/fm10k_vf.c',
+)
 
 sources += files(
         'fm10k_ethdev.c',
Signature · 1 line
2.53.0
#3 lore raw

PATCH 3/8 net/i40e: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/i40e/base/README             |  8 --------
 drivers/net/intel/i40e/base/meson.build        | 12 ------------
 drivers/net/intel/i40e/{base => }/i40e_osdep.h |  4 +++-
 drivers/net/intel/i40e/meson.build             | 10 +++++++++-
 4 files changed, 12 insertions(+), 22 deletions(-)
 delete mode 100644 drivers/net/intel/i40e/base/meson.build
 rename drivers/net/intel/i40e/{base => }/i40e_osdep.h (98%)
drivers/net/intel/i40e/base/README +0 -8
index 59cae0fc90..77ae90dcd1 100644
@@ -21,11 +21,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Controller X710 and XL710 Family
 * Intel® Ethernet Controller XXV710 for 25GbE backplane
 * Intel® Ethernet Controller XXV710 for 25GbE SFP28
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    i40e_osdep.h
drivers/net/intel/i40e/base/meson.build deleted +0 -12
deleted file mode 100644
index 7b4882ad1d..0000000000
@@ -1,12 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017-2020 Intel Corporation
-
-base_sources = files(
-        'i40e_adminq.c',
-        'i40e_common.c',
-        'i40e_dcb.c',
-        'i40e_diag.c',
-        'i40e_hmc.c',
-        'i40e_lan_hmc.c',
-        'i40e_nvm.c',
-)
drivers/net/intel/i40e/i40e_osdep.h renamed from drivers/net/intel/i40e/base/i40e_osdep.h +3 -1
similarity index 98%
rename from drivers/net/intel/i40e/base/i40e_osdep.h
rename to drivers/net/intel/i40e/i40e_osdep.h
index 9c5a94f055..1139c9c1fb 100644
@@ -5,6 +5,8 @@
 #ifndef _I40E_OSDEP_H_
 #define _I40E_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdbool.h>
@@ -18,7 +20,7 @@
 #include <rte_log.h>
 #include <rte_io.h>
 
-#include "../i40e_logs.h"
+#include "i40e_logs.h"
 #include "i40e_status.h"
 
 #define INLINE inline
drivers/net/intel/i40e/meson.build +9 -1
index bccae1ffc1..3229233f50 100644
@@ -17,7 +17,15 @@ if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
     subdir_done()
 endif
 
-subdir('base')
+base_sources = files(
+        'base/i40e_adminq.c',
+        'base/i40e_common.c',
+        'base/i40e_dcb.c',
+        'base/i40e_diag.c',
+        'base/i40e_hmc.c',
+        'base/i40e_lan_hmc.c',
+        'base/i40e_nvm.c',
+)
 
 sources += files(
         'i40e_ethdev.c',
Signature · 1 line
2.53.0
#4 lore raw

PATCH 4/8 net/iavf: move editable files out of base folder

In reply to Bruce Richardson

The osdep header and iavf_impl.c file contain the macros and other definitions needed to allow the base code to compile as part of DPDK. Although they are stored in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/iavf/base/README                        | 8 --------
 drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} | 0
 drivers/net/intel/iavf/{base => }/iavf_osdep.h            | 2 ++
 drivers/net/intel/iavf/meson.build                        | 2 +-
 4 files changed, 3 insertions(+), 9 deletions(-)
 rename drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} (100%)
 rename drivers/net/intel/iavf/{base => }/iavf_osdep.h (98%)
drivers/net/intel/iavf/base/README +0 -8
index 61bcf0ef0e..d6a1dfbc96 100644
@@ -7,11 +7,3 @@ Intel® IAVF driver
 
 This directory contains a snapshot of the iavf shared, or base, driver code.
 The snapshot was generated on 2024.09.17.
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from the following files:
-
-    iavf_osdep.h
-    iavf_impl.c
drivers/net/intel/iavf/iavf_osdep.c renamed from drivers/net/intel/iavf/base/iavf_impl.c +0 -0
similarity index 100%
rename from drivers/net/intel/iavf/base/iavf_impl.c
rename to drivers/net/intel/iavf/iavf_osdep.c
drivers/net/intel/iavf/iavf_osdep.h renamed from drivers/net/intel/iavf/base/iavf_osdep.h +2 -0
similarity index 98%
rename from drivers/net/intel/iavf/base/iavf_osdep.h
rename to drivers/net/intel/iavf/iavf_osdep.h
index cb95b848b6..dc2145b8c2 100644
@@ -5,6 +5,8 @@
 #ifndef _IAVF_OSDEP_H_
 #define _IAVF_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdbool.h>
drivers/net/intel/iavf/meson.build +1 -1
index 50630a88c8..9b071a3a4b 100644
@@ -12,7 +12,6 @@ deps += ['security', 'cryptodev']
 sources = files(
         'base/iavf_adminq.c',
         'base/iavf_common.c',
-        'base/iavf_impl.c',
 
         'iavf_base_symbols.c',
         'iavf_ethdev.c',
@@ -21,6 +20,7 @@ sources = files(
         'iavf_generic_flow.c',
         'iavf_fdir.c',
         'iavf_hash.c',
+        'iavf_osdep.c',
         'iavf_tm.c',
         'iavf_ipsec_crypto.c',
         'iavf_fsub.c',
Signature · 1 line
2.53.0
#5 lore raw

PATCH 5/8 net/ice: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/ice/base/README            |  8 ---
 drivers/net/intel/ice/base/meson.build       | 51 --------------------
 drivers/net/intel/ice/{base => }/ice_osdep.h |  4 +-
 drivers/net/intel/ice/meson.build            | 51 +++++++++++++++++++-
 4 files changed, 52 insertions(+), 62 deletions(-)
 delete mode 100644 drivers/net/intel/ice/base/meson.build
 rename drivers/net/intel/ice/{base => }/ice_osdep.h (99%)
drivers/net/intel/ice/base/README +0 -8
index 1f6b53c4c2..caec47217c 100644
@@ -13,11 +13,3 @@ This driver is valid for the product(s) listed below
 
 * Intel® Ethernet Network Adapters E810
 * Intel® Ethernet Network Adapters E830
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    ice_osdep.h
drivers/net/intel/ice/base/meson.build deleted +0 -51

51 lines not on this page · raw message

drivers/net/intel/ice/ice_osdep.h renamed from drivers/net/intel/ice/base/ice_osdep.h +3 -1
similarity index 99%
rename from drivers/net/intel/ice/base/ice_osdep.h
rename to drivers/net/intel/ice/ice_osdep.h
index 5d92cf5aa4..599bd4086b 100644
@@ -5,6 +5,8 @@
 #ifndef _ICE_OSDEP_H_
 #define _ICE_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -24,7 +26,7 @@
 
 #include "ice_alloc.h"
 
-#include "../ice_logs.h"
+#include "ice_logs.h"
 
 #ifndef __INTEL_NET_BASE_OSDEP__
 #define __INTEL_NET_BASE_OSDEP__
drivers/net/intel/ice/meson.build +49 -2

60 lines not on this page · raw message

Signature · 1 line
2.53.0
#6 lore raw

PATCH 6/8 net/idpf: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/cpfl/cpfl_actions.h          | 2 +-
 drivers/net/intel/cpfl/cpfl_controlq.h         | 2 +-
 drivers/net/intel/idpf/base/README             | 8 --------
 drivers/net/intel/idpf/base/meson.build        | 7 -------
 drivers/net/intel/idpf/{base => }/idpf_osdep.h | 4 +++-
 drivers/net/intel/idpf/idpf_ptp.h              | 2 +-
 drivers/net/intel/idpf/meson.build             | 5 ++++-
 7 files changed, 10 insertions(+), 20 deletions(-)
 delete mode 100644 drivers/net/intel/idpf/base/meson.build
 rename drivers/net/intel/idpf/{base => }/idpf_osdep.h (99%)
drivers/net/intel/cpfl/cpfl_actions.h +1 -1
index 7b82119e39..772b3ff999 100644
@@ -5,7 +5,7 @@
 #ifndef _CPFL_ACTIONS_H_
 #define _CPFL_ACTIONS_H_
 
-#include "base/idpf_osdep.h"
+#include "idpf_osdep.h"
 
 #pragma pack(1)
 
drivers/net/intel/cpfl/cpfl_controlq.h +1 -1
index 740ae6522c..812b1b14a6 100644
@@ -5,7 +5,7 @@
 #ifndef _CPFL_CONTROLQ_H_
 #define _CPFL_CONTROLQ_H_
 
-#include "base/idpf_osdep.h"
+#include "idpf_osdep.h"
 #include "base/idpf_controlq_api.h"
 
 #define CPFL_CTLQ_DESCRIPTOR_SIZE	32
drivers/net/intel/idpf/base/README +0 -8
index 457b5a81f3..aa617f1819 100644
@@ -11,11 +11,3 @@ The directory of base/ contains the original source package.
 This driver is valid for the product(s) listed below
 
 * Intel® IPU E2100
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    idpf_osdep.h
drivers/net/intel/idpf/base/meson.build deleted +0 -7
deleted file mode 100644
index 78782e463e..0000000000
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2023 Intel Corporation
-
-base_sources = files(
-        'idpf_controlq.c',
-        'idpf_controlq_setup.c',
-)
drivers/net/intel/idpf/idpf_osdep.h renamed from drivers/net/intel/idpf/base/idpf_osdep.h +3 -1
similarity index 99%
rename from drivers/net/intel/idpf/base/idpf_osdep.h
rename to drivers/net/intel/idpf/idpf_osdep.h
index 67bc33f2e6..9c758fb3c0 100644
@@ -5,6 +5,8 @@
 #ifndef _IDPF_OSDEP_H_
 #define _IDPF_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -24,7 +26,7 @@
 #include <rte_io.h>
 #include <rte_compat.h>
 
-#include "../idpf_common_logs.h"
+#include "idpf_common_logs.h"
 
 #define INLINE inline
 #define STATIC static
drivers/net/intel/idpf/idpf_ptp.h +1 -1
index 0c901440fb..ecb59200bd 100644
@@ -5,7 +5,7 @@
 #ifndef _IDPF_PTP_H_
 #define _IDPF_PTP_H_
 
-#include "base/idpf_osdep.h"
+#include "idpf_osdep.h"
 #include <rte_time.h>
 #include "idpf_common_device.h"
 
drivers/net/intel/idpf/meson.build +4 -1
index 740c1a5985..311f300ccb 100644
@@ -7,7 +7,10 @@ if is_windows
     subdir_done()
 endif
 
-subdir('base')
+base_sources = files(
+        'base/idpf_controlq.c',
+        'base/idpf_controlq_setup.c',
+)
 
 includes += include_directories('../iavf/base')
 
Signature · 1 line
2.53.0
#7 lore raw

PATCH 7/8 net/ixgbe: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/ixgbe/base/README           |  9 ---------
 drivers/net/intel/ixgbe/base/meson.build      | 19 -------------------
 drivers/net/intel/ixgbe/ixgbe_ethdev.c        | 12 ++++++------
 drivers/net/intel/ixgbe/ixgbe_flow.c          | 12 ++++++------
 .../net/intel/ixgbe/{base => }/ixgbe_osdep.h  |  2 ++
 drivers/net/intel/ixgbe/meson.build           | 17 ++++++++++++++++-
 6 files changed, 30 insertions(+), 41 deletions(-)
 delete mode 100644 drivers/net/intel/ixgbe/base/meson.build
 rename drivers/net/intel/ixgbe/{base => }/ixgbe_osdep.h (99%)
drivers/net/intel/ixgbe/base/README +0 -9
index b48438f1db..bea5061abc 100644
@@ -25,12 +25,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Server Adapter X520-T2
 * Intel® Ethernet Controller X550 Series
 * Intel® Ethernet Controller E610 Series
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    ixgbe_osdep.h
-    ixgbe_osdep.c
drivers/net/intel/ixgbe/base/meson.build deleted +0 -19
deleted file mode 100644
index c0b14a1db3..0000000000
@@ -1,19 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017-2024 Intel Corporation
-
-base_sources = files(
-        'ixgbe_82598.c',
-        'ixgbe_82599.c',
-        'ixgbe_api.c',
-        'ixgbe_common.c',
-        'ixgbe_dcb_82598.c',
-        'ixgbe_dcb_82599.c',
-        'ixgbe_dcb.c',
-        'ixgbe_e610.c',
-        'ixgbe_hv_vf.c',
-        'ixgbe_mbx.c',
-        'ixgbe_phy.c',
-        'ixgbe_vf.c',
-        'ixgbe_x540.c',
-        'ixgbe_x550.c',
-)
drivers/net/intel/ixgbe/ixgbe_ethdev.c +6 -6
index 3d4f4fb7fc..8e44bb3a09 100644
@@ -36,15 +36,15 @@
 #include <rte_os_shim.h>
 
 #include "ixgbe_logs.h"
-#include "base/ixgbe_api.h"
-#include "base/ixgbe_vf.h"
-#include "base/ixgbe_common.h"
+#include "ixgbe_api.h"
+#include "ixgbe_vf.h"
+#include "ixgbe_common.h"
 #include "ixgbe_ethdev.h"
 #include "ixgbe_bypass.h"
 #include "ixgbe_rxtx.h"
-#include "base/ixgbe_type.h"
-#include "base/ixgbe_phy.h"
-#include "base/ixgbe_osdep.h"
+#include "ixgbe_type.h"
+#include "ixgbe_phy.h"
+#include "ixgbe_osdep.h"
 #include "ixgbe_regs.h"
 
 /*
drivers/net/intel/ixgbe/ixgbe_flow.c +6 -6
index 7f1241951f..01ee4dbb4a 100644
@@ -35,15 +35,15 @@
 #include <rte_flow_driver.h>
 
 #include "ixgbe_logs.h"
-#include "base/ixgbe_api.h"
-#include "base/ixgbe_vf.h"
-#include "base/ixgbe_common.h"
-#include "base/ixgbe_osdep.h"
+#include "ixgbe_api.h"
+#include "ixgbe_vf.h"
+#include "ixgbe_common.h"
+#include "ixgbe_osdep.h"
 #include "ixgbe_ethdev.h"
 #include "ixgbe_bypass.h"
 #include "ixgbe_rxtx.h"
-#include "base/ixgbe_type.h"
-#include "base/ixgbe_phy.h"
+#include "ixgbe_type.h"
+#include "ixgbe_phy.h"
 #include "rte_pmd_ixgbe.h"
 
 #include "../common/flow_check.h"
drivers/net/intel/ixgbe/ixgbe_osdep.h renamed from drivers/net/intel/ixgbe/base/ixgbe_osdep.h +2 -0
similarity index 99%
rename from drivers/net/intel/ixgbe/base/ixgbe_osdep.h
rename to drivers/net/intel/ixgbe/ixgbe_osdep.h
index 4dfed02137..9f4f5e8038 100644
@@ -5,6 +5,8 @@
 #ifndef _IXGBE_OS_H_
 #define _IXGBE_OS_H_
 
+/* File containing OS dependencies for base code */
+
 #include <pthread.h>
 #include <string.h>
 #include <stdint.h>
drivers/net/intel/ixgbe/meson.build +16 -1
index 7e737ee7b4..0531d37acd 100644
@@ -3,7 +3,22 @@
 
 cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
 
-subdir('base')
+base_sources = files(
+        'base/ixgbe_82598.c',
+        'base/ixgbe_82599.c',
+        'base/ixgbe_api.c',
+        'base/ixgbe_common.c',
+        'base/ixgbe_dcb_82598.c',
+        'base/ixgbe_dcb_82599.c',
+        'base/ixgbe_dcb.c',
+        'base/ixgbe_e610.c',
+        'base/ixgbe_hv_vf.c',
+        'base/ixgbe_mbx.c',
+        'base/ixgbe_phy.c',
+        'base/ixgbe_vf.c',
+        'base/ixgbe_x540.c',
+        'base/ixgbe_x550.c',
+)
 
 sources += files(
         'ixgbe_82599_bypass.c',
Signature · 1 line
2.53.0
#8 lore raw

Re: [PATCH 7/8] net/ixgbe: move editable files out of base folder

Quoted 14 lines · Bruce Richardson
drivers/net/intel/ixgbe/ixgbe_ethdev.c +3 -3
index 3d4f4fb7fc..8e44bb3a09 100644
@@ -36,15 +36,15 @@
 #include <rte_os_shim.h>
 
 #include "ixgbe_logs.h"
-#include "base/ixgbe_api.h"
-#include "base/ixgbe_vf.h"
-#include "base/ixgbe_common.h"
+#include "ixgbe_api.h"
+#include "ixgbe_vf.h"
+#include "ixgbe_common.h"

drivers/net/intel/ixgbe/ixgbe_ethdev.c line 48

Quoted 10 lines
drivers/net/intel/ixgbe/ixgbe_ethdev.c +3 -3
 #include "ixgbe_ethdev.h"
 #include "ixgbe_bypass.h"
 #include "ixgbe_rxtx.h"
-#include "base/ixgbe_type.h"
-#include "base/ixgbe_phy.h"
-#include "base/ixgbe_osdep.h"
+#include "ixgbe_type.h"
+#include "ixgbe_phy.h"
+#include "ixgbe_osdep.h"
 #include "ixgbe_regs.h"

While I agree with the base/ixgbe_osdep.h -> ixgbe_osdep.h conversion, I don't get why you *need* to change other base headers inclusions above.

The rest of the series looks good to me.

Signature · 1 line
David Marchand
#9 lore raw

Re: [PATCH 7/8] net/ixgbe: move editable files out of base folder

Quoted 31 lines · David Marchand
Quoted 14 lines · Bruce Richardson
drivers/net/intel/ixgbe/ixgbe_ethdev.c +3 -3
index 3d4f4fb7fc..8e44bb3a09 100644
@@ -36,15 +36,15 @@
 #include <rte_os_shim.h>
 
 #include "ixgbe_logs.h"
-#include "base/ixgbe_api.h"
-#include "base/ixgbe_vf.h"
-#include "base/ixgbe_common.h"
+#include "ixgbe_api.h"
+#include "ixgbe_vf.h"
+#include "ixgbe_common.h"

drivers/net/intel/ixgbe/ixgbe_ethdev.c line 48

Quoted 10 lines
drivers/net/intel/ixgbe/ixgbe_ethdev.c +3 -3
 #include "ixgbe_ethdev.h"
 #include "ixgbe_bypass.h"
 #include "ixgbe_rxtx.h"
-#include "base/ixgbe_type.h"
-#include "base/ixgbe_phy.h"
-#include "base/ixgbe_osdep.h"
+#include "ixgbe_type.h"
+#include "ixgbe_phy.h"
+#include "ixgbe_osdep.h"
 #include "ixgbe_regs.h"

While I agree with the base/ixgbe_osdep.h -> ixgbe_osdep.h conversion, I don't get why you *need* to change other base headers inclusions above.

Quoted 2 lines

The rest of the series looks good to me.

I don't need to, I just felt that the base specifiers were unnecessary. I'll revert those changes, though, to keep all files consistent in this driver.

/Bruce

#10 lore raw

PATCH 8/8 net/ice: consolidate the sources list

In reply to Bruce Richardson

The sources list for DCF part of ice driver was separated out for no functional reason. Merge these into the main sources list for ice driver.

---
 drivers/net/intel/ice/meson.build | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
drivers/net/intel/ice/meson.build +5 -8
index b12077f7bd..29fb91634e 100644
@@ -3,6 +3,11 @@
 
 sources = files(
         'ice_acl_filter.c',
+        'ice_dcf.c',
+        'ice_dcf_vf_representor.c',
+        'ice_dcf_ethdev.c',
+        'ice_dcf_parent.c',
+        'ice_dcf_sched.c',
         'ice_diagnose.c',
         'ice_ethdev.c',
         'ice_fdir_filter.c',
@@ -35,14 +40,6 @@ elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
     sources += files('ice_rxtx_vec_neon.c')
 endif
 
-sources += files(
-        'ice_dcf.c',
-        'ice_dcf_vf_representor.c',
-        'ice_dcf_ethdev.c',
-        'ice_dcf_parent.c',
-        'ice_dcf_sched.c',
-)
-
 require_iova_in_mbuf = false
 
 base_sources = files(
Signature · 1 line
2.53.0
#11 lore raw
In reply to Bruce Richardson
Quoted 6 lines · Bruce Richardson

The base code folders for intel drivers contained the compatibility *_osdep.h files as well as meson.build files, both of which are editable via regular DPDK patches. Although the DPDK documentation allows this arrangement, I (for one) have always found it a little awkward and confusing to have editable and non-editable files mixed.

Quoted 9 lines

For Intel drivers only, this patchset moves osdep file out of base, and merges the (in most cases trivial) meson.build files from base into the main driver meson.build file.

After this patch we have a clean separation - any files in base, with no exceptions, should be updated only via snapshot update patchsets from Intel. All files outside base are normal DPDK files that can be modified by any patch.

Signature · 2 lines
Thanks,
Anatoly
#12 lore raw

v2 cover remove non-base files from base folders

In reply to Bruce Richardson

The base code folders for intel drivers contained the compatibility *_osdep.h files as well as meson.build files, both of which are editable via regular DPDK patches. Although the DPDK documentation allows this arrangement, I (for one) have always found it a little awkward and confusing to have editable and non-editable files mixed.

For Intel drivers only, this patchset moves osdep file out of base, and merges the (in most cases trivial) meson.build files from base into the main driver meson.build file.

After this patch we have a clean separation - any files in base, with no exceptions, should be updated only via snapshot update patchsets from Intel. All files outside base are normal DPDK files that can be modified by any patch.

v2: remove unnecessary edits to ixgbe files, keeping the "base/"
prefix on includes.

Bruce Richardson (8):
net/e1000: move editable files out of base folder net/fm10k: move editable files out of base folder net/i40e: move editable files out of base folder net/iavf: move editable files out of base folder net/ice: move editable files out of base folder net/idpf: move editable files out of base folder net/ixgbe: move editable files out of base folder net/ice: consolidate the sources list

 drivers/net/intel/cpfl/cpfl_actions.h         |  2 +-
 drivers/net/intel/cpfl/cpfl_controlq.h        |  2 +-
 drivers/net/intel/e1000/base/README           |  9 ---
 drivers/net/intel/e1000/base/meson.build      | 24 -------
 .../net/intel/e1000/{base => }/e1000_osdep.c  |  0
 .../net/intel/e1000/{base => }/e1000_osdep.h  |  4 +-
 drivers/net/intel/e1000/em_rxtx.c             |  2 +-
 drivers/net/intel/e1000/igc_ethdev.h          |  2 +-
 drivers/net/intel/e1000/meson.build           | 22 ++++++-
 drivers/net/intel/fm10k/base/meson.build      | 11 ----
 .../net/intel/fm10k/{base => }/fm10k_osdep.h  |  4 +-
 drivers/net/intel/fm10k/meson.build           |  9 ++-
 drivers/net/intel/i40e/base/README            |  8 ---
 drivers/net/intel/i40e/base/meson.build       | 12 ----
 .../net/intel/i40e/{base => }/i40e_osdep.h    |  4 +-
 drivers/net/intel/i40e/meson.build            | 10 ++-
 drivers/net/intel/iavf/base/README            |  8 ---
 .../iavf/{base/iavf_impl.c => iavf_osdep.c}   |  0
 .../net/intel/iavf/{base => }/iavf_osdep.h    |  2 +
 drivers/net/intel/iavf/meson.build            |  2 +-
 drivers/net/intel/ice/base/README             |  8 ---
 drivers/net/intel/ice/base/meson.build        | 51 ---------------
 drivers/net/intel/ice/{base => }/ice_osdep.h  |  4 +-
 drivers/net/intel/ice/meson.build             | 62 ++++++++++++++++---
 drivers/net/intel/idpf/base/README            |  8 ---
 drivers/net/intel/idpf/base/meson.build       |  7 ---
 .../net/intel/idpf/{base => }/idpf_osdep.h    |  4 +-
 drivers/net/intel/idpf/idpf_ptp.h             |  2 +-
 drivers/net/intel/idpf/meson.build            |  5 +-
 drivers/net/intel/ixgbe/base/README           |  9 ---
 drivers/net/intel/ixgbe/base/meson.build      | 19 ------
 drivers/net/intel/ixgbe/ixgbe_ethdev.c        |  2 +-
 drivers/net/intel/ixgbe/ixgbe_flow.c          |  2 +-
 .../net/intel/ixgbe/{base => }/ixgbe_osdep.h  |  2 +
 drivers/net/intel/ixgbe/meson.build           | 17 ++++-
 35 files changed, 138 insertions(+), 201 deletions(-)
 delete mode 100644 drivers/net/intel/e1000/base/meson.build
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.c (100%)
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.h (98%)
 delete mode 100644 drivers/net/intel/fm10k/base/meson.build
 rename drivers/net/intel/fm10k/{base => }/fm10k_osdep.h (98%)
 delete mode 100644 drivers/net/intel/i40e/base/meson.build
 rename drivers/net/intel/i40e/{base => }/i40e_osdep.h (98%)
 rename drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} (100%)
 rename drivers/net/intel/iavf/{base => }/iavf_osdep.h (98%)
 delete mode 100644 drivers/net/intel/ice/base/meson.build
 rename drivers/net/intel/ice/{base => }/ice_osdep.h (99%)
 delete mode 100644 drivers/net/intel/idpf/base/meson.build
 rename drivers/net/intel/idpf/{base => }/idpf_osdep.h (99%)
 delete mode 100644 drivers/net/intel/ixgbe/base/meson.build
 rename drivers/net/intel/ixgbe/{base => }/ixgbe_osdep.h (99%)

--
2.53.0

#13 lore raw

PATCH v2 1/8 net/e1000: move editable files out of base folder

The osdep files contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/e1000/base/README           |  9 -------
 drivers/net/intel/e1000/base/meson.build      | 24 -------------------
 .../net/intel/e1000/{base => }/e1000_osdep.c  |  0
 .../net/intel/e1000/{base => }/e1000_osdep.h  |  4 +++-
 drivers/net/intel/e1000/em_rxtx.c             |  2 +-
 drivers/net/intel/e1000/igc_ethdev.h          |  2 +-
 drivers/net/intel/e1000/meson.build           | 22 ++++++++++++++++-
 7 files changed, 26 insertions(+), 37 deletions(-)
 delete mode 100644 drivers/net/intel/e1000/base/meson.build
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.c (100%)
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.h (98%)
drivers/net/intel/e1000/base/README +0 -9
index f0c1e4af48..861b2650aa 100644
@@ -27,12 +27,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Controller I226
 * Intel® Ethernet Controller I354 Series
 * Intel® Ethernet Controller DH89XXCC Series
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    e1000_osdep.c
-    e1000_osdep.h
drivers/net/intel/e1000/base/meson.build deleted +0 -24
deleted file mode 100644
index 4fe86dc6df..0000000000
@@ -1,24 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
-
-base_sources = files(
-        'e1000_base.c',
-        'e1000_80003es2lan.c',
-        'e1000_82540.c',
-        'e1000_82541.c',
-        'e1000_82542.c',
-        'e1000_82543.c',
-        'e1000_82571.c',
-        'e1000_82575.c',
-        'e1000_api.c',
-        'e1000_i210.c',
-        'e1000_i225.c',
-        'e1000_ich8lan.c',
-        'e1000_mac.c',
-        'e1000_manage.c',
-        'e1000_mbx.c',
-        'e1000_nvm.c',
-        'e1000_osdep.c',
-        'e1000_phy.c',
-        'e1000_vf.c',
-)
drivers/net/intel/e1000/e1000_osdep.c renamed from drivers/net/intel/e1000/base/e1000_osdep.c +0 -0
similarity index 100%
rename from drivers/net/intel/e1000/base/e1000_osdep.c
rename to drivers/net/intel/e1000/e1000_osdep.c
drivers/net/intel/e1000/e1000_osdep.h renamed from drivers/net/intel/e1000/base/e1000_osdep.h +3 -1
similarity index 98%
rename from drivers/net/intel/e1000/base/e1000_osdep.h
rename to drivers/net/intel/e1000/e1000_osdep.h
index 895ffa5182..2a8da37476 100644
@@ -5,6 +5,8 @@
 #ifndef _E1000_OSDEP_H_
 #define _E1000_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <stdint.h>
 #include <stdio.h>
 #include <stdarg.h>
@@ -17,7 +19,7 @@
 #include <rte_byteorder.h>
 #include <rte_io.h>
 
-#include "../e1000_logs.h"
+#include "e1000_logs.h"
 
 #define DELAY(x) rte_delay_us_sleep(x)
 #define usec_delay(x) DELAY(x)
drivers/net/intel/e1000/em_rxtx.c +1 -1
index f9665127df..3e18ac994a 100644
@@ -43,7 +43,7 @@
 #include "e1000_logs.h"
 #include "base/e1000_api.h"
 #include "e1000_ethdev.h"
-#include "base/e1000_osdep.h"
+#include "e1000_osdep.h"
 
 #define	E1000_TXD_VLAN_SHIFT	16
 
drivers/net/intel/e1000/igc_ethdev.h +1 -1
index 7fa7877adf..e36fa4755e 100644
@@ -9,7 +9,7 @@
 #include <rte_flow.h>
 #include <rte_time.h>
 
-#include "base/e1000_osdep.h"
+#include "e1000_osdep.h"
 #include "base/e1000_hw.h"
 #include "base/e1000_i225.h"
 #include "base/e1000_api.h"
drivers/net/intel/e1000/meson.build +21 -1
index 924fe4ecae..6f1e300718 100644
@@ -1,10 +1,30 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-subdir('base')
+base_sources = files(
+        'base/e1000_base.c',
+        'base/e1000_80003es2lan.c',
+        'base/e1000_82540.c',
+        'base/e1000_82541.c',
+        'base/e1000_82542.c',
+        'base/e1000_82543.c',
+        'base/e1000_82571.c',
+        'base/e1000_82575.c',
+        'base/e1000_api.c',
+        'base/e1000_i210.c',
+        'base/e1000_i225.c',
+        'base/e1000_ich8lan.c',
+        'base/e1000_mac.c',
+        'base/e1000_manage.c',
+        'base/e1000_mbx.c',
+        'base/e1000_nvm.c',
+        'base/e1000_phy.c',
+        'base/e1000_vf.c',
+)
 
 sources += files(
         'e1000_logs.c',
+        'e1000_osdep.c',
         'em_ethdev.c',
         'em_rxtx.c',
         'igb_ethdev.c',
Signature · 1 line
2.53.0
#14 lore raw

PATCH v2 2/8 net/fm10k: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/fm10k/base/meson.build         | 11 -----------
 drivers/net/intel/fm10k/{base => }/fm10k_osdep.h |  4 +++-
 drivers/net/intel/fm10k/meson.build              |  9 ++++++++-
 3 files changed, 11 insertions(+), 13 deletions(-)
 delete mode 100644 drivers/net/intel/fm10k/base/meson.build
 rename drivers/net/intel/fm10k/{base => }/fm10k_osdep.h (98%)
drivers/net/intel/fm10k/base/meson.build deleted +0 -11
deleted file mode 100644
index c45b31d6b2..0000000000
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
-
-base_sources = files(
-        'fm10k_api.c',
-        'fm10k_common.c',
-        'fm10k_mbx.c',
-        'fm10k_pf.c',
-        'fm10k_tlv.c',
-        'fm10k_vf.c',
-)
drivers/net/intel/fm10k/fm10k_osdep.h renamed from drivers/net/intel/fm10k/base/fm10k_osdep.h +3 -1
similarity index 98%
rename from drivers/net/intel/fm10k/base/fm10k_osdep.h
rename to drivers/net/intel/fm10k/fm10k_osdep.h
index 5f8ff10474..69c542a6d0 100644
@@ -5,6 +5,8 @@
 #ifndef _FM10K_OSDEP_H_
 #define _FM10K_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <stdint.h>
 #include <stdbool.h>
 #include <string.h>
@@ -13,7 +15,7 @@
 #include <rte_cycles.h>
 #include <rte_io.h>
 
-#include "../fm10k_logs.h"
+#include "fm10k_logs.h"
 
 /* TODO: this does not look like it should be used... */
 #define ERROR_REPORT2(v1, v2, v3)   do { } while (0)
drivers/net/intel/fm10k/meson.build +8 -1
index fac4750f8d..a532b35818 100644
@@ -7,7 +7,14 @@ if is_windows
     subdir_done()
 endif
 
-subdir('base')
+base_sources = files(
+        'base/fm10k_api.c',
+        'base/fm10k_common.c',
+        'base/fm10k_mbx.c',
+        'base/fm10k_pf.c',
+        'base/fm10k_tlv.c',
+        'base/fm10k_vf.c',
+)
 
 sources += files(
         'fm10k_ethdev.c',
Signature · 1 line
2.53.0
#15 lore raw

PATCH v2 3/8 net/i40e: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/i40e/base/README             |  8 --------
 drivers/net/intel/i40e/base/meson.build        | 12 ------------
 drivers/net/intel/i40e/{base => }/i40e_osdep.h |  4 +++-
 drivers/net/intel/i40e/meson.build             | 10 +++++++++-
 4 files changed, 12 insertions(+), 22 deletions(-)
 delete mode 100644 drivers/net/intel/i40e/base/meson.build
 rename drivers/net/intel/i40e/{base => }/i40e_osdep.h (98%)
drivers/net/intel/i40e/base/README +0 -8
index 59cae0fc90..77ae90dcd1 100644
@@ -21,11 +21,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Controller X710 and XL710 Family
 * Intel® Ethernet Controller XXV710 for 25GbE backplane
 * Intel® Ethernet Controller XXV710 for 25GbE SFP28
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    i40e_osdep.h
drivers/net/intel/i40e/base/meson.build deleted +0 -12
deleted file mode 100644
index 7b4882ad1d..0000000000
@@ -1,12 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017-2020 Intel Corporation
-
-base_sources = files(
-        'i40e_adminq.c',
-        'i40e_common.c',
-        'i40e_dcb.c',
-        'i40e_diag.c',
-        'i40e_hmc.c',
-        'i40e_lan_hmc.c',
-        'i40e_nvm.c',
-)
drivers/net/intel/i40e/i40e_osdep.h renamed from drivers/net/intel/i40e/base/i40e_osdep.h +3 -1
similarity index 98%
rename from drivers/net/intel/i40e/base/i40e_osdep.h
rename to drivers/net/intel/i40e/i40e_osdep.h
index 9c5a94f055..1139c9c1fb 100644
@@ -5,6 +5,8 @@
 #ifndef _I40E_OSDEP_H_
 #define _I40E_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdbool.h>
@@ -18,7 +20,7 @@
 #include <rte_log.h>
 #include <rte_io.h>
 
-#include "../i40e_logs.h"
+#include "i40e_logs.h"
 #include "i40e_status.h"
 
 #define INLINE inline
drivers/net/intel/i40e/meson.build +9 -1
index bccae1ffc1..3229233f50 100644
@@ -17,7 +17,15 @@ if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
     subdir_done()
 endif
 
-subdir('base')
+base_sources = files(
+        'base/i40e_adminq.c',
+        'base/i40e_common.c',
+        'base/i40e_dcb.c',
+        'base/i40e_diag.c',
+        'base/i40e_hmc.c',
+        'base/i40e_lan_hmc.c',
+        'base/i40e_nvm.c',
+)
 
 sources += files(
         'i40e_ethdev.c',
Signature · 1 line
2.53.0
#16 lore raw

PATCH v2 4/8 net/iavf: move editable files out of base folder

In reply to Bruce Richardson

The osdep header and iavf_impl.c file contain the macros and other definitions needed to allow the base code to compile as part of DPDK. Although they are stored in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/iavf/base/README                        | 8 --------
 drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} | 0
 drivers/net/intel/iavf/{base => }/iavf_osdep.h            | 2 ++
 drivers/net/intel/iavf/meson.build                        | 2 +-
 4 files changed, 3 insertions(+), 9 deletions(-)
 rename drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} (100%)
 rename drivers/net/intel/iavf/{base => }/iavf_osdep.h (98%)
drivers/net/intel/iavf/base/README +0 -8
index 61bcf0ef0e..d6a1dfbc96 100644
@@ -7,11 +7,3 @@ Intel® IAVF driver
 
 This directory contains a snapshot of the iavf shared, or base, driver code.
 The snapshot was generated on 2024.09.17.
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from the following files:
-
-    iavf_osdep.h
-    iavf_impl.c
drivers/net/intel/iavf/iavf_osdep.c renamed from drivers/net/intel/iavf/base/iavf_impl.c +0 -0
similarity index 100%
rename from drivers/net/intel/iavf/base/iavf_impl.c
rename to drivers/net/intel/iavf/iavf_osdep.c
drivers/net/intel/iavf/iavf_osdep.h renamed from drivers/net/intel/iavf/base/iavf_osdep.h +2 -0
similarity index 98%
rename from drivers/net/intel/iavf/base/iavf_osdep.h
rename to drivers/net/intel/iavf/iavf_osdep.h
index cb95b848b6..dc2145b8c2 100644
@@ -5,6 +5,8 @@
 #ifndef _IAVF_OSDEP_H_
 #define _IAVF_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdbool.h>
drivers/net/intel/iavf/meson.build +1 -1
index 50630a88c8..9b071a3a4b 100644
@@ -12,7 +12,6 @@ deps += ['security', 'cryptodev']
 sources = files(
         'base/iavf_adminq.c',
         'base/iavf_common.c',
-        'base/iavf_impl.c',
 
         'iavf_base_symbols.c',
         'iavf_ethdev.c',
@@ -21,6 +20,7 @@ sources = files(
         'iavf_generic_flow.c',
         'iavf_fdir.c',
         'iavf_hash.c',
+        'iavf_osdep.c',
         'iavf_tm.c',
         'iavf_ipsec_crypto.c',
         'iavf_fsub.c',
Signature · 1 line
2.53.0
#17 lore raw

PATCH v2 5/8 net/ice: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/ice/base/README            |  8 ---
 drivers/net/intel/ice/base/meson.build       | 51 --------------------
 drivers/net/intel/ice/{base => }/ice_osdep.h |  4 +-
 drivers/net/intel/ice/meson.build            | 51 +++++++++++++++++++-
 4 files changed, 52 insertions(+), 62 deletions(-)
 delete mode 100644 drivers/net/intel/ice/base/meson.build
 rename drivers/net/intel/ice/{base => }/ice_osdep.h (99%)
drivers/net/intel/ice/base/README +0 -8
index ca82e1ec86..6e17debcb2 100644
@@ -17,11 +17,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Network Adapters E825
 * Intel® Ethernet Network Adapters E830
 * Intel® Ethernet Network Adapters E835
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    ice_osdep.h
drivers/net/intel/ice/base/meson.build deleted +0 -51

51 lines not on this page · raw message

drivers/net/intel/ice/ice_osdep.h renamed from drivers/net/intel/ice/base/ice_osdep.h +3 -1
similarity index 99%
rename from drivers/net/intel/ice/base/ice_osdep.h
rename to drivers/net/intel/ice/ice_osdep.h
index 5d92cf5aa4..599bd4086b 100644
@@ -5,6 +5,8 @@
 #ifndef _ICE_OSDEP_H_
 #define _ICE_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -24,7 +26,7 @@
 
 #include "ice_alloc.h"
 
-#include "../ice_logs.h"
+#include "ice_logs.h"
 
 #ifndef __INTEL_NET_BASE_OSDEP__
 #define __INTEL_NET_BASE_OSDEP__
drivers/net/intel/ice/meson.build +49 -2

60 lines not on this page · raw message

Signature · 1 line
2.53.0
#18 lore raw

PATCH v2 6/8 net/idpf: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/cpfl/cpfl_actions.h          | 2 +-
 drivers/net/intel/cpfl/cpfl_controlq.h         | 2 +-
 drivers/net/intel/idpf/base/README             | 8 --------
 drivers/net/intel/idpf/base/meson.build        | 7 -------
 drivers/net/intel/idpf/{base => }/idpf_osdep.h | 4 +++-
 drivers/net/intel/idpf/idpf_ptp.h              | 2 +-
 drivers/net/intel/idpf/meson.build             | 5 ++++-
 7 files changed, 10 insertions(+), 20 deletions(-)
 delete mode 100644 drivers/net/intel/idpf/base/meson.build
 rename drivers/net/intel/idpf/{base => }/idpf_osdep.h (99%)
drivers/net/intel/cpfl/cpfl_actions.h +1 -1
index 7b82119e39..772b3ff999 100644
@@ -5,7 +5,7 @@
 #ifndef _CPFL_ACTIONS_H_
 #define _CPFL_ACTIONS_H_
 
-#include "base/idpf_osdep.h"
+#include "idpf_osdep.h"
 
 #pragma pack(1)
 
drivers/net/intel/cpfl/cpfl_controlq.h +1 -1
index 740ae6522c..812b1b14a6 100644
@@ -5,7 +5,7 @@
 #ifndef _CPFL_CONTROLQ_H_
 #define _CPFL_CONTROLQ_H_
 
-#include "base/idpf_osdep.h"
+#include "idpf_osdep.h"
 #include "base/idpf_controlq_api.h"
 
 #define CPFL_CTLQ_DESCRIPTOR_SIZE	32
drivers/net/intel/idpf/base/README +0 -8
index 457b5a81f3..aa617f1819 100644
@@ -11,11 +11,3 @@ The directory of base/ contains the original source package.
 This driver is valid for the product(s) listed below
 
 * Intel® IPU E2100
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    idpf_osdep.h
drivers/net/intel/idpf/base/meson.build deleted +0 -7
deleted file mode 100644
index 78782e463e..0000000000
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2023 Intel Corporation
-
-base_sources = files(
-        'idpf_controlq.c',
-        'idpf_controlq_setup.c',
-)
drivers/net/intel/idpf/idpf_osdep.h renamed from drivers/net/intel/idpf/base/idpf_osdep.h +3 -1
similarity index 99%
rename from drivers/net/intel/idpf/base/idpf_osdep.h
rename to drivers/net/intel/idpf/idpf_osdep.h
index 67bc33f2e6..9c758fb3c0 100644
@@ -5,6 +5,8 @@
 #ifndef _IDPF_OSDEP_H_
 #define _IDPF_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -24,7 +26,7 @@
 #include <rte_io.h>
 #include <rte_compat.h>
 
-#include "../idpf_common_logs.h"
+#include "idpf_common_logs.h"
 
 #define INLINE inline
 #define STATIC static
drivers/net/intel/idpf/idpf_ptp.h +1 -1
index 0c901440fb..ecb59200bd 100644
@@ -5,7 +5,7 @@
 #ifndef _IDPF_PTP_H_
 #define _IDPF_PTP_H_
 
-#include "base/idpf_osdep.h"
+#include "idpf_osdep.h"
 #include <rte_time.h>
 #include "idpf_common_device.h"
 
drivers/net/intel/idpf/meson.build +4 -1
index 740c1a5985..311f300ccb 100644
@@ -7,7 +7,10 @@ if is_windows
     subdir_done()
 endif
 
-subdir('base')
+base_sources = files(
+        'base/idpf_controlq.c',
+        'base/idpf_controlq_setup.c',
+)
 
 includes += include_directories('../iavf/base')
 
Signature · 1 line
2.53.0
#19 lore raw

PATCH v2 7/8 net/ixgbe: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/ixgbe/base/README           |  9 ---------
 drivers/net/intel/ixgbe/base/meson.build      | 19 -------------------
 drivers/net/intel/ixgbe/ixgbe_ethdev.c        |  2 +-
 drivers/net/intel/ixgbe/ixgbe_flow.c          |  2 +-
 .../net/intel/ixgbe/{base => }/ixgbe_osdep.h  |  2 ++
 drivers/net/intel/ixgbe/meson.build           | 17 ++++++++++++++++-
 6 files changed, 20 insertions(+), 31 deletions(-)
 delete mode 100644 drivers/net/intel/ixgbe/base/meson.build
 rename drivers/net/intel/ixgbe/{base => }/ixgbe_osdep.h (99%)
drivers/net/intel/ixgbe/base/README +0 -9
index b48438f1db..bea5061abc 100644
@@ -25,12 +25,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Server Adapter X520-T2
 * Intel® Ethernet Controller X550 Series
 * Intel® Ethernet Controller E610 Series
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    ixgbe_osdep.h
-    ixgbe_osdep.c
drivers/net/intel/ixgbe/base/meson.build deleted +0 -19
deleted file mode 100644
index c0b14a1db3..0000000000
@@ -1,19 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017-2024 Intel Corporation
-
-base_sources = files(
-        'ixgbe_82598.c',
-        'ixgbe_82599.c',
-        'ixgbe_api.c',
-        'ixgbe_common.c',
-        'ixgbe_dcb_82598.c',
-        'ixgbe_dcb_82599.c',
-        'ixgbe_dcb.c',
-        'ixgbe_e610.c',
-        'ixgbe_hv_vf.c',
-        'ixgbe_mbx.c',
-        'ixgbe_phy.c',
-        'ixgbe_vf.c',
-        'ixgbe_x540.c',
-        'ixgbe_x550.c',
-)
drivers/net/intel/ixgbe/ixgbe_ethdev.c +1 -1
index 3d4f4fb7fc..4b7f51ce13 100644
@@ -44,7 +44,7 @@
 #include "ixgbe_rxtx.h"
 #include "base/ixgbe_type.h"
 #include "base/ixgbe_phy.h"
-#include "base/ixgbe_osdep.h"
+#include "ixgbe_osdep.h"
 #include "ixgbe_regs.h"
 
 /*
drivers/net/intel/ixgbe/ixgbe_flow.c +1 -1
index 7f1241951f..c702119eb0 100644
@@ -38,7 +38,7 @@
 #include "base/ixgbe_api.h"
 #include "base/ixgbe_vf.h"
 #include "base/ixgbe_common.h"
-#include "base/ixgbe_osdep.h"
+#include "ixgbe_osdep.h"
 #include "ixgbe_ethdev.h"
 #include "ixgbe_bypass.h"
 #include "ixgbe_rxtx.h"
drivers/net/intel/ixgbe/ixgbe_osdep.h renamed from drivers/net/intel/ixgbe/base/ixgbe_osdep.h +2 -0
similarity index 99%
rename from drivers/net/intel/ixgbe/base/ixgbe_osdep.h
rename to drivers/net/intel/ixgbe/ixgbe_osdep.h
index 4dfed02137..9f4f5e8038 100644
@@ -5,6 +5,8 @@
 #ifndef _IXGBE_OS_H_
 #define _IXGBE_OS_H_
 
+/* File containing OS dependencies for base code */
+
 #include <pthread.h>
 #include <string.h>
 #include <stdint.h>
drivers/net/intel/ixgbe/meson.build +16 -1
index 7e737ee7b4..0531d37acd 100644
@@ -3,7 +3,22 @@
 
 cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
 
-subdir('base')
+base_sources = files(
+        'base/ixgbe_82598.c',
+        'base/ixgbe_82599.c',
+        'base/ixgbe_api.c',
+        'base/ixgbe_common.c',
+        'base/ixgbe_dcb_82598.c',
+        'base/ixgbe_dcb_82599.c',
+        'base/ixgbe_dcb.c',
+        'base/ixgbe_e610.c',
+        'base/ixgbe_hv_vf.c',
+        'base/ixgbe_mbx.c',
+        'base/ixgbe_phy.c',
+        'base/ixgbe_vf.c',
+        'base/ixgbe_x540.c',
+        'base/ixgbe_x550.c',
+)
 
 sources += files(
         'ixgbe_82599_bypass.c',
Signature · 1 line
2.53.0
#20 lore raw

PATCH v2 8/8 net/ice: consolidate the sources list

In reply to Bruce Richardson

The sources list for DCF part of ice driver was separated out for no functional reason. Merge these into the main sources list for ice driver.

---
 drivers/net/intel/ice/meson.build | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
drivers/net/intel/ice/meson.build +5 -8
index b12077f7bd..29fb91634e 100644
@@ -3,6 +3,11 @@
 
 sources = files(
         'ice_acl_filter.c',
+        'ice_dcf.c',
+        'ice_dcf_vf_representor.c',
+        'ice_dcf_ethdev.c',
+        'ice_dcf_parent.c',
+        'ice_dcf_sched.c',
         'ice_diagnose.c',
         'ice_ethdev.c',
         'ice_fdir_filter.c',
@@ -35,14 +40,6 @@ elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
     sources += files('ice_rxtx_vec_neon.c')
 endif
 
-sources += files(
-        'ice_dcf.c',
-        'ice_dcf_vf_representor.c',
-        'ice_dcf_ethdev.c',
-        'ice_dcf_parent.c',
-        'ice_dcf_sched.c',
-)
-
 require_iova_in_mbuf = false
 
 base_sources = files(
Signature · 1 line
2.53.0
Acked-by on the v2 series
#21 lore raw
In reply to Bruce Richardson
Quoted 72 lines · Bruce Richardson

The base code folders for intel drivers contained the compatibility *_osdep.h files as well as meson.build files, both of which are editable via regular DPDK patches. Although the DPDK documentation allows this arrangement, I (for one) have always found it a little awkward and confusing to have editable and non-editable files mixed.

For Intel drivers only, this patchset moves osdep file out of base, and merges the (in most cases trivial) meson.build files from base into the main driver meson.build file.

After this patch we have a clean separation - any files in base, with no exceptions, should be updated only via snapshot update patchsets from Intel. All files outside base are normal DPDK files that can be modified by any patch.

v2: remove unnecessary edits to ixgbe files, keeping the "base/"
prefix on includes.

Bruce Richardson (8):
net/e1000: move editable files out of base folder net/fm10k: move editable files out of base folder net/i40e: move editable files out of base folder net/iavf: move editable files out of base folder net/ice: move editable files out of base folder net/idpf: move editable files out of base folder net/ixgbe: move editable files out of base folder net/ice: consolidate the sources list

 drivers/net/intel/cpfl/cpfl_actions.h         |  2 +-
 drivers/net/intel/cpfl/cpfl_controlq.h        |  2 +-
 drivers/net/intel/e1000/base/README           |  9 ---
 drivers/net/intel/e1000/base/meson.build      | 24 -------
 .../net/intel/e1000/{base => }/e1000_osdep.c  |  0
 .../net/intel/e1000/{base => }/e1000_osdep.h  |  4 +-
 drivers/net/intel/e1000/em_rxtx.c             |  2 +-
 drivers/net/intel/e1000/igc_ethdev.h          |  2 +-
 drivers/net/intel/e1000/meson.build           | 22 ++++++-
 drivers/net/intel/fm10k/base/meson.build      | 11 ----
 .../net/intel/fm10k/{base => }/fm10k_osdep.h  |  4 +-
 drivers/net/intel/fm10k/meson.build           |  9 ++-
 drivers/net/intel/i40e/base/README            |  8 ---
 drivers/net/intel/i40e/base/meson.build       | 12 ----
 .../net/intel/i40e/{base => }/i40e_osdep.h    |  4 +-
 drivers/net/intel/i40e/meson.build            | 10 ++-
 drivers/net/intel/iavf/base/README            |  8 ---
 .../iavf/{base/iavf_impl.c => iavf_osdep.c}   |  0
 .../net/intel/iavf/{base => }/iavf_osdep.h    |  2 +
 drivers/net/intel/iavf/meson.build            |  2 +-
 drivers/net/intel/ice/base/README             |  8 ---
 drivers/net/intel/ice/base/meson.build        | 51 ---------------
 drivers/net/intel/ice/{base => }/ice_osdep.h  |  4 +-
 drivers/net/intel/ice/meson.build             | 62 ++++++++++++++++---
 drivers/net/intel/idpf/base/README            |  8 ---
 drivers/net/intel/idpf/base/meson.build       |  7 ---
 .../net/intel/idpf/{base => }/idpf_osdep.h    |  4 +-
 drivers/net/intel/idpf/idpf_ptp.h             |  2 +-
 drivers/net/intel/idpf/meson.build            |  5 +-
 drivers/net/intel/ixgbe/base/README           |  9 ---
 drivers/net/intel/ixgbe/base/meson.build      | 19 ------
 drivers/net/intel/ixgbe/ixgbe_ethdev.c        |  2 +-
 drivers/net/intel/ixgbe/ixgbe_flow.c          |  2 +-
 .../net/intel/ixgbe/{base => }/ixgbe_osdep.h  |  2 +
 drivers/net/intel/ixgbe/meson.build           | 17 ++++-
 35 files changed, 138 insertions(+), 201 deletions(-)
 delete mode 100644 drivers/net/intel/e1000/base/meson.build
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.c (100%)
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.h (98%)
 delete mode 100644 drivers/net/intel/fm10k/base/meson.build
 rename drivers/net/intel/fm10k/{base => }/fm10k_osdep.h (98%)
 delete mode 100644 drivers/net/intel/i40e/base/meson.build
 rename drivers/net/intel/i40e/{base => }/i40e_osdep.h (98%)
Quoted 8 lines
 rename drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} (100%)
 rename drivers/net/intel/iavf/{base => }/iavf_osdep.h (98%)
 delete mode 100644 drivers/net/intel/ice/base/meson.build
 rename drivers/net/intel/ice/{base => }/ice_osdep.h (99%)
 delete mode 100644 drivers/net/intel/idpf/base/meson.build
 rename drivers/net/intel/idpf/{base => }/idpf_osdep.h (99%)
 delete mode 100644 drivers/net/intel/ixgbe/base/meson.build
 rename drivers/net/intel/ixgbe/{base => }/ixgbe_osdep.h (99%)

Looks like some update is missing in net/ice (reference to iavf_impl.c).

Once fixed, for the series:

Signature · 1 line
David Marchand
#22 lore raw
Quoted 83 lines · David Marchand
Quoted 72 lines · Bruce Richardson

The base code folders for intel drivers contained the compatibility *_osdep.h files as well as meson.build files, both of which are editable via regular DPDK patches. Although the DPDK documentation allows this arrangement, I (for one) have always found it a little awkward and confusing to have editable and non-editable files mixed.

For Intel drivers only, this patchset moves osdep file out of base, and merges the (in most cases trivial) meson.build files from base into the main driver meson.build file.

After this patch we have a clean separation - any files in base, with no exceptions, should be updated only via snapshot update patchsets from Intel. All files outside base are normal DPDK files that can be modified by any patch.

v2: remove unnecessary edits to ixgbe files, keeping the "base/"
prefix on includes.

Bruce Richardson (8):
net/e1000: move editable files out of base folder net/fm10k: move editable files out of base folder net/i40e: move editable files out of base folder net/iavf: move editable files out of base folder net/ice: move editable files out of base folder net/idpf: move editable files out of base folder net/ixgbe: move editable files out of base folder net/ice: consolidate the sources list

 drivers/net/intel/cpfl/cpfl_actions.h         |  2 +-
 drivers/net/intel/cpfl/cpfl_controlq.h        |  2 +-
 drivers/net/intel/e1000/base/README           |  9 ---
 drivers/net/intel/e1000/base/meson.build      | 24 -------
 .../net/intel/e1000/{base => }/e1000_osdep.c  |  0
 .../net/intel/e1000/{base => }/e1000_osdep.h  |  4 +-
 drivers/net/intel/e1000/em_rxtx.c             |  2 +-
 drivers/net/intel/e1000/igc_ethdev.h          |  2 +-
 drivers/net/intel/e1000/meson.build           | 22 ++++++-
 drivers/net/intel/fm10k/base/meson.build      | 11 ----
 .../net/intel/fm10k/{base => }/fm10k_osdep.h  |  4 +-
 drivers/net/intel/fm10k/meson.build           |  9 ++-
 drivers/net/intel/i40e/base/README            |  8 ---
 drivers/net/intel/i40e/base/meson.build       | 12 ----
 .../net/intel/i40e/{base => }/i40e_osdep.h    |  4 +-
 drivers/net/intel/i40e/meson.build            | 10 ++-
 drivers/net/intel/iavf/base/README            |  8 ---
 .../iavf/{base/iavf_impl.c => iavf_osdep.c}   |  0
 .../net/intel/iavf/{base => }/iavf_osdep.h    |  2 +
 drivers/net/intel/iavf/meson.build            |  2 +-
 drivers/net/intel/ice/base/README             |  8 ---
 drivers/net/intel/ice/base/meson.build        | 51 ---------------
 drivers/net/intel/ice/{base => }/ice_osdep.h  |  4 +-
 drivers/net/intel/ice/meson.build             | 62 ++++++++++++++++---
 drivers/net/intel/idpf/base/README            |  8 ---
 drivers/net/intel/idpf/base/meson.build       |  7 ---
 .../net/intel/idpf/{base => }/idpf_osdep.h    |  4 +-
 drivers/net/intel/idpf/idpf_ptp.h             |  2 +-
 drivers/net/intel/idpf/meson.build            |  5 +-
 drivers/net/intel/ixgbe/base/README           |  9 ---
 drivers/net/intel/ixgbe/base/meson.build      | 19 ------
 drivers/net/intel/ixgbe/ixgbe_ethdev.c        |  2 +-
 drivers/net/intel/ixgbe/ixgbe_flow.c          |  2 +-
 .../net/intel/ixgbe/{base => }/ixgbe_osdep.h  |  2 +
 drivers/net/intel/ixgbe/meson.build           | 17 ++++-
 35 files changed, 138 insertions(+), 201 deletions(-)
 delete mode 100644 drivers/net/intel/e1000/base/meson.build
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.c (100%)
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.h (98%)
 delete mode 100644 drivers/net/intel/fm10k/base/meson.build
 rename drivers/net/intel/fm10k/{base => }/fm10k_osdep.h (98%)
 delete mode 100644 drivers/net/intel/i40e/base/meson.build
 rename drivers/net/intel/i40e/{base => }/i40e_osdep.h (98%)
Quoted 8 lines
 rename drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} (100%)
 rename drivers/net/intel/iavf/{base => }/iavf_osdep.h (98%)
 delete mode 100644 drivers/net/intel/ice/base/meson.build
 rename drivers/net/intel/ice/{base => }/ice_osdep.h (99%)
 delete mode 100644 drivers/net/intel/idpf/base/meson.build
 rename drivers/net/intel/idpf/{base => }/idpf_osdep.h (99%)
 delete mode 100644 drivers/net/intel/ixgbe/base/meson.build
 rename drivers/net/intel/ixgbe/{base => }/ixgbe_osdep.h (99%)
Quoted 2 lines

Looks like some update is missing in net/ice (reference to iavf_impl.c).

Yes, patch 4 is missing a one-line update to ice/meson.build, reported by CI. Will fix in v3 shortly.

Quoted 7 lines

Once fixed, for the series:

Signature · 1 line
David Marchand
#23 lore raw

v3 cover remove non-base files from base folders

In reply to Bruce Richardson

The base code folders for intel drivers contained the compatibility *_osdep.h files as well as meson.build files, both of which are editable via regular DPDK patches. Although the DPDK documentation allows this arrangement, I (for one) have always found it a little awkward and confusing to have editable and non-editable files mixed.

For Intel drivers only, this patchset moves osdep file out of base, and merges the (in most cases trivial) meson.build files from base into the main driver meson.build file.

After this patch we have a clean separation - any files in base, with no exceptions, should be updated only via snapshot update patchsets from Intel. All files outside base are normal DPDK files that can be modified by any patch.

v3: fix build issues with ice driver when iavf was disabled.

v2: remove unnecessary edits to ixgbe files, keeping the "base/"
prefix on includes.

Bruce Richardson (8):
net/e1000: move editable files out of base folder net/fm10k: move editable files out of base folder net/i40e: move editable files out of base folder net/iavf: move editable files out of base folder net/ice: move editable files out of base folder net/idpf: move editable files out of base folder net/ixgbe: move editable files out of base folder net/ice: consolidate the sources list

 drivers/net/intel/cpfl/cpfl_actions.h         |  2 +-
 drivers/net/intel/cpfl/cpfl_controlq.h        |  2 +-
 drivers/net/intel/e1000/base/README           |  9 ---
 drivers/net/intel/e1000/base/meson.build      | 24 -------
 .../net/intel/e1000/{base => }/e1000_osdep.c  |  0
 .../net/intel/e1000/{base => }/e1000_osdep.h  |  4 +-
 drivers/net/intel/e1000/em_rxtx.c             |  2 +-
 drivers/net/intel/e1000/igc_ethdev.h          |  2 +-
 drivers/net/intel/e1000/meson.build           | 22 +++++-
 drivers/net/intel/fm10k/base/meson.build      | 11 ---
 .../net/intel/fm10k/{base => }/fm10k_osdep.h  |  4 +-
 drivers/net/intel/fm10k/meson.build           |  9 ++-
 drivers/net/intel/i40e/base/README            |  8 ---
 drivers/net/intel/i40e/base/meson.build       | 12 ----
 .../net/intel/i40e/{base => }/i40e_osdep.h    |  4 +-
 drivers/net/intel/i40e/meson.build            | 10 ++-
 drivers/net/intel/iavf/base/README            |  8 ---
 .../iavf/{base/iavf_impl.c => iavf_osdep.c}   |  0
 .../net/intel/iavf/{base => }/iavf_osdep.h    |  2 +
 drivers/net/intel/iavf/meson.build            |  2 +-
 drivers/net/intel/ice/base/README             |  8 ---
 drivers/net/intel/ice/base/meson.build        | 51 --------------
 drivers/net/intel/ice/{base => }/ice_osdep.h  |  4 +-
 drivers/net/intel/ice/meson.build             | 69 ++++++++++++++++---
 drivers/net/intel/idpf/base/README            |  8 ---
 drivers/net/intel/idpf/base/meson.build       |  7 --
 .../net/intel/idpf/{base => }/idpf_osdep.h    |  4 +-
 drivers/net/intel/idpf/idpf_ptp.h             |  2 +-
 drivers/net/intel/idpf/meson.build            |  5 +-
 drivers/net/intel/ixgbe/base/README           |  9 ---
 drivers/net/intel/ixgbe/base/meson.build      | 19 -----
 drivers/net/intel/ixgbe/ixgbe_ethdev.c        |  2 +-
 drivers/net/intel/ixgbe/ixgbe_flow.c          |  2 +-
 .../net/intel/ixgbe/{base => }/ixgbe_osdep.h  |  2 +
 drivers/net/intel/ixgbe/meson.build           | 17 ++++-
 35 files changed, 143 insertions(+), 203 deletions(-)
 delete mode 100644 drivers/net/intel/e1000/base/meson.build
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.c (100%)
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.h (98%)
 delete mode 100644 drivers/net/intel/fm10k/base/meson.build
 rename drivers/net/intel/fm10k/{base => }/fm10k_osdep.h (98%)
 delete mode 100644 drivers/net/intel/i40e/base/meson.build
 rename drivers/net/intel/i40e/{base => }/i40e_osdep.h (98%)
 rename drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} (100%)
 rename drivers/net/intel/iavf/{base => }/iavf_osdep.h (98%)
 delete mode 100644 drivers/net/intel/ice/base/meson.build
 rename drivers/net/intel/ice/{base => }/ice_osdep.h (99%)
 delete mode 100644 drivers/net/intel/idpf/base/meson.build
 rename drivers/net/intel/idpf/{base => }/idpf_osdep.h (99%)
 delete mode 100644 drivers/net/intel/ixgbe/base/meson.build
 rename drivers/net/intel/ixgbe/{base => }/ixgbe_osdep.h (99%)

--
2.53.0

#24 lore raw

PATCH v3 1/8 net/e1000: move editable files out of base folder

The osdep files contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/e1000/base/README           |  9 -------
 drivers/net/intel/e1000/base/meson.build      | 24 -------------------
 .../net/intel/e1000/{base => }/e1000_osdep.c  |  0
 .../net/intel/e1000/{base => }/e1000_osdep.h  |  4 +++-
 drivers/net/intel/e1000/em_rxtx.c             |  2 +-
 drivers/net/intel/e1000/igc_ethdev.h          |  2 +-
 drivers/net/intel/e1000/meson.build           | 22 ++++++++++++++++-
 7 files changed, 26 insertions(+), 37 deletions(-)
 delete mode 100644 drivers/net/intel/e1000/base/meson.build
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.c (100%)
 rename drivers/net/intel/e1000/{base => }/e1000_osdep.h (98%)
drivers/net/intel/e1000/base/README +0 -9
index f0c1e4af48..861b2650aa 100644
@@ -27,12 +27,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Controller I226
 * Intel® Ethernet Controller I354 Series
 * Intel® Ethernet Controller DH89XXCC Series
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    e1000_osdep.c
-    e1000_osdep.h
drivers/net/intel/e1000/base/meson.build deleted +0 -24
deleted file mode 100644
index 4fe86dc6df..0000000000
@@ -1,24 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
-
-base_sources = files(
-        'e1000_base.c',
-        'e1000_80003es2lan.c',
-        'e1000_82540.c',
-        'e1000_82541.c',
-        'e1000_82542.c',
-        'e1000_82543.c',
-        'e1000_82571.c',
-        'e1000_82575.c',
-        'e1000_api.c',
-        'e1000_i210.c',
-        'e1000_i225.c',
-        'e1000_ich8lan.c',
-        'e1000_mac.c',
-        'e1000_manage.c',
-        'e1000_mbx.c',
-        'e1000_nvm.c',
-        'e1000_osdep.c',
-        'e1000_phy.c',
-        'e1000_vf.c',
-)
drivers/net/intel/e1000/e1000_osdep.c renamed from drivers/net/intel/e1000/base/e1000_osdep.c +0 -0
similarity index 100%
rename from drivers/net/intel/e1000/base/e1000_osdep.c
rename to drivers/net/intel/e1000/e1000_osdep.c
drivers/net/intel/e1000/e1000_osdep.h renamed from drivers/net/intel/e1000/base/e1000_osdep.h +3 -1
similarity index 98%
rename from drivers/net/intel/e1000/base/e1000_osdep.h
rename to drivers/net/intel/e1000/e1000_osdep.h
index 895ffa5182..2a8da37476 100644
@@ -5,6 +5,8 @@
 #ifndef _E1000_OSDEP_H_
 #define _E1000_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <stdint.h>
 #include <stdio.h>
 #include <stdarg.h>
@@ -17,7 +19,7 @@
 #include <rte_byteorder.h>
 #include <rte_io.h>
 
-#include "../e1000_logs.h"
+#include "e1000_logs.h"
 
 #define DELAY(x) rte_delay_us_sleep(x)
 #define usec_delay(x) DELAY(x)
drivers/net/intel/e1000/em_rxtx.c +1 -1
index f9665127df..3e18ac994a 100644
@@ -43,7 +43,7 @@
 #include "e1000_logs.h"
 #include "base/e1000_api.h"
 #include "e1000_ethdev.h"
-#include "base/e1000_osdep.h"
+#include "e1000_osdep.h"
 
 #define	E1000_TXD_VLAN_SHIFT	16
 
drivers/net/intel/e1000/igc_ethdev.h +1 -1
index 7fa7877adf..e36fa4755e 100644
@@ -9,7 +9,7 @@
 #include <rte_flow.h>
 #include <rte_time.h>
 
-#include "base/e1000_osdep.h"
+#include "e1000_osdep.h"
 #include "base/e1000_hw.h"
 #include "base/e1000_i225.h"
 #include "base/e1000_api.h"
drivers/net/intel/e1000/meson.build +21 -1
index 924fe4ecae..6f1e300718 100644
@@ -1,10 +1,30 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-subdir('base')
+base_sources = files(
+        'base/e1000_base.c',
+        'base/e1000_80003es2lan.c',
+        'base/e1000_82540.c',
+        'base/e1000_82541.c',
+        'base/e1000_82542.c',
+        'base/e1000_82543.c',
+        'base/e1000_82571.c',
+        'base/e1000_82575.c',
+        'base/e1000_api.c',
+        'base/e1000_i210.c',
+        'base/e1000_i225.c',
+        'base/e1000_ich8lan.c',
+        'base/e1000_mac.c',
+        'base/e1000_manage.c',
+        'base/e1000_mbx.c',
+        'base/e1000_nvm.c',
+        'base/e1000_phy.c',
+        'base/e1000_vf.c',
+)
 
 sources += files(
         'e1000_logs.c',
+        'e1000_osdep.c',
         'em_ethdev.c',
         'em_rxtx.c',
         'igb_ethdev.c',
Signature · 1 line
2.53.0
#25 lore raw

PATCH v3 2/8 net/fm10k: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/fm10k/base/meson.build         | 11 -----------
 drivers/net/intel/fm10k/{base => }/fm10k_osdep.h |  4 +++-
 drivers/net/intel/fm10k/meson.build              |  9 ++++++++-
 3 files changed, 11 insertions(+), 13 deletions(-)
 delete mode 100644 drivers/net/intel/fm10k/base/meson.build
 rename drivers/net/intel/fm10k/{base => }/fm10k_osdep.h (98%)
drivers/net/intel/fm10k/base/meson.build deleted +0 -11
deleted file mode 100644
index c45b31d6b2..0000000000
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
-
-base_sources = files(
-        'fm10k_api.c',
-        'fm10k_common.c',
-        'fm10k_mbx.c',
-        'fm10k_pf.c',
-        'fm10k_tlv.c',
-        'fm10k_vf.c',
-)
drivers/net/intel/fm10k/fm10k_osdep.h renamed from drivers/net/intel/fm10k/base/fm10k_osdep.h +3 -1
similarity index 98%
rename from drivers/net/intel/fm10k/base/fm10k_osdep.h
rename to drivers/net/intel/fm10k/fm10k_osdep.h
index 5f8ff10474..69c542a6d0 100644
@@ -5,6 +5,8 @@
 #ifndef _FM10K_OSDEP_H_
 #define _FM10K_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <stdint.h>
 #include <stdbool.h>
 #include <string.h>
@@ -13,7 +15,7 @@
 #include <rte_cycles.h>
 #include <rte_io.h>
 
-#include "../fm10k_logs.h"
+#include "fm10k_logs.h"
 
 /* TODO: this does not look like it should be used... */
 #define ERROR_REPORT2(v1, v2, v3)   do { } while (0)
drivers/net/intel/fm10k/meson.build +8 -1
index fac4750f8d..a532b35818 100644
@@ -7,7 +7,14 @@ if is_windows
     subdir_done()
 endif
 
-subdir('base')
+base_sources = files(
+        'base/fm10k_api.c',
+        'base/fm10k_common.c',
+        'base/fm10k_mbx.c',
+        'base/fm10k_pf.c',
+        'base/fm10k_tlv.c',
+        'base/fm10k_vf.c',
+)
 
 sources += files(
         'fm10k_ethdev.c',
Signature · 1 line
2.53.0
#26 lore raw

PATCH v3 3/8 net/i40e: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/i40e/base/README             |  8 --------
 drivers/net/intel/i40e/base/meson.build        | 12 ------------
 drivers/net/intel/i40e/{base => }/i40e_osdep.h |  4 +++-
 drivers/net/intel/i40e/meson.build             | 10 +++++++++-
 4 files changed, 12 insertions(+), 22 deletions(-)
 delete mode 100644 drivers/net/intel/i40e/base/meson.build
 rename drivers/net/intel/i40e/{base => }/i40e_osdep.h (98%)
drivers/net/intel/i40e/base/README +0 -8
index 59cae0fc90..77ae90dcd1 100644
@@ -21,11 +21,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Controller X710 and XL710 Family
 * Intel® Ethernet Controller XXV710 for 25GbE backplane
 * Intel® Ethernet Controller XXV710 for 25GbE SFP28
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    i40e_osdep.h
drivers/net/intel/i40e/base/meson.build deleted +0 -12
deleted file mode 100644
index 7b4882ad1d..0000000000
@@ -1,12 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017-2020 Intel Corporation
-
-base_sources = files(
-        'i40e_adminq.c',
-        'i40e_common.c',
-        'i40e_dcb.c',
-        'i40e_diag.c',
-        'i40e_hmc.c',
-        'i40e_lan_hmc.c',
-        'i40e_nvm.c',
-)
drivers/net/intel/i40e/i40e_osdep.h renamed from drivers/net/intel/i40e/base/i40e_osdep.h +3 -1
similarity index 98%
rename from drivers/net/intel/i40e/base/i40e_osdep.h
rename to drivers/net/intel/i40e/i40e_osdep.h
index 9c5a94f055..1139c9c1fb 100644
@@ -5,6 +5,8 @@
 #ifndef _I40E_OSDEP_H_
 #define _I40E_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdbool.h>
@@ -18,7 +20,7 @@
 #include <rte_log.h>
 #include <rte_io.h>
 
-#include "../i40e_logs.h"
+#include "i40e_logs.h"
 #include "i40e_status.h"
 
 #define INLINE inline
drivers/net/intel/i40e/meson.build +9 -1
index bccae1ffc1..3229233f50 100644
@@ -17,7 +17,15 @@ if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
     subdir_done()
 endif
 
-subdir('base')
+base_sources = files(
+        'base/i40e_adminq.c',
+        'base/i40e_common.c',
+        'base/i40e_dcb.c',
+        'base/i40e_diag.c',
+        'base/i40e_hmc.c',
+        'base/i40e_lan_hmc.c',
+        'base/i40e_nvm.c',
+)
 
 sources += files(
         'i40e_ethdev.c',
Signature · 1 line
2.53.0
#27 lore raw

PATCH v3 4/8 net/iavf: move editable files out of base folder

In reply to Bruce Richardson

The osdep header and iavf_impl.c file contain the macros and other definitions needed to allow the base code to compile as part of DPDK. Although they are stored in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/iavf/base/README                        | 8 --------
 drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} | 0
 drivers/net/intel/iavf/{base => }/iavf_osdep.h            | 2 ++
 drivers/net/intel/iavf/meson.build                        | 2 +-
 drivers/net/intel/ice/meson.build                         | 7 +++++--
 5 files changed, 8 insertions(+), 11 deletions(-)
 rename drivers/net/intel/iavf/{base/iavf_impl.c => iavf_osdep.c} (100%)
 rename drivers/net/intel/iavf/{base => }/iavf_osdep.h (98%)
drivers/net/intel/iavf/base/README +0 -8
index 61bcf0ef0e..d6a1dfbc96 100644
@@ -7,11 +7,3 @@ Intel® IAVF driver
 
 This directory contains a snapshot of the iavf shared, or base, driver code.
 The snapshot was generated on 2024.09.17.
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from the following files:
-
-    iavf_osdep.h
-    iavf_impl.c
drivers/net/intel/iavf/iavf_osdep.c renamed from drivers/net/intel/iavf/base/iavf_impl.c +0 -0
similarity index 100%
rename from drivers/net/intel/iavf/base/iavf_impl.c
rename to drivers/net/intel/iavf/iavf_osdep.c
drivers/net/intel/iavf/iavf_osdep.h renamed from drivers/net/intel/iavf/base/iavf_osdep.h +2 -0
similarity index 98%
rename from drivers/net/intel/iavf/base/iavf_osdep.h
rename to drivers/net/intel/iavf/iavf_osdep.h
index cb95b848b6..dc2145b8c2 100644
@@ -5,6 +5,8 @@
 #ifndef _IAVF_OSDEP_H_
 #define _IAVF_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdbool.h>
drivers/net/intel/iavf/meson.build +1 -1
index 50630a88c8..9b071a3a4b 100644
@@ -12,7 +12,6 @@ deps += ['security', 'cryptodev']
 sources = files(
         'base/iavf_adminq.c',
         'base/iavf_common.c',
-        'base/iavf_impl.c',
 
         'iavf_base_symbols.c',
         'iavf_ethdev.c',
@@ -21,6 +20,7 @@ sources = files(
         'iavf_generic_flow.c',
         'iavf_fdir.c',
         'iavf_hash.c',
+        'iavf_osdep.c',
         'iavf_tm.c',
         'iavf_ipsec_crypto.c',
         'iavf_fsub.c',
drivers/net/intel/ice/meson.build +5 -2
index a205304c89..d0ef71154d 100644
@@ -22,11 +22,14 @@ deps += ['hash', 'net']
 if dpdk_conf.has('RTE_NET_IAVF')
     deps += 'net_iavf'
 else
-    includes += include_directories('../iavf/base')
+    includes += include_directories(
+            '../iavf',
+            '../iavf/base'
+    )
     sources += files(
             '../iavf/base/iavf_adminq.c',
             '../iavf/base/iavf_common.c',
-            '../iavf/base/iavf_impl.c',
+            '../iavf/iavf_osdep.c',
     )
 endif
 
Signature · 1 line
2.53.0
#28 lore raw

PATCH v3 5/8 net/ice: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/ice/base/README            |  8 ---
 drivers/net/intel/ice/base/meson.build       | 51 --------------------
 drivers/net/intel/ice/{base => }/ice_osdep.h |  4 +-
 drivers/net/intel/ice/meson.build            | 51 +++++++++++++++++++-
 4 files changed, 52 insertions(+), 62 deletions(-)
 delete mode 100644 drivers/net/intel/ice/base/meson.build
 rename drivers/net/intel/ice/{base => }/ice_osdep.h (99%)
drivers/net/intel/ice/base/README +0 -8
index ca82e1ec86..6e17debcb2 100644
@@ -17,11 +17,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Network Adapters E825
 * Intel® Ethernet Network Adapters E830
 * Intel® Ethernet Network Adapters E835
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    ice_osdep.h
drivers/net/intel/ice/base/meson.build deleted +0 -51

51 lines not on this page · raw message

drivers/net/intel/ice/ice_osdep.h renamed from drivers/net/intel/ice/base/ice_osdep.h +3 -1
similarity index 99%
rename from drivers/net/intel/ice/base/ice_osdep.h
rename to drivers/net/intel/ice/ice_osdep.h
index 5d92cf5aa4..599bd4086b 100644
@@ -5,6 +5,8 @@
 #ifndef _ICE_OSDEP_H_
 #define _ICE_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -24,7 +26,7 @@
 
 #include "ice_alloc.h"
 
-#include "../ice_logs.h"
+#include "ice_logs.h"
 
 #ifndef __INTEL_NET_BASE_OSDEP__
 #define __INTEL_NET_BASE_OSDEP__
drivers/net/intel/ice/meson.build +49 -2

60 lines not on this page · raw message

Signature · 1 line
2.53.0
#29 lore raw

PATCH v3 6/8 net/idpf: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/cpfl/cpfl_actions.h          | 2 +-
 drivers/net/intel/cpfl/cpfl_controlq.h         | 2 +-
 drivers/net/intel/idpf/base/README             | 8 --------
 drivers/net/intel/idpf/base/meson.build        | 7 -------
 drivers/net/intel/idpf/{base => }/idpf_osdep.h | 4 +++-
 drivers/net/intel/idpf/idpf_ptp.h              | 2 +-
 drivers/net/intel/idpf/meson.build             | 5 ++++-
 7 files changed, 10 insertions(+), 20 deletions(-)
 delete mode 100644 drivers/net/intel/idpf/base/meson.build
 rename drivers/net/intel/idpf/{base => }/idpf_osdep.h (99%)
drivers/net/intel/cpfl/cpfl_actions.h +1 -1
index 7b82119e39..772b3ff999 100644
@@ -5,7 +5,7 @@
 #ifndef _CPFL_ACTIONS_H_
 #define _CPFL_ACTIONS_H_
 
-#include "base/idpf_osdep.h"
+#include "idpf_osdep.h"
 
 #pragma pack(1)
 
drivers/net/intel/cpfl/cpfl_controlq.h +1 -1
index 740ae6522c..812b1b14a6 100644
@@ -5,7 +5,7 @@
 #ifndef _CPFL_CONTROLQ_H_
 #define _CPFL_CONTROLQ_H_
 
-#include "base/idpf_osdep.h"
+#include "idpf_osdep.h"
 #include "base/idpf_controlq_api.h"
 
 #define CPFL_CTLQ_DESCRIPTOR_SIZE	32
drivers/net/intel/idpf/base/README +0 -8
index 457b5a81f3..aa617f1819 100644
@@ -11,11 +11,3 @@ The directory of base/ contains the original source package.
 This driver is valid for the product(s) listed below
 
 * Intel® IPU E2100
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    idpf_osdep.h
drivers/net/intel/idpf/base/meson.build deleted +0 -7
deleted file mode 100644
index 78782e463e..0000000000
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2023 Intel Corporation
-
-base_sources = files(
-        'idpf_controlq.c',
-        'idpf_controlq_setup.c',
-)
drivers/net/intel/idpf/idpf_osdep.h renamed from drivers/net/intel/idpf/base/idpf_osdep.h +3 -1
similarity index 99%
rename from drivers/net/intel/idpf/base/idpf_osdep.h
rename to drivers/net/intel/idpf/idpf_osdep.h
index 67bc33f2e6..9c758fb3c0 100644
@@ -5,6 +5,8 @@
 #ifndef _IDPF_OSDEP_H_
 #define _IDPF_OSDEP_H_
 
+/* File containing OS dependencies for base code */
+
 #include <string.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -24,7 +26,7 @@
 #include <rte_io.h>
 #include <rte_compat.h>
 
-#include "../idpf_common_logs.h"
+#include "idpf_common_logs.h"
 
 #define INLINE inline
 #define STATIC static
drivers/net/intel/idpf/idpf_ptp.h +1 -1
index 0c901440fb..ecb59200bd 100644
@@ -5,7 +5,7 @@
 #ifndef _IDPF_PTP_H_
 #define _IDPF_PTP_H_
 
-#include "base/idpf_osdep.h"
+#include "idpf_osdep.h"
 #include <rte_time.h>
 #include "idpf_common_device.h"
 
drivers/net/intel/idpf/meson.build +4 -1
index 740c1a5985..311f300ccb 100644
@@ -7,7 +7,10 @@ if is_windows
     subdir_done()
 endif
 
-subdir('base')
+base_sources = files(
+        'base/idpf_controlq.c',
+        'base/idpf_controlq_setup.c',
+)
 
 includes += include_directories('../iavf/base')
 
Signature · 1 line
2.53.0
#30 lore raw

PATCH v3 7/8 net/ixgbe: move editable files out of base folder

In reply to Bruce Richardson

The osdep headers contain the macros and other definitions needed to allow the base code to compile as part of DPDK. They traditionally tend to reside in the base code folder, but are an exception in that they can be modified by regular DPDK patches, and not just as part of a base code snapshot update. Similarly the meson.build file in the base folder is not part of the snapshots and is an editable file in the base folder.

Therefore, we can simplify the rules around base code by moving these files into the main driver folder, leaving the base code C files all as uneditable except via snapshot update.

---
 drivers/net/intel/ixgbe/base/README           |  9 ---------
 drivers/net/intel/ixgbe/base/meson.build      | 19 -------------------
 drivers/net/intel/ixgbe/ixgbe_ethdev.c        |  2 +-
 drivers/net/intel/ixgbe/ixgbe_flow.c          |  2 +-
 .../net/intel/ixgbe/{base => }/ixgbe_osdep.h  |  2 ++
 drivers/net/intel/ixgbe/meson.build           | 17 ++++++++++++++++-
 6 files changed, 20 insertions(+), 31 deletions(-)
 delete mode 100644 drivers/net/intel/ixgbe/base/meson.build
 rename drivers/net/intel/ixgbe/{base => }/ixgbe_osdep.h (99%)
drivers/net/intel/ixgbe/base/README +0 -9
index b48438f1db..bea5061abc 100644
@@ -25,12 +25,3 @@ This driver is valid for the product(s) listed below
 * Intel® Ethernet Server Adapter X520-T2
 * Intel® Ethernet Controller X550 Series
 * Intel® Ethernet Controller E610 Series
-
-Updating the driver
-===================
-
-NOTE: The source code in this directory should not be modified apart from
-the following file(s):
-
-    ixgbe_osdep.h
-    ixgbe_osdep.c
drivers/net/intel/ixgbe/base/meson.build deleted +0 -19
deleted file mode 100644
index c0b14a1db3..0000000000
@@ -1,19 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017-2024 Intel Corporation
-
-base_sources = files(
-        'ixgbe_82598.c',
-        'ixgbe_82599.c',
-        'ixgbe_api.c',
-        'ixgbe_common.c',
-        'ixgbe_dcb_82598.c',
-        'ixgbe_dcb_82599.c',
-        'ixgbe_dcb.c',
-        'ixgbe_e610.c',
-        'ixgbe_hv_vf.c',
-        'ixgbe_mbx.c',
-        'ixgbe_phy.c',
-        'ixgbe_vf.c',
-        'ixgbe_x540.c',
-        'ixgbe_x550.c',
-)
drivers/net/intel/ixgbe/ixgbe_ethdev.c +1 -1
index 3d4f4fb7fc..4b7f51ce13 100644
@@ -44,7 +44,7 @@
 #include "ixgbe_rxtx.h"
 #include "base/ixgbe_type.h"
 #include "base/ixgbe_phy.h"
-#include "base/ixgbe_osdep.h"
+#include "ixgbe_osdep.h"
 #include "ixgbe_regs.h"
 
 /*
drivers/net/intel/ixgbe/ixgbe_flow.c +1 -1
index 7f1241951f..c702119eb0 100644
@@ -38,7 +38,7 @@
 #include "base/ixgbe_api.h"
 #include "base/ixgbe_vf.h"
 #include "base/ixgbe_common.h"
-#include "base/ixgbe_osdep.h"
+#include "ixgbe_osdep.h"
 #include "ixgbe_ethdev.h"
 #include "ixgbe_bypass.h"
 #include "ixgbe_rxtx.h"
drivers/net/intel/ixgbe/ixgbe_osdep.h renamed from drivers/net/intel/ixgbe/base/ixgbe_osdep.h +2 -0
similarity index 99%
rename from drivers/net/intel/ixgbe/base/ixgbe_osdep.h
rename to drivers/net/intel/ixgbe/ixgbe_osdep.h
index 4dfed02137..9f4f5e8038 100644
@@ -5,6 +5,8 @@
 #ifndef _IXGBE_OS_H_
 #define _IXGBE_OS_H_
 
+/* File containing OS dependencies for base code */
+
 #include <pthread.h>
 #include <string.h>
 #include <stdint.h>
drivers/net/intel/ixgbe/meson.build +16 -1
index 7e737ee7b4..0531d37acd 100644
@@ -3,7 +3,22 @@
 
 cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
 
-subdir('base')
+base_sources = files(
+        'base/ixgbe_82598.c',
+        'base/ixgbe_82599.c',
+        'base/ixgbe_api.c',
+        'base/ixgbe_common.c',
+        'base/ixgbe_dcb_82598.c',
+        'base/ixgbe_dcb_82599.c',
+        'base/ixgbe_dcb.c',
+        'base/ixgbe_e610.c',
+        'base/ixgbe_hv_vf.c',
+        'base/ixgbe_mbx.c',
+        'base/ixgbe_phy.c',
+        'base/ixgbe_vf.c',
+        'base/ixgbe_x540.c',
+        'base/ixgbe_x550.c',
+)
 
 sources += files(
         'ixgbe_82599_bypass.c',
Signature · 1 line
2.53.0
#31 lore raw

PATCH v3 8/8 net/ice: consolidate the sources list

In reply to Bruce Richardson

The sources list for DCF part of ice driver was separated out for no functional reason. Merge these into the main sources list for ice driver.

---
 drivers/net/intel/ice/meson.build | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
drivers/net/intel/ice/meson.build +5 -8
index 5dff99f4a9..322d9597d2 100644
@@ -3,6 +3,11 @@
 
 sources = files(
         'ice_acl_filter.c',
+        'ice_dcf.c',
+        'ice_dcf_vf_representor.c',
+        'ice_dcf_ethdev.c',
+        'ice_dcf_parent.c',
+        'ice_dcf_sched.c',
         'ice_diagnose.c',
         'ice_ethdev.c',
         'ice_fdir_filter.c',
@@ -38,14 +43,6 @@ elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
     sources += files('ice_rxtx_vec_neon.c')
 endif
 
-sources += files(
-        'ice_dcf.c',
-        'ice_dcf_vf_representor.c',
-        'ice_dcf_ethdev.c',
-        'ice_dcf_parent.c',
-        'ice_dcf_sched.c',
-)
-
 require_iova_in_mbuf = false
 
 base_sources = files(
Signature · 1 line
2.53.0