From patchwork Tue Oct 3 17:01:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 132285 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A5F1426AE; Tue, 3 Oct 2023 19:01:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90D63402A2; Tue, 3 Oct 2023 19:01:49 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 99CE240262 for ; Tue, 3 Oct 2023 19:01:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696352507; x=1727888507; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wZQ+H5fDVz+LUP/Ik+6RngETjURe1lVi6nVIVZLUZzM=; b=H5lkbiGgR0KaX93icoEOix2UXy9RJvK27dN4hJ/dfOwy0gCco8XfiPiG csuKJJVKmEWx9jtjXpjRz7qOQRHUdMT9ZRON4CaDPxRllwS3YCVxZtQDF tT5W2Chnh3HM1LBOtBmfd92upQ5vFhMIqVykpbBihdu4jQacj90/FZs0h bHVp6fWmYuo7v6KyzN3D1uFznAUup/PYsnHVx1RNFks4BATxDPbHoMGTG 8SBohfSuZVW+5KgtbTM+clJ9ETZCyxleyhA/KK8nOnRjvHYReCkqS2Zmg cn5vWgY0IDUbpQcYfvYjQEPsOMt2j3nEpYR4pdNsuExQcGQUkMq1pJ40J A==; X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="449418850" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="449418850" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 10:01:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="744584868" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="744584868" Received: from silpixa00401385.ir.intel.com ([10.237.214.41]) by orsmga007.jf.intel.com with ESMTP; 03 Oct 2023 10:01:24 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Jerin Jacob , Naga Harish K S V Subject: [PATCH] eventdev: drop custom OS defines Date: Tue, 3 Oct 2023 18:01:15 +0100 Message-Id: <20231003170115.571133-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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 #include -#if defined(LINUX) +#if defined(__linux__) #include #endif #include @@ -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 }