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 E3E14A0547; Wed, 27 Oct 2021 13:14:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7315C407FF; Wed, 27 Oct 2021 13:14:07 +0200 (CEST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by mails.dpdk.org (Postfix) with ESMTP id 7142A4068C for ; Wed, 27 Oct 2021 13:14:05 +0200 (CEST) Received: by mail-lj1-f182.google.com with SMTP id h11so4105009ljk.1 for ; Wed, 27 Oct 2021 04:14:05 -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:mime-version :content-transfer-encoding; bh=As/Fz7mT/NDV9RMEViYibFJCh6IGP+SzRTA40S+WTO0=; b=dzgY5sOZ2Nrz/2D1ybyHpHXDvoIgoOokYqYmZRyF3/dbnWnjxkJ0ttjN2SwDNKITFJ iD7gXFkkR0Q+lbmAUmqGDQiAqEPeh9ycw2qlhlgMq6PyGk3yLY22NLvhpWp0dK8e+2V3 iBT75Xk4I1yFgn0jN1cFJUMYuQrNioR/oxA4rRI+TPRVO6Rq5MOsRsHl30JzkCuAggpY 67vU11OsXpdAD+3c9QC56mX+c0vP7BI6vSg5aLLsHmBsBVpTSfG3XQxmpyfgo9D1/Dpy hkpFbnQKRTjwK27mRS54xG7W+Nvutzpt2RPexAfoHalqLNxPoPHJ5KmTpyOW14mRBmyP oqXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=As/Fz7mT/NDV9RMEViYibFJCh6IGP+SzRTA40S+WTO0=; b=DJ9P2VrQzNNDMEABcFDftC6b2y+g6SpDqOu1wXhYdL+NaYdY4BtLuyuGyekWZb1VDO jwzYdef/WDAxVaeolNcMHCgH/v7EXswv8BzfmM6BEtzxGmMGdfNLjP0bctUrzbCK9O3O 2w5TQk86iQNj+pLYk+7nmdUPnkq+jARwU2kpPliZN343chkqyAz2o2z7uiV5CiP6WnOi PcVktCuxHBrq1oo1MQUBUtfHrkBDQ2JIOwM6RCVQC/UyqL42K5vweQjYzZwwrittf06M wyep45BtZbsGOy5LeC0MSTc6FOcARHqF25hXYpnlP0D8DQyw7iQmU9EBrS+7UG+Hso21 a5+g== X-Gm-Message-State: AOAM532gre2s4rHsjdLXmkA8EA1tB4WnhK018u+kLOdVy81lPIsK0XHZ NB8fop95eW3JAL13wT0z418= X-Google-Smtp-Source: ABdhPJwFF6rt0hnyxWVNLjPce2GQyETSaIisQ7gIix2Rlyxd+xKXlGzAY7OncwQo3I3BIAQHK2CDbg== X-Received: by 2002:a2e:80cc:: with SMTP id r12mr32186491ljg.448.1635333244949; Wed, 27 Oct 2021 04:14:04 -0700 (PDT) Received: from dpdk.tmn.metro (gw.tm.metro-set.ru. [37.60.16.2]) by smtp.gmail.com with ESMTPSA id a30sm392046ljd.134.2021.10.27.04.14.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 04:14:04 -0700 (PDT) From: Alexander Bechikov To: olivier.matz@6wind.com Cc: dev@dpdk.org, Alexander Bechikov Date: Wed, 27 Oct 2021 07:11:18 -0400 Message-Id: <20211027111118.395928-1-asb.tyum@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] mbuf: Improved error message. Added check if shared memory already allocated 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" Signed-off-by: Alexander Bechikov --- lib/mbuf/rte_mbuf_dyn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/mbuf/rte_mbuf_dyn.c b/lib/mbuf/rte_mbuf_dyn.c index db8e020665..a3bc9b66d2 100644 --- a/lib/mbuf/rte_mbuf_dyn.c +++ b/lib/mbuf/rte_mbuf_dyn.c @@ -116,7 +116,8 @@ init_shared_mem(void) mz = rte_memzone_lookup(RTE_MBUF_DYN_MZNAME); } if (mz == NULL) { - RTE_LOG(ERR, MBUF, "Failed to get mbuf dyn shared memory\n"); + RTE_LOG(ERR, MBUF, "Failed to get mbuf dyn shared memory: %s (%d)\n", + rte_strerror(rte_errno), rte_errno); return -1; } @@ -531,7 +532,7 @@ void rte_mbuf_dyn_dump(FILE *out) size_t i; rte_mcfg_tailq_write_lock(); - if (init_shared_mem() < 0) { + if (shm == NULL && init_shared_mem() < 0) { rte_mcfg_tailq_write_unlock(); return; } -- 2.30.2