DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Jerin Jacob <jerinj@marvell.com>,
	Naga Harish K S V <s.v.naga.harish.k@intel.com>
Subject: [PATCH] eventdev: drop custom OS defines
Date: Tue,  3 Oct 2023 18:01:15 +0100	[thread overview]
Message-ID: <20231003170115.571133-1-bruce.richardson@intel.com> (raw)

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.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eventdev/meson.build                | 6 ------
 lib/eventdev/rte_event_eth_rx_adapter.c | 6 +++---
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/lib/eventdev/meson.build b/lib/eventdev/meson.build
index 250abcb154..a04bb86f0f 100644
--- a/lib/eventdev/meson.build
+++ b/lib/eventdev/meson.build
@@ -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',
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 565428a58c..9090e5fbb7 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -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
 }
-- 
2.39.2


             reply	other threads:[~2023-10-03 17:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 17:01 Bruce Richardson [this message]
2023-10-04 16:05 ` [EXT] " Jerin Jacob Kollanukkaran
2023-10-04 16:28 ` [PATCH v2] " Bruce Richardson
2023-10-04 17:39   ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231003170115.571133-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=s.v.naga.harish.k@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).