Skip to content

Commit

Permalink
net/sfc: add missing error code indication to MAE init path
Browse files Browse the repository at this point in the history
[ upstream commit 1f5e6bb633cafc2789ec74e80bf90fa54ef5b788 ]

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: 1bbd1ec ("net/sfc: support action VXLAN encap in MAE backend")

Signed-off-by: Ivan Malov <[email protected]>
Reviewed-by: Andy Moreton <[email protected]>
Acked-by: Ferruh Yigit <[email protected]>
  • Loading branch information
okt-imalov authored and kevintraynor committed Oct 27, 2023
1 parent 3937cb5 commit 41fcdc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Andriy Berestovskyy <[email protected]> <[email protected]>
Andrzej Ostruszka <[email protected]> <[email protected]>
Andy Gospodarek <[email protected]> <[email protected]>
Andy Green <[email protected]>
Andy Moreton <[email protected]> <[email protected]>
Andy Moreton <[email protected]> <[email protected]> <[email protected]>
Andy Pei <[email protected]>
Anirudh Venkataramanan <[email protected]>
Ankur Dwivedi <[email protected]> <[email protected]> <[email protected]>
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/sfc/sfc_mae.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,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;
Expand Down

0 comments on commit 41fcdc1

Please sign in to comment.