From patchwork Thu Aug 10 17:36:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Malov X-Patchwork-Id: 130093 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1A444302C; Thu, 10 Aug 2023 19:36:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D7994324E; Thu, 10 Aug 2023 19:36:24 +0200 (CEST) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id 1C5D04325C; Thu, 10 Aug 2023 19:36:22 +0200 (CEST) Received: from localhost.localdomain (unknown [78.109.70.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by agw.arknetworks.am (Postfix) with ESMTPSA id 3B2DDE1181; Thu, 10 Aug 2023 21:36:22 +0400 (+04) From: Ivan Malov To: dev@dpdk.org Cc: Andrew Rybchenko , Ferruh Yigit , stable@dpdk.org, Andy Moreton Subject: [PATCH 1/1] net/sfc: add missing error code indication to MAE init path Date: Thu, 10 Aug 2023 21:36:14 +0400 Message-Id: <20230810173614.5846-1-ivan.malov@arknetworks.am> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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 A failure to allocate a bounce buffer for encap. header parsing results in falling to the error path but does not set an appropriate error code. Fix this. Fixes: 1bbd1ec2348a ("net/sfc: support action VXLAN encap in MAE backend") Cc: stable@dpdk.org Signed-off-by: Ivan Malov Reviewed-by: Andy Moreton Acked-by: Ferruh Yigit --- .mailmap | 2 +- drivers/net/sfc/sfc_mae.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index 864d33ee46..ec31ab8bd0 100644 --- a/.mailmap +++ b/.mailmap @@ -106,7 +106,7 @@ Andriy Berestovskyy Andrzej Ostruszka Andy Gospodarek Andy Green -Andy Moreton +Andy Moreton Andy Pei Anirudh Venkataramanan Ankur Dwivedi diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index f5fe55b46f..bf1c2f60c2 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -215,8 +215,10 @@ sfc_mae_attach(struct sfc_adapter *sa) bounce_eh->buf_size = limits.eml_encap_header_size_limit; bounce_eh->buf = rte_malloc("sfc_mae_bounce_eh", bounce_eh->buf_size, 0); - if (bounce_eh->buf == NULL) + if (bounce_eh->buf == NULL) { + rc = ENOMEM; goto fail_mae_alloc_bounce_eh; + } mae->nb_outer_rule_prios_max = limits.eml_max_n_outer_prios; mae->nb_action_rule_prios_max = limits.eml_max_n_action_prios;