From 25ee03f532b35e261bced83d1d0635d7271d6c9b Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Mon, 31 May 2021 12:56:40 +0530 Subject: [PATCH] net/bnxt: set flow error after tunnel redirection free During flow destroy, when bnxt_hwrm_tunnel_redirect_free() fails, driver is not setting flow error using "rte_flow_error_set". Fixes: 11e5e19695c7 ("net/bnxt: support redirecting tunnel packets to VF") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_flow.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 03c71732e7..ed201a3552 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -1969,12 +1969,20 @@ static int bnxt_handle_tunnel_redirect_destroy(struct bnxt *bp, /* Tunnel doesn't belong to this VF, so don't send HWRM * cmd, just delete the flow from driver */ - if (bp->fw_fid != (tun_dst_fid + bp->first_vf_id)) + if (bp->fw_fid != (tun_dst_fid + bp->first_vf_id)) { PMD_DRV_LOG(ERR, "Tunnel does not belong to this VF, skip hwrm_tunnel_redirect_free\n"); - else + } else { ret = bnxt_hwrm_tunnel_redirect_free(bp, filter->tunnel_type); + if (ret) { + rte_flow_error_set(error, -ret, + RTE_FLOW_ERROR_TYPE_HANDLE, + NULL, + "Unable to free tunnel redirection"); + return ret; + } + } } return ret; } -- 2.20.1