[PATCH 1/1] net/sfc: add missing error code indication to MAE init path
Ivan Malov
ivan.malov at arknetworks.am
Thu Aug 10 19:36:14 CEST 2023
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 at dpdk.org
Signed-off-by: Ivan Malov <ivan.malov at arknetworks.am>
Reviewed-by: Andy Moreton <andy.moreton at 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 at semihalf.com> <andriy.berestovskyy at caviumnetworks.com>
Andrzej Ostruszka <amo at semihalf.com> <aostruszka at marvell.com>
Andy Gospodarek <andrew.gospodarek at broadcom.com> <gospo at broadcom.com>
Andy Green <andy at warmcat.com>
-Andy Moreton <amoreton at xilinx.com> <amoreton at solarflare.com>
+Andy Moreton <andy.moreton at amd.com> <amoreton at xilinx.com> <amoreton at solarflare.com>
Andy Pei <andy.pei at intel.com>
Anirudh Venkataramanan <anirudh.venkataramanan at intel.com>
Ankur Dwivedi <adwivedi at marvell.com> <ankur.dwivedi at caviumnetworks.com> <ankur.dwivedi at 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
More information about the stable
mailing list