From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C21DFA04F3; Fri, 3 Jan 2020 12:55:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 885C11D176; Fri, 3 Jan 2020 12:55:36 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 6A3CC1C2E8 for ; Fri, 3 Jan 2020 12:55:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jan 2020 03:55:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,390,1571727600"; d="scan'208";a="244882087" Received: from silpixa00383876.ir.intel.com (HELO silpixa00383876.ger.corp.intel.com) ([10.237.222.110]) by fmsmga004.fm.intel.com with ESMTP; 03 Jan 2020 03:55:33 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Fri, 3 Jan 2020 11:52:42 +0000 Message-Id: <20200103115243.59502-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200103115243.59502-1-bruce.richardson@intel.com> References: <20200103115243.59502-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/2] eal/freebsd: update CPU macro for FreeBSD 13 support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In (currently unreleased) FreeBSD 13, the CPU_NAND macro has been renamed to CPU_ANDNOT, so we need to use different DPDK-specific macros depending on what system-defined ones are present. Signed-off-by: Bruce Richardson --- lib/librte_eal/freebsd/eal/include/rte_os.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/librte_eal/freebsd/eal/include/rte_os.h b/lib/librte_eal/freebsd/eal/include/rte_os.h index a5efe618f..eeb750cd8 100644 --- a/lib/librte_eal/freebsd/eal/include/rte_os.h +++ b/lib/librte_eal/freebsd/eal/include/rte_os.h @@ -29,6 +29,9 @@ typedef cpuset_t rte_cpuset_t; CPU_COPY(&tmp, dst); \ } while (0) #define RTE_CPU_FILL(set) CPU_FILL(set) + +/* In FreeBSD 13 CPU_NAND macro is CPU_ANDNOT */ +#ifdef CPU_NAND #define RTE_CPU_NOT(dst, src) do \ { \ cpuset_t tmp; \ @@ -36,5 +39,14 @@ typedef cpuset_t rte_cpuset_t; CPU_NAND(&tmp, src); \ CPU_COPY(&tmp, dst); \ } while (0) +#else +#define RTE_CPU_NOT(dst, src) do \ +{ \ + cpuset_t tmp; \ + CPU_FILL(&tmp); \ + CPU_ANDNOT(&tmp, src); \ + CPU_COPY(&tmp, dst); \ +} while (0) +#endif #endif /* _RTE_OS_H_ */ -- 2.24.1