net/bnxt: fix flow creation
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 16 Jan 2020 13:04:46 +0000 (18:34 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:19 +0000 (09:51 +0100)
commit9356d01d5fca23ce0f6617b1aab5e74da862808b
treebba7825d03ab3ca54fec60157e8f608b17f06a9f
parent986f2134c336a086054980903e819308dcfd43ce
net/bnxt: fix flow creation

If flow create fails due to not enough filter resources,
driver does not populate the rte_flow_error using
rte_flow_error_set().

Since "rte_errno" could have garbage value and is not reliable,
it could cause a segfault in the stack in port_flow_complain().

Fix it to set rte_flow_error using rte_flow_error_set()
when flow create fails due to not enough filter resources.

Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_flow.c