From: Kefu Chai <tchaikov@gmail.com>
To: dev@dpdk.org
Cc: Kefu Chai <tchaikov@gmail.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Thomas Monjalon <thomas@monjalon.net>,
Avi Kivity <avi@scylladb.com>,
anatoly.burakov@intel.com
Subject: [dpdk-dev] [PATCH v5 1/2] build: add meson options of atomic_mbuf_ref_counts
Date: Thu, 14 Oct 2021 04:54:18 +0800 [thread overview]
Message-ID: <20211013205417.84119-2-tchaikov@gmail.com> (raw)
In-Reply-To: <20210902144805.105098-1-tchaikov@gmail.com>
RTE_MBUF_REFCNT_ATOMIC = 0 is not necessary for applications like
Seastar, where it's safe to assume that the mbuf refcnt is only
updated by a single core only.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
---
config/meson.build | 4 +++-
config/rte_config.h | 1 -
meson_options.txt | 2 ++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/config/meson.build b/config/meson.build
index 4cdf589e20..c90c7a0bfe 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -299,7 +299,9 @@ if dpdk_conf.get('RTE_ARCH_64')
else # for 32-bit we need smaller reserved memory areas
dpdk_conf.set('RTE_MAX_MEM_MB', 2048)
endif
-
+if get_option('atomic_mbuf_ref_counts')
+ dpdk_conf.set('RTE_MBUF_REFCNT_ATOMIC', true)
+endif
compile_time_cpuflags = []
subdir(arch_subdir)
diff --git a/config/rte_config.h b/config/rte_config.h
index 590903c07d..208d916a1f 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -50,7 +50,6 @@
/* mbuf defines */
#define RTE_MBUF_DEFAULT_MEMPOOL_OPS "ring_mp_mc"
-#define RTE_MBUF_REFCNT_ATOMIC 1
#define RTE_PKTMBUF_HEADROOM 128
/* ether defines */
diff --git a/meson_options.txt b/meson_options.txt
index 9beedabe4c..222ad6d9d9 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -38,6 +38,8 @@ option('max_lcores', type: 'string', value: 'default', description:
'Set maximum number of cores/threads supported by EAL; "default" is different per-arch, "detect" detects the number of cores on the build machine.')
option('max_numa_nodes', type: 'string', value: 'default', description:
'Set the highest NUMA node supported by EAL; "default" is different per-arch, "detect" detects the highest NUMA node on the build machine.')
+option('atomic_mbuf_ref_counts', type: 'boolean', value: true, description:
+ 'atomically access the mbuf refcnt')
option('platform', type: 'string', value: 'native', description:
'Platform to build, either "native", "generic" or a SoC. Please refer to the Linux build guide for more information.')
option('enable_trace_fp', type: 'boolean', value: false, description:
--
2.33.0
next prev parent reply other threads:[~2021-10-13 20:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 14:48 [dpdk-dev] [PATCH] build: add meson option of "max_memseg_lists" and "mbuf_refcnt_atomic" Kefu Chai
2021-09-02 15:02 ` Bruce Richardson
2021-09-02 15:05 ` [dpdk-dev] [PATCH v2] " Kefu Chai
2021-09-02 15:11 ` [dpdk-dev] [PATCH v3] build: add meson options of max_memseg_lists and atomic_mbuf_ref_counts Kefu Chai
2021-09-08 16:51 ` [dpdk-dev] [PATCH v4] " Kefu Chai
2021-09-20 7:51 ` kefu chai
2021-09-20 8:08 ` Bruce Richardson
2021-09-27 15:03 ` kefu chai
2021-10-13 15:38 ` Thomas Monjalon
2021-10-13 20:54 ` [dpdk-dev] [PATCH v5 0/2] build: add meson option of "max_memseg_lists" and "mbuf_refcnt_atomic" Kefu Chai
2021-10-13 20:54 ` Kefu Chai [this message]
2021-10-14 8:20 ` [dpdk-dev] [PATCH v5 1/2] build: add meson options of atomic_mbuf_ref_counts Bruce Richardson
2021-10-25 15:55 ` Thomas Monjalon
2021-10-13 20:54 ` [dpdk-dev] [PATCH v5 2/2] build: add meson options of max_memseg_lists Kefu Chai
2021-10-14 8:25 ` Bruce Richardson
2021-10-14 8:29 ` 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=20211013205417.84119-2-tchaikov@gmail.com \
--to=tchaikov@gmail.com \
--cc=anatoly.burakov@intel.com \
--cc=avi@scylladb.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/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).