[dpdk-dev] [PATCH] net/ark: fix meson build
Ed Czeck
ed.czeck at atomicrules.com
Wed Aug 19 22:45:14 CEST 2020
* Rename net/ark specific CONFIG_RTE macros to local macros.
* Change condition of ARK_PAD_TX to match behavior of meson build
to makefile build.
* Install header file needed for dynamic library.
* Update doc as required.
Signed-off-by: Ed Czeck <ed.czeck at atomicrules.com>
---
doc/guides/nics/ark.rst | 24 ++++++++++++++----------
drivers/net/ark/ark_logs.h | 16 +++++++---------
drivers/net/ark/meson.build | 2 ++
3 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index 06e8c3374..4d8920cd0 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -124,27 +124,31 @@ Configuration Information
**DPDK Configuration Parameters**
- The following configuration options are available for the ARK PMD:
+ The following compile-time configuration options are available for the ARK PMD:
- * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
- of the ARK PMD driver in the DPDK compilation.
+ * **ARK_NOPAD_TX**: When enabled TX
+ packets are not padded to 60 bytes to support downstream MACS.
- * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y): When enabled TX
- packets are padded to 60 bytes to support downstream MACS.
-
- * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
+ * **ARK_DEBUG_RX**: Enables debug
logging and internal checking of RX ingress logic within the ARK PMD driver.
- * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
+ * **ARK_DEBUG_TX**: Enables debug
logging and internal checking of TX egress logic within the ARK PMD driver.
- * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
+ * **ARK_DEBUG_STATS**: Enables debug
logging of detailed packet and performance statistics gathered in
the PMD and FPGA.
- * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
+ * **ARK_DEBUG_TRACE**: Enables debug
logging of detailed PMD events and status.
+Note that enabling debugging options may affect system performance.
+These options may be set by specifying them in CFLAG
+environment before the meson build set. E.g.::
+
+ export CFLAGS="-DARK_DEBUG_TRACE"
+ meson build
+
Building DPDK
-------------
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index 44aac6102..125583475 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -6,14 +6,12 @@
#define _ARK_DEBUG_H_
#include <inttypes.h>
-#include <rte_log.h>
-
/* Configuration option to pad TX packets to 60 bytes */
-#ifdef RTE_LIBRTE_ARK_PAD_TX
-#define ARK_TX_PAD_TO_60 1
-#else
+#ifdef ARK_NOPAD_TX
#define ARK_TX_PAD_TO_60 0
+#else
+#define ARK_TX_PAD_TO_60 1
#endif
/* system camel case definition changed to upper case */
@@ -55,7 +53,7 @@ extern int ark_logtype;
/* Debug macro for tracing full behavior, function tracing and messages*/
-#ifdef RTE_LIBRTE_ARK_DEBUG_TRACE
+#ifdef ARK_DEBUG_TRACE
#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_ON(level, fmt, ##__VA_ARGS__)
#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
#else
@@ -65,7 +63,7 @@ extern int ark_logtype;
/* Debug macro for reporting FPGA statistics */
-#ifdef RTE_LIBRTE_ARK_DEBUG_STATS
+#ifdef ARK_DEBUG_STATS
#define PMD_STATS_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
#else
#define PMD_STATS_LOG(level, fmt, ...) ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
@@ -73,7 +71,7 @@ extern int ark_logtype;
/* Debug macro for RX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_RX
+#ifdef ARK_DEBUG_RX
#define ARK_RX_DEBUG 1
#define PMD_RX_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
#else
@@ -82,7 +80,7 @@ extern int ark_logtype;
#endif
/* Debug macro for TX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_TX
+#ifdef ARK_DEBUG_TX
#define ARK_TX_DEBUG 1
#define PMD_TX_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
#else
diff --git a/drivers/net/ark/meson.build b/drivers/net/ark/meson.build
index 99151bba1..fbbc085bb 100644
--- a/drivers/net/ark/meson.build
+++ b/drivers/net/ark/meson.build
@@ -11,3 +11,5 @@ sources = files('ark_ddm.c',
'ark_pktgen.c',
'ark_rqp.c',
'ark_udm.c')
+
+install_headers('ark_ext.h')
--
2.17.1
More information about the dev
mailing list