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 E6BE0A0506; Mon, 4 Apr 2022 14:56:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8821C4281A; Mon, 4 Apr 2022 14:56:22 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 7B7DB4068C; Mon, 4 Apr 2022 14:56:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649076981; x=1680612981; h=from:to:cc:subject:date:message-id; bh=lJrH8n7kpfn6ga0pmkpoE//gZv4pRa10RQd6ru0vVpQ=; b=dlN/glmULAIj7LW2uRoWvB4zzQnKrvOlfWIAHYdPIWtHwBKUYszr5enE h4Wgd3QmCHOOM6Mxz6LkAr7xAyPPHncIcV4VkwmImwIsvXUeIpHyM2rDG bqS0O9PsTTL4zdfVPAa2ePvFuuvh0Q3wO0oaH1/ps2JdzwjwmBgzqfDh6 J+CIwHldJuwMEDSioxyix1u72Z6qkf6rq3CbVO8egDJflO0ByB+LzMVjY Al1/CeiLxScMuFUHfcBhaGcv/b8eOhH14fh4TTE4Evuw3FqUqpo1uGN5b CokbUWBuC14TmOtsPkVuAuisyCX9pzUa1EudhJnbq5U7rVG3Zw/ljfOsG Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10306"; a="323680526" X-IronPort-AV: E=Sophos;i="5.90,234,1643702400"; d="scan'208";a="323680526" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2022 05:56:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,234,1643702400"; d="scan'208";a="721636369" Received: from unknown (HELO skylake-dev-5.localdomain) ([10.190.210.19]) by orsmga005.jf.intel.com with ESMTP; 04 Apr 2022 05:56:08 -0700 From: Deepak Khandelwal To: anatoly.burakov@intel.com Cc: dev@dpdk.org, stable@dpdk.org Subject: [PATCH] eal/linux: skip attaching to external memory chunk Date: Mon, 4 Apr 2022 18:02:57 +0530 Message-Id: <1649075577-67300-1-git-send-email-deepak.khandelwal@intel.com> X-Mailer: git-send-email 1.8.3.1 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 when secondary process is initialized(rte_eal_init), external memroy segments should not be attached. These segments will be attached by explicitly invoking rte_malloc_heap_memory_attach API Fixes: ff3619d6244b ("malloc: allow attaching to external memory chunks") Cc: stable@dpdk.org Signed-off-by: Deepak Khandelwal Suggested-by: Anatoly Burakov --- lib/eal/linux/eal_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c index ee1a9e6..18d2176 100644 --- a/lib/eal/linux/eal_memory.c +++ b/lib/eal/linux/eal_memory.c @@ -1875,7 +1875,7 @@ void numa_error(char *where) msl = &mcfg->memsegs[msl_idx]; /* skip empty memseg lists */ - if (msl->memseg_arr.len == 0) + if (msl->memseg_arr.len == 0 || msl->external) continue; if (rte_fbarray_attach(&msl->memseg_arr)) { -- 1.8.3.1