eventdev: drop custom OS defines
PATCH 1/1 eventdev: drop custom OS defines
The eventdev library doesn't need to put in place its own defines for Linux and BSD. There are already defines for the OS environment in rte_config.h that can be re-used, but since these are just for identifying Linux/non-Linux, we can just check for the standard define '__linux__' instead.
--- lib/eventdev/meson.build | 6 ------ lib/eventdev/rte_event_eth_rx_adapter.c | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-)
lib/eventdev/meson.build +0 -6
@@ -7,12 +7,6 @@ if is_windows subdir_done() endif -if is_linux - cflags += '-DLINUX' -else - cflags += '-DBSD' -endif - sources = files( 'eventdev_private.c', 'eventdev_trace_points.c',
lib/eventdev/rte_event_eth_rx_adapter.c +3 -3
@@ -4,7 +4,7 @@*/ #include <ctype.h> #include <stdlib.h> -#if defined(LINUX ) +#if defined(__linux__)#include <sys/epoll.h> #endif #include <unistd.h>
@@ -1565,11 +1565,11 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,static int rxa_epoll_create1 (void ) { -#if defined(LINUX ) +#if defined(__linux__)int fd; fd =epoll_create1 (EPOLL_CLOEXEC );return fd <0 ? -errno : fd; -#elif defined(BSD ) +#else return -ENOTSUP ;#endif }
Signature · 1 line
2.39.2
Quoted 12 lines
-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Tuesday, October 3, 2023 10:31 PM
To: [email protected]
Cc: Bruce Richardson <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; Naga Harish K S V <[email protected]>
Subject: [EXT] [PATCH] eventdev: drop custom OS definesExternal Email
Quoted 7 lines
----------------------------------------------------------------------
The eventdev library doesn't need to put in place its own defines for Linux and BSD. There are already defines for the OS environment inrte_config.hthat can be re-used, but since these are just for identifying Linux/non-Linux, we can just check for the standard define '__linux__' instead.Signed-off-by Bruce Richardson <[email protected]>
Could you fix the following merge conflict
Also, change subject as eventdev/eth_rx:
[for-main]dell[dpdk-next-eventdev] $ git pw series apply 29725 Failed to apply patch:
Applying: eventdev: drop custom OS defines
Using index info to reconstruct a base tree...
M lib/eventdev/rte_event_eth_rx_adapter.c
Falling back to patching base and 3-way merge...
Auto-merging lib/eventdev/rte_event_eth_rx_adapter.c
CONFLICT (content): Merge conflict in lib/eventdev/rte_event_eth_rx_adapter.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 eventdev: drop custom OS defines
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
[for-main]dell[dpdk-next-eventdev] $ git diff
lib/eventdev/rte_event_eth_rx_adapter.c +0 -0
@@@ -4,8 -4,7 +4,12 @@@*/ #include <ctype.h> #include <stdlib.h> ++<<<<<<< HEAD +#include <pthread.h> +#if defined(LINUX) ++======= +#if defined(__linux__) ++>>>>>>> eventdev: drop custom OS defines
PATCH v2 1/1 eventdev: drop custom OS defines
In reply to Bruce RichardsonThe eventdev library doesn't need to put in place its own defines for Linux and BSD. There are already defines for the OS environment in rte_config.h that can be re-used, but since these are just for identifying Linux/non-Linux, we can just check for the standard define '__linux__' instead.
--- lib/eventdev/meson.build | 6 ------ lib/eventdev/rte_event_eth_rx_adapter.c | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-)
lib/eventdev/meson.build +0 -6
@@ -7,12 +7,6 @@ if is_windows subdir_done() endif -if is_linux - cflags += '-DLINUX' -else - cflags += '-DBSD' -endif - sources = files( 'eventdev_private.c', 'eventdev_trace_points.c',
lib/eventdev/rte_event_eth_rx_adapter.c +3 -3
@@ -5,7 +5,7 @@#include <ctype.h> #include <stdlib.h> #include <pthread.h> -#if defined(LINUX ) +#if defined(__linux__)#include <sys/epoll.h> #endif #include <unistd.h>
@@ -1567,11 +1567,11 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,static int rxa_epoll_create1 (void ) { -#if defined(LINUX ) +#if defined(__linux__)int fd; fd =epoll_create1 (EPOLL_CLOEXEC );return fd <0 ? -errno : fd; -#elif defined(BSD ) +#else return -ENOTSUP ;#endif }
Signature · 1 line
2.39.2
Quoted 8 lines · Bruce Richardson
The eventdev library doesn't need to put in place its own defines for Linux and BSD. There are already defines for the OS environment in
rte_config.hthat can be re-used, but since these are just for identifying Linux/non-Linux, we can just check for the standard define '__linux__' instead.Signed-off-by Bruce Richardson <[email protected]>
Applied to dpdk-next-net-eventdev/for-main. Thanks
Quoted 52 lines
--- lib/eventdev/meson.build | 6 ------ lib/eventdev/rte_event_eth_rx_adapter.c | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-)lib/eventdev/meson.build +0
-6@@ -7,12 +7,6 @@ if is_windows subdir_done() endif -if is_linux - cflags += '-DLINUX' -else - cflags += '-DBSD' -endif - sources = files( 'eventdev_private.c', 'eventdev_trace_points.c',lib/eventdev/rte_event_eth_rx_adapter.c +3
-4@@ -5,7 +5,7 @@#include <ctype.h> #include <stdlib.h> #include <pthread.h> -#if defined(LINUX ) +#if defined(__linux__)#include <sys/epoll.h> #endif #include <unistd.h> @@ -1567,11 +1567,11 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,static int rxa_epoll_create1 (void ) { -#if defined(LINUX ) +#if defined(__linux__)int fd; fd =epoll_create1 (EPOLL_CLOEXEC );return fd <0 ? -errno : fd; -#elif defined(BSD ) +#else return -ENOTSUP ;#endif } --2.39.2