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.

Signed-off-by: Bruce Richardson <[email protected]>
---
 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%)

diff --git a/drivers/net/intel/ice/base/README 
b/drivers/net/intel/ice/base/README
index 1f6b53c4c2..caec47217c 100644
--- a/drivers/net/intel/ice/base/README
+++ b/drivers/net/intel/ice/base/README
@@ -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
diff --git a/drivers/net/intel/ice/base/meson.build 
b/drivers/net/intel/ice/base/meson.build
deleted file mode 100644
index da961f0752..0000000000
--- a/drivers/net/intel/ice/base/meson.build
+++ /dev/null
@@ -1,51 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2018-2021 Intel Corporation
-
-base_sources = files(
-        'ice_controlq.c',
-        'ice_common.c',
-        'ice_sched.c',
-        'ice_switch.c',
-        'ice_nvm.c',
-        'ice_flex_pipe.c',
-        'ice_flow.c',
-        'ice_dcb.c',
-        'ice_fdir.c',
-        'ice_acl.c',
-        'ice_acl_ctrl.c',
-        'ice_vlan_mode.c',
-        'ice_ptp_hw.c',
-        'ice_parser.c',
-        'ice_imem.c',
-        'ice_metainit.c',
-        'ice_pg_cam.c',
-        'ice_bst_tcam.c',
-        'ice_ptype_mk.c',
-        'ice_mk_grp.c',
-        'ice_proto_grp.c',
-        'ice_flg_rd.c',
-        'ice_xlt_kb.c',
-        'ice_parser_rt.c',
-        'ice_ddp.c',
-        'ice_fwlog.c',
-        'ice_vf_mbx.c',
-)
-
-if is_ms_compiler
-    error_cflags = [
-            '/wd4101', # unreferenced local variable
-            '/wd4334', # result of 32-bit shift implicitly converted to 64 bits
-            '/wd4319', # zero extending 'unsigned long' to 'u64' of greater 
size
-    ]
-else
-    error_cflags = [
-            '-Wno-unused-but-set-variable',
-            '-Wno-unused-parameter',
-    ]
-endif
-
-foreach flag: error_cflags
-    if cc.has_argument(flag)
-        base_cflags += flag
-    endif
-endforeach
diff --git a/drivers/net/intel/ice/base/ice_osdep.h 
b/drivers/net/intel/ice/ice_osdep.h
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
--- a/drivers/net/intel/ice/base/ice_osdep.h
+++ b/drivers/net/intel/ice/ice_osdep.h
@@ -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__
diff --git a/drivers/net/intel/ice/meson.build 
b/drivers/net/intel/ice/meson.build
index a205304c89..b12077f7bd 100644
--- a/drivers/net/intel/ice/meson.build
+++ b/drivers/net/intel/ice/meson.build
@@ -1,8 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
-subdir('base')
-
 sources = files(
         'ice_acl_filter.c',
         'ice_diagnose.c',
@@ -46,3 +44,52 @@ sources += files(
 )
 
 require_iova_in_mbuf = false
+
+base_sources = files(
+        'base/ice_controlq.c',
+        'base/ice_common.c',
+        'base/ice_sched.c',
+        'base/ice_switch.c',
+        'base/ice_nvm.c',
+        'base/ice_flex_pipe.c',
+        'base/ice_flow.c',
+        'base/ice_dcb.c',
+        'base/ice_fdir.c',
+        'base/ice_acl.c',
+        'base/ice_acl_ctrl.c',
+        'base/ice_vlan_mode.c',
+        'base/ice_ptp_hw.c',
+        'base/ice_parser.c',
+        'base/ice_imem.c',
+        'base/ice_metainit.c',
+        'base/ice_pg_cam.c',
+        'base/ice_bst_tcam.c',
+        'base/ice_ptype_mk.c',
+        'base/ice_mk_grp.c',
+        'base/ice_proto_grp.c',
+        'base/ice_flg_rd.c',
+        'base/ice_xlt_kb.c',
+        'base/ice_parser_rt.c',
+        'base/ice_ddp.c',
+        'base/ice_fwlog.c',
+        'base/ice_vf_mbx.c',
+)
+
+if is_ms_compiler
+    base_error_cflags = [
+            '/wd4101', # unreferenced local variable
+            '/wd4334', # result of 32-bit shift implicitly converted to 64 bits
+            '/wd4319', # zero extending 'unsigned long' to 'u64' of greater 
size
+    ]
+else
+    base_error_cflags = [
+            '-Wno-unused-but-set-variable',
+            '-Wno-unused-parameter',
+    ]
+endif
+
+foreach flag: base_error_cflags
+    if cc.has_argument(flag)
+        base_cflags += flag
+    endif
+endforeach
-- 
2.53.0

Reply via email to