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 05629A0032; Fri, 29 Oct 2021 21:39:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DCE3240DDB; Fri, 29 Oct 2021 21:39:49 +0200 (CEST) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by mails.dpdk.org (Postfix) with ESMTP id 143F340688 for ; Fri, 29 Oct 2021 21:39:49 +0200 (CEST) Received: by mail-lj1-f176.google.com with SMTP id 1so12606616ljv.2 for ; Fri, 29 Oct 2021 12:39:49 -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=As/Fz7mT/NDV9RMEViYibFJCh6IGP+SzRTA40S+WTO0=; b=WUe7TNezEUwmqOCYtrZYLy91NpOoIF9Viw9JPOKL1l901pVy3H7pDvGN2joTTWi/KC ceCadryn3pZYevFhMAEkRPwZrlnEMF7ijWsJon2Zmulaho35xisNVgu99cT+RUP+wBys 6elGS3/E9a8x1sc+G0GGYSeUOeE/2cAq99ddv1AVxtFMhY1OVwun5TuH8Pwnqnf/0OjP OqusHB53bru21b1/q5kbt6ZvqHnIPCk1IetQqfFVrLSd+vXwje+SJJYnDV29mwB5yTCE l2VizKy76Eg+J+dvt0SXu38FaiQhGGwGI4o76SrCMbavKtcBTsjedK95uHcpcQ5jnSz9 WaYw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=As/Fz7mT/NDV9RMEViYibFJCh6IGP+SzRTA40S+WTO0=; b=52ZuymsDXnLVy4O/3UQ0j9xhpqnIfjSB+D66Io7HggwHREwhZ/jmdMAJ4OqV1nXkp+ LhAVPuM3aozF3HZODQ2d/di5LiCyM87uQVhtMNHoyLNXMvOyVsOYoCvQYUQ8pDa0LQXB 8YiLUTTeGfCspHLEQkIiAmqu8CCu+aG9PnVzm5vVwr3GWhKMqv9jjE74F6xl0fmm1fYn g/sTxTjVdOi1tM+YAMSUy0PB6W82o6kjwhRvZ3fjWuUgpTkmfoxJk2zt+c1m0D3Nq9sr rgf3Xc1BBCL9klCxhz2VSRHqlKpbSDseuKKIXEeQ2bPzT63Lk3RInAgth5AoZDd1v+xt YmwQ== X-Gm-Message-State: AOAM531PA+jVQ0+Lppk4MpwkBuj/F6dhcNty0JBfNljKW6ysoa2MtTE2 SswGBw7sgWJhM8UbpFmqix3/DtoBD2U= X-Google-Smtp-Source: ABdhPJzbSCzHpk7Oa9SdH9We7roAsRMQzc8Lk+L5xw4Lx15bZrheLhWnXEJYT0ZF0Iu25UWLU+eivA== X-Received: by 2002:a2e:b550:: with SMTP id a16mr13323021ljn.268.1635536388310; Fri, 29 Oct 2021 12:39:48 -0700 (PDT) Received: from localhost.localdomain ([2a00:1fa2:299:2983:a00:27ff:fe90:3d24]) by smtp.gmail.com with ESMTPSA id bp31sm683148lfb.124.2021.10.29.12.39.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 12:39:47 -0700 (PDT) From: Alexander Bechikov To: dev@dpdk.org Cc: Alexander Bechikov Date: Fri, 29 Oct 2021 15:35:18 -0400 Message-Id: <20211029193519.498658-1-asb.tyum@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211027111118.395928-1-asb.tyum@gmail.com> References: <20211027111118.395928-1-asb.tyum@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/2] 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