From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9820BA0C53; Fri, 3 Sep 2021 08:33:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 80BDD410D7; Fri, 3 Sep 2021 08:32:52 +0200 (CEST) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mails.dpdk.org (Postfix) with ESMTP id 0F2A54003C for ; Thu, 2 Sep 2021 17:05:28 +0200 (CEST) Received: by mail-pg1-f171.google.com with SMTP id q68so2257258pga.9 for ; Thu, 02 Sep 2021 08:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NeuGeI4igzOqgi9aaEqneUSwih5KDuJ9M/xc6N1Jx7A=; b=hTpVpas/UO0vvvn6PzbCoVCrVw660q7bp1+SBb01xlg0PeYYkjN78VQZMbI8bxjDgm +FlQBf5zgwMKjEOTU8pV+N1KAfYKMgbXqFNnM0DRDWZr5mVT5kmmFJfl+ZDU6hWiMhZh plltbMgUFDDf9j8A5oph3RVM6B8c30jtP+rueMyxHyNROVeNaQaACvVRWo6Amr94u7nH 4S6zk4gyG8bPLbGBalfuVCLtQbxNQce0ZjV6kYFs80gyo9e3gmstIVt5gMBuv7frvaP2 dFTTKPvCFT7mw0ryEy8rDAZvo2vtYLep+PfW8Gut13oCdcsT+YJkUCFVIbhcnkWldRhY vxeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NeuGeI4igzOqgi9aaEqneUSwih5KDuJ9M/xc6N1Jx7A=; b=JhdWw2JKK4dPoIkOj8G4paWePpUdJ3V0Rd9avIxH3ahEtsv/5FB+6tyBYZTT7aYXv3 XsZNIWklGq+hKoCCk4T0FfVZ9S+1OsZ3X85MtWm73EzyoUEloKvxIiPPfC6suTnzprsj 5s0RllZPS9bmh0DZn7UKsU+2hKGhsVuVJZ7WDiy2VfAfNbZo8uZEoMRlISVTQblaH4MO eUfpWUAHSv8tHPPYZcYZa8qsJifAlrx8jo3EeUqSCg3Vec0PxNGGyZWpffJkmZE5t+dJ CQsH/tv8ogWxfVXRh1A6D0LA+SiTQt+yvvopGbSYrAa8Gl9GyEXzsuV3q+Ie9yhmyIIz Cxjw== X-Gm-Message-State: AOAM532vDJ7Oi7B26cGAB/N88HrFkxs9N0S+Ehm9mpLC9ezKsr0KrIvV HCxVvEUuT9n+XOUzcVAGoBVb3zk0BWBkfw== X-Google-Smtp-Source: ABdhPJxLn25suUARezucuaoIz96J5pRqnLulwuWKeuIrlJk5JbHJJfiey0YFRclhXuiHPqZ2JVJgZw== X-Received: by 2002:a05:6a00:1396:b0:40d:bb7c:92d0 with SMTP id t22-20020a056a00139600b0040dbb7c92d0mr2414058pfg.38.1630595126907; Thu, 02 Sep 2021 08:05:26 -0700 (PDT) Received: from localhost.localdomain (74.120.174.58.16clouds.com. [74.120.174.58]) by smtp.gmail.com with ESMTPSA id y9sm2723388pfc.193.2021.09.02.08.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 08:05:26 -0700 (PDT) From: Kefu Chai To: dev@dpdk.org Cc: Kefu Chai , Bruce Richardson Date: Thu, 2 Sep 2021 23:05:17 +0800 Message-Id: <20210902150517.121558-1-tchaikov@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210902144805.105098-1-tchaikov@gmail.com> References: <20210902144805.105098-1-tchaikov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 03 Sep 2021 08:32:48 +0200 Subject: [dpdk-dev] [PATCH v2] build: add meson option of "max_memseg_lists" and "mbuf_refcnt_atomic" 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 Sender: "dev" RTE_MAX_MEMSEG_LISTS = 128 is not enough for high-memory machines, so add an option so user can override it. 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. --- v2: revise the commit message. Signed-off-by: Kefu Chai --- config/meson.build | 5 ++++- config/rte_config.h | 2 -- meson_options.txt | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config/meson.build b/config/meson.build index 3b5966ec2f..72dd461198 100644 --- a/config/meson.build +++ b/config/meson.build @@ -301,7 +301,10 @@ 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 - +dpdk_conf.set('RTE_MAX_MEMSEG_LISTS', get_option('max_memseg_lists')) +if get_option('mbuf_refcnt_atomic') + 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..0a659f5e1a 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -29,7 +29,6 @@ /* EAL defines */ #define RTE_MAX_HEAPS 32 -#define RTE_MAX_MEMSEG_LISTS 128 #define RTE_MAX_MEMSEG_PER_LIST 8192 #define RTE_MAX_MEM_MB_PER_LIST 32768 #define RTE_MAX_MEMSEG_PER_TYPE 32768 @@ -50,7 +49,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 0e92734c49..c0e8958797 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -38,6 +38,11 @@ option('max_lcores', type: 'integer', value: 128, description: 'maximum number of cores/threads supported by EAL') option('max_numa_nodes', type: 'integer', value: 32, description: 'maximum number of NUMA nodes supported by EAL') +option('max_memseg_lists', type: 'integer', value: 128, description: + 'maximum number of dynamic arrays holding memsegs') +option('mbuf_refcnt_atomic', 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