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 4920A460C5 for ; Mon, 20 Jan 2025 13:22:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42D8940E1D; Mon, 20 Jan 2025 13:22:20 +0100 (CET) Received: from mail-ej1-f100.google.com (mail-ej1-f100.google.com [209.85.218.100]) by mails.dpdk.org (Postfix) with ESMTP id 9D7E740DD5 for ; Mon, 20 Jan 2025 13:22:19 +0100 (CET) Received: by mail-ej1-f100.google.com with SMTP id a640c23a62f3a-ab2c9b8aecaso694990566b.0 for ; Mon, 20 Jan 2025 04:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; t=1737375739; x=1737980539; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hPWOCx4ZFq41JWE7EfN9qsppLlXyG4ZxwzqtH0jGTY4=; b=D12wPhq2Nh/+x8yGnRGfD9JjnYvXR8/5r606gp2Nr/jAvx2skU6zUGeB95neJiBP+J qAnTYef7zo9VFVBfxmZPgzLkomSjiNtoirmcsEbeCkJY6EjH9XVepkdrgCPPCx94WdGg LNztw6IFMHrmmHPVKCAUHmKvGriO2/SIPj4TvKUOFbvjGYwqPLJodohJhEVNZYVTkBiq X7zhT5jb/5d9LfNyWB3oZIH3TvkEqC98siwxAHZNz/a0Xlwwy7fFE3jhXTTwa09vMUyb fu4Kh/LO7IbStzGX2j8zn4qkD0z4yaKGK+ifgKlrrQbD5R+sy+FHH2zotzZ0almrPLm6 9hSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737375739; x=1737980539; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hPWOCx4ZFq41JWE7EfN9qsppLlXyG4ZxwzqtH0jGTY4=; b=QbN7pMNFgZoNjJQrNhh2K48c880aMwrKm5yE/jV96jIG6jINmyMq+mv0Oc/nl9mfrO 6lPEtkjcoTiOJfKvRxUO+f75E36TK8dUQr07338hj9paZ1JHtBqaddPffU8OaIpjVAj/ R3ROAvYd3AArFjWXv2cBBklKAO9WNUcIKEdRl4XZq6i9fwMj6+iBSrlNKHLk2zEupZA7 HZWiRarDfbGuK07g2imUCS15m0LQEuYG5WhvDL5Yg4fSq46W3Qy/hSYEd9W63N/Its+6 wqjfeQkoIysCVA81eev/69WOH278QBpNmGTyZLhQ+DEBpgBT5DEi7pybUoVNAifaIB+t S5EQ== X-Gm-Message-State: AOJu0YxFqgaO4/yMuW56+FhjdjAmg4/U/OJ+OmutnysS6eecpKuWSi1a 2QPZGPPWIJwfzJS1VWzxOe+TIUXvBDrfOTBApFNM3ZWhLuvx5WKAoxQNDaRD4DHHEw/43E9cLX7 PEQceQKG9RbVICDuNh42TFbx1g+DljgFy X-Gm-Gg: ASbGncsZ1xASwvgYg/aQF/HSikDEimif5sDT0wZ3YMGGQrKXoDwSErQRoWbPDBleq66 bzpE0Wvj3taa7l7ngnaGr6WsP+1+cCOW7rcbPyKfcU/m3LDk9i9JqZY9RpEfxDM5hRqanFc2oAk JsBwN4zteV1E/Zi1JpqrMuwILAn96Cj4JlCbizI7W0T/DeYaJ/X7VD4hltyu85DsKwav9SEbC5a lE2KOsa4WEO0IiFTZktSmBuc+tAgGZ8bqBmpVIMEmkIW3PUFxrUzhSRtHHa+6GRqRAckbq3TG/k cCd3to1Fl28I+naggcEtHJbVMFE5qTAcMm7xGzI= X-Google-Smtp-Source: AGHT+IGXX9YiysCXyKOVwJ9ejie2NsDcX8y4KsrUMOTvXB9Cw9CpjOftYFq/ENSPoaa12MeG8Ksgj1dhTrzu X-Received: by 2002:a17:907:1ca2:b0:aac:4325:a604 with SMTP id a640c23a62f3a-ab38b3d63a6mr1250600566b.49.1737375739043; Mon, 20 Jan 2025 04:22:19 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id a640c23a62f3a-ab385207359sm37165366b.129.2025.01.20.04.22.18; Mon, 20 Jan 2025 04:22:19 -0800 (PST) X-Relaying-Domain: 6wind.com Received: from localhost (rainbow.dev.6wind.com [10.17.1.165]) by smtpservice.6wind.com (Postfix) with ESMTP id DC083138E7; Mon, 20 Jan 2025 13:22:18 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: stable@dpdk.org, Thomas Monjalon , David Marchand , Ariel Otilibili , Andrew Rybchenko , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Konstantin Ananyev Subject: [PATCH v2 1/2] mempool: fix rte_errno in rte_mempool_create_empty Date: Mon, 20 Jan 2025 13:21:55 +0100 Message-Id: <20250120122156.2480524-2-ariel.otilibili@6wind.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250120122156.2480524-1-ariel.otilibili@6wind.com> References: <20250119174643.2162110-1-ariel.otilibili@6wind.com> <20250120122156.2480524-1-ariel.otilibili@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org When returning from rte_mempool_set_ops_byname(), rte_errno is not set for error exits. The API requires rte_errno to be set in that case. Bugzilla ID: 1559 Fixes: c2c6b2f41305 ("mempool: fix default ops for an empty mempool") Link: https://doc.dpdk.org/api/rte__mempool_8h.html#a82e301ee33ed7a263ceb4582655dc3ea Signed-off-by: Ariel Otilibili --- lib/mempool/rte_mempool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c index d8e39e5c2072..1e4f24783c0b 100644 --- a/lib/mempool/rte_mempool.c +++ b/lib/mempool/rte_mempool.c @@ -928,8 +928,10 @@ rte_mempool_create_empty(const char *name, unsigned n, unsigned elt_size, else ret = rte_mempool_set_ops_byname(mp, "ring_mp_mc", NULL); - if (ret) + if (ret) { + rte_errno = -ret; goto exit_unlock; + } /* * local_cache pointer is set even if cache_size is zero. -- 2.30.2