Re: [PATCH 01/13] net/sxe: add base driver directory and doc

Stephen Hemminger
2025-04-26T17:08:33Z

On Thu, 24 Apr 2025 19:36:40 -0700
Jie Liu <liujie5@linkdatatechnology.com> wrote:

> From: JieLiu <liujie5@linkdatatechnology.com>
>
> Adding a minimum maintainable directory structure for the
> network driver and request maintenance of the sxe driver.
>
> Signed-off-by: Jie Liu <liujie5@linkdatatechnology.com>

Cross build for windows fails:
DPDK 25.07.0-rc0

User defined options
Cross files: config/x86/cross-mingw
examples : helloworld

Found ninja-1.12.1 at /usr/bin/ninja
FAILED: drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_main.c.obj
x86_64-w64-mingw32-gcc -Idrivers/libtmp_rte_net_sxe.a.p -Idrivers -I../drivers -Idrivers/net/sxe -I../drivers/net/sxe -I../drivers/net/sxe/base -I../drivers/net/sxe/pf -I../drivers/net/sxe/vf -I../drivers/net/sxe/include/sxe -I../drivers/net/sxe/include -Ilib/ethdev -I../lib/ethdev -Ilib/eal/common -I../lib/eal/common -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/windows/include -I../lib/eal/windows/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal -I../lib/eal -Ilib/log -I../lib/log -Ilib/kvargs -I../lib/kvargs -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/meter -I../lib/meter -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/windows -Ilib/pci -I../lib/pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -include rte_config.h -Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -D_WIN32_WINNT=0x0A00 -D__USE_MINGW_ANSI_STDIO -march=native -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -Wno-address-of-packed-member -DSXE_DPDK -DSXE_HOST_DRIVER -DSXE_DPDK_L4_FEATURES -DSXE_DPDK_SRIOV -DSXE_DPDK_SIMD -DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.sxe -MD -MQ drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_main.c.obj -MF drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_main.c.obj.d -o drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_main.c.obj -c ../drivers/net/sxe/pf/sxe_main.c
In file included from ../drivers/net/sxe/base/sxe_hw.h:13,
from ../drivers/net/sxe/pf/sxe_main.c:30:
../drivers/net/sxe/base/sxe_compat_platform.h:32:9: warning: "min" redefined
32 | #define min(a, b) RTE_MIN(a, b)
| ^~~
In file included from /usr/share/mingw-w64/include/windef.h:9,
from /usr/share/mingw-w64/include/windows.h:69,
from ../lib/eal/windows/include/rte_windows.h:28,
from ../lib/eal/windows/include/pthread.h:17,
from ../lib/ethdev/ethdev_driver.h:17,
from ../drivers/net/sxe/pf/sxe_main.c:23:
/usr/share/mingw-w64/include/minwindef.h:177:9: note: this is the location of the previous definition
177 | #define min(a, b) (((a) < (b)) ? (a) : (b))
| ^~~
In file included from ../drivers/net/sxe/base/sxe_hw.h:16:
../drivers/net/sxe/sxe_drv_type.h:21:14: error: conflicting types for ‘BOOL’; have ‘_Bool’
21 | typedef bool BOOL;
| ^~~~
/usr/share/mingw-w64/include/minwindef.h:131:15: note: previous declaration of ‘BOOL’ with type ‘BOOL’ {aka ‘int’}
131 | typedef int BOOL;
| ^~~~
In file included from ../drivers/net/sxe/pf/sxe.h:16,
from ../drivers/net/sxe/pf/sxe_ethdev.h:8,
from ../drivers/net/sxe/pf/sxe_main.c:31:
../drivers/net/sxe/pf/sxe_stats.h:52:47: error: unknown type name ‘ulong’; did you mean ‘u_long’?
52 | const ulong *ids,
| ^~~~~
| u_long
../drivers/net/sxe/pf/sxe_stats.h:53:41: error: unknown type name ‘ulong’; did you mean ‘u_long’?
53 | ulong *values, u32 usr_cnt);
| ^~~~~
| u_long
../drivers/net/sxe/pf/sxe_stats.h:62:15: error: unknown type name ‘ulong’; did you mean ‘u_long’?
62 | const ulong *ids,
| ^~~~~
| u_long
FAILED: drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_filter.c.obj
x86_64-w64-mingw32-gcc -Idrivers/libtmp_rte_net_sxe.a.p -Idrivers -I../drivers -Idrivers/net/sxe -I../drivers/net/sxe -I../drivers/net/sxe/base -I../drivers/net/sxe/pf -I../drivers/net/sxe/vf -I../drivers/net/sxe/include/sxe -I../drivers/net/sxe/include -Ilib/ethdev -I../lib/ethdev -Ilib/eal/common -I../lib/eal/common -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/windows/include -I../lib/eal/windows/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal -I../lib/eal -Ilib/log -I../lib/log -Ilib/kvargs -I../lib/kvargs -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/meter -I../lib/meter -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/windows -Ilib/pci -I../lib/pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -include rte_config.h -Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -D_WIN32_WINNT=0x0A00 -D__USE_MINGW_ANSI_STDIO -march=native -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -Wno-address-of-packed-member -DSXE_DPDK -DSXE_HOST_DRIVER -DSXE_DPDK_L4_FEATURES -DSXE_DPDK_SRIOV -DSXE_DPDK_SIMD -DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.sxe -MD -MQ drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_filter.c.obj -MF drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_filter.c.obj.d -o drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_filter.c.obj -c ../drivers/net/sxe/pf/sxe_filter.c
In file included from ../drivers/net/sxe/base/sxe_hw.h:13,
from ../drivers/net/sxe/pf/sxe_filter.h:17,
from ../drivers/net/sxe/pf/sxe_filter.c:19:
../drivers/net/sxe/base/sxe_compat_platform.h:32:9: warning: "min" redefined
32 | #define min(a, b) RTE_MIN(a, b)
| ^~~
In file included from /usr/share/mingw-w64/include/windef.h:9,
from /usr/share/mingw-w64/include/windows.h:69,
from ../lib/eal/windows/include/rte_windows.h:28,
from ../lib/eal/windows/include/pthread.h:17,
from ../lib/ethdev/ethdev_driver.h:17,
from ../drivers/net/sxe/pf/sxe_filter.c:12:
/usr/share/mingw-w64/include/minwindef.h:177:9: note: this is the location of the previous definition
177 | #define min(a, b) (((a) < (b)) ? (a) : (b))
| ^~~
In file included from ../drivers/net/sxe/base/sxe_hw.h:16:
../drivers/net/sxe/sxe_drv_type.h:21:14: error: conflicting types for ‘BOOL’; have ‘_Bool’
21 | typedef bool BOOL;
| ^~~~
/usr/share/mingw-w64/include/minwindef.h:131:15: note: previous declaration of ‘BOOL’ with type ‘BOOL’ {aka ‘int’}
131 | typedef int BOOL;
| ^~~~
In file included from ../drivers/net/sxe/pf/sxe.h:16,
from ../drivers/net/sxe/pf/sxe_filter.c:21:
../drivers/net/sxe/pf/sxe_stats.h:52:47: error: unknown type name ‘ulong’; did you mean ‘u_long’?
52 | const ulong *ids,
| ^~~~~
| u_long
../drivers/net/sxe/pf/sxe_stats.h:53:41: error: unknown type name ‘ulong’; did you mean ‘u_long’?
53 | ulong *values, u32 usr_cnt);
| ^~~~~
| u_long
../drivers/net/sxe/pf/sxe_stats.h:62:15: error: unknown type name ‘ulong’; did you mean ‘u_long’?
62 | const ulong *ids,
| ^~~~~
| u_long
FAILED: drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_flow_ctrl.c.obj
x86_64-w64-mingw32-gcc -Idrivers/libtmp_rte_net_sxe.a.p -Idrivers -I../drivers -Idrivers/net/sxe -I../drivers/net/sxe -I../drivers/net/sxe/base -I../drivers/net/sxe/pf -I../drivers/net/sxe/vf -I../drivers/net/sxe/include/sxe -I../drivers/net/sxe/include -Ilib/ethdev -I../lib/ethdev -Ilib/eal/common -I../lib/eal/common -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/windows/include -I../lib/eal/windows/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal -I../lib/eal -Ilib/log -I../lib/log -Ilib/kvargs -I../lib/kvargs -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/meter -I../lib/meter -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/windows -Ilib/pci -I../lib/pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -include rte_config.h -Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -D_WIN32_WINNT=0x0A00 -D__USE_MINGW_ANSI_STDIO -march=native -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -Wno-address-of-packed-member -DSXE_DPDK -DSXE_HOST_DRIVER -DSXE_DPDK_L4_FEATURES -DSXE_DPDK_SRIOV -DSXE_DPDK_SIMD -DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.sxe -MD -MQ drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_flow_ctrl.c.obj -MF drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_flow_ctrl.c.obj.d -o drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_flow_ctrl.c.obj -c ../drivers/net/sxe/pf/sxe_flow_ctrl.c
In file included from ../drivers/net/sxe/base/sxe_hw.h:13,
from ../drivers/net/sxe/pf/sxe_filter.h:17,
from ../drivers/net/sxe/pf/sxe.h:14,
from ../drivers/net/sxe/pf/sxe_flow_ctrl.c:5:
../drivers/net/sxe/base/sxe_compat_platform.h:32:9: warning: "min" redefined
32 | #define min(a, b) RTE_MIN(a, b)
| ^~~
In file included from /usr/share/mingw-w64/include/windef.h:9,
from /usr/share/mingw-w64/include/windows.h:69,
from ../lib/eal/windows/include/rte_windows.h:28,
from ../lib/eal/windows/include/pthread.h:17,
from ../lib/ethdev/ethdev_driver.h:17,
from ../drivers/net/sxe/pf/sxe_filter.h:13:
/usr/share/mingw-w64/include/minwindef.h:177:9: note: this is the location of the previous definition
177 | #define min(a, b) (((a) < (b)) ? (a) : (b))
| ^~~
In file included from ../drivers/net/sxe/base/sxe_hw.h:16:
../drivers/net/sxe/sxe_drv_type.h:21:14: error: conflicting types for ‘BOOL’; have ‘_Bool’
21 | typedef bool BOOL;
| ^~~~
/usr/share/mingw-w64/include/minwindef.h:131:15: note: previous declaration of ‘BOOL’ with type ‘BOOL’ {aka ‘int’}
131 | typedef int BOOL;
| ^~~~
In file included from ../drivers/net/sxe/pf/sxe.h:16:
../drivers/net/sxe/pf/sxe_stats.h:52:47: error: unknown type name ‘ulong’; did you mean ‘u_long’?
52 | const ulong *ids,
| ^~~~~
| u_long
../drivers/net/sxe/pf/sxe_stats.h:53:41: error: unknown type name ‘ulong’; did you mean ‘u_long’?
53 | ulong *values, u32 usr_cnt);
| ^~~~~
| u_long
../drivers/net/sxe/pf/sxe_stats.h:62:15: error: unknown type name ‘ulong’; did you mean ‘u_long’?
62 | const ulong *ids,
| ^~~~~
| u_long
FAILED: drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_irq.c.obj
x86_64-w64-mingw32-gcc -Idrivers/libtmp_rte_net_sxe.a.p -Idrivers -I../drivers -Idrivers/net/sxe -I../drivers/net/sxe -I../drivers/net/sxe/base -I../drivers/net/sxe/pf -I../drivers/net/sxe/vf -I../drivers/net/sxe/include/sxe -I../drivers/net/sxe/include -Ilib/ethdev -I../lib/ethdev -Ilib/eal/common -I../lib/eal/common -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/windows/include -I../lib/eal/windows/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal -I../lib/eal -Ilib/log -I../lib/log -Ilib/kvargs -I../lib/kvargs -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/meter -I../lib/meter -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/windows -Ilib/pci -I../lib/pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -include rte_config.h -Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -D_WIN32_WINNT=0x0A00 -D__USE_MINGW_ANSI_STDIO -march=native -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -Wno-address-of-packed-member -DSXE_DPDK -DSXE_HOST_DRIVER -DSXE_DPDK_L4_FEATURES -DSXE_DPDK_SRIOV -DSXE_DPDK_SIMD -DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.sxe -MD -MQ drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_irq.c.obj -MF drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_irq.c.obj.d -o drivers/libtmp_rte_net_sxe.a.p/net_sxe_pf_sxe_irq.c.obj -c ../drivers/net/sxe/pf/sxe_irq.c
In file included from ../drivers/net/sxe/pf/sxe_irq.h:15,
from ../drivers/net/sxe/pf/sxe_irq.c:23:
../drivers/net/sxe/base/sxe_compat_platform.h:32:9: warning: "min" redefined
32 | #define min(a, b) RTE_MIN(a, b)
| ^~~
In file included from /usr/share/mingw-w64/include/windef.h:9,
from /usr/share/mingw-w64/include/windows.h:69,
from /usr/share/mingw-w64/include/winsock2.h:23,
from /usr/share/mingw-w64/include/ws2tcpip.h:17,
from ../lib/net/rte_ip4.h:21,
from ../lib/net/rte_ip.h:9,
from ../lib/ethdev/rte_flow.h:25,
from ../lib/ethdev/rte_eth_ctrl.h:11,
from ../lib/ethdev/rte_ethdev.h:1472,
from ../drivers/net/sxe/pf/sxe_irq.c:4:
/usr/share/mingw-w64/include/minwindef.h:177:9: note: this is the location of the previous definition
177 | #define min(a, b) (((a) < (b)) ? (a) : (b))
| ^~~
In file included from ../drivers/net/sxe/base/sxe_hw.h:16,
from ../drivers/net/sxe/pf/sxe_irq.c:26:
../drivers/net/sxe/sxe_drv_type.h:21:14: error: conflicting types for ‘BOOL’; have ‘_Bool’
21 | typedef bool BOOL;
| ^~~~
/usr/share/mingw-w64/include/minwindef.h:131:15: note: previous declaration of ‘BOOL’ with type ‘BOOL’ {aka ‘int’}
131 | typedef int BOOL;
| ^~~~
In file included from ../drivers/net/sxe/pf/sxe.h:16,
from ../drivers/net/sxe/pf/sxe_irq.c:27:
../drivers/net/sxe/pf/sxe_stats.h:52:47: error: unknown type name ‘ulong’; did you mean ‘u_long’?
52 | const ulong *ids,
| ^~~~~
| u_long
../drivers/net/sxe/pf/sxe_stats.h:53:41: error: unknown type name ‘ulong’; did you mean ‘u_long’?
53 | ulong *values, u32 usr_cnt);
| ^~~~~
| u_long
../drivers/net/sxe/pf/sxe_stats.h:62:15: error: unknown type name ‘ulong’; did you mean ‘u_long’?
62 | const ulong *ids,
| ^~~~~
| u_long
ninja: build stopped: subcommand failed.