DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ivan Malov <ivan.malov@arknetworks.am>
To: dev@dpdk.org
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Ferruh Yigit <ferruh.yigit@amd.com>,
	stable@dpdk.org, Andy Moreton <andy.moreton@amd.com>
Subject: [PATCH 1/1] net/sfc: add missing error code indication to MAE init path
Date: Thu, 10 Aug 2023 21:36:14 +0400	[thread overview]
Message-ID: <20230810173614.5846-1-ivan.malov@arknetworks.am> (raw)

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 <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <andy.moreton@amd.com>
---
 .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 <aber@semihalf.com> <andriy.berestovskyy@caviumnetworks.com>
 Andrzej Ostruszka <amo@semihalf.com> <aostruszka@marvell.com>
 Andy Gospodarek <andrew.gospodarek@broadcom.com> <gospo@broadcom.com>
 Andy Green <andy@warmcat.com>
-Andy Moreton <amoreton@xilinx.com> <amoreton@solarflare.com>
+Andy Moreton <andy.moreton@amd.com> <amoreton@xilinx.com> <amoreton@solarflare.com>
 Andy Pei <andy.pei@intel.com>
 Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
 Ankur Dwivedi <adwivedi@marvell.com> <ankur.dwivedi@caviumnetworks.com> <ankur.dwivedi@cavium.com>
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;
-- 
2.17.1


             reply	other threads:[~2023-08-10 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10 17:36 Ivan Malov [this message]
2023-09-19 22:34 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230810173614.5846-1-ivan.malov@arknetworks.am \
    --to=ivan.malov@arknetworks.am \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=andy.moreton@amd.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).