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>
Subject: [dpdk-dev] [PATCH 1/2] eal/freebsd: update CPU macro for FreeBSD 13 support
Date: Fri,  3 Jan 2020 11:52:42 +0000	[thread overview]
Message-ID: <20200103115243.59502-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20200103115243.59502-1-bruce.richardson@intel.com>

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 <bruce.richardson@intel.com>
---
 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


  reply	other threads:[~2020-01-03 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-03 11:52 [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT Bruce Richardson
2020-01-03 11:52 ` Bruce Richardson [this message]
2020-01-03 11:52 ` [dpdk-dev] [PATCH 2/2] kernel/freebsd: update contigmem for FreeBSD 13 Bruce Richardson
2020-01-20 16:47 ` [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT Thomas Monjalon

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=20200103115243.59502-2-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /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).