[1/1] net/sfc: add missing error code indication to MAE init path

Message ID 20230810173614.5846-1-ivan.malov@arknetworks.am (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [1/1] net/sfc: add missing error code indication to MAE init path |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-compile-amd64-testing success Testing PASS

Commit Message

Ivan Malov Aug. 10, 2023, 5:36 p.m. UTC
  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(-)
  

Comments

Ferruh Yigit Sept. 19, 2023, 10:34 p.m. UTC | #1
On 8/10/2023 6:36 PM, Ivan Malov wrote:
> 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>
> 

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

Applied to dpdk-next-net/main, thanks.
  

Patch

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;