From e73fb98b69dffacb2c74e45807096ec597b88cae Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Fri, 2 Apr 2021 08:55:51 +0530 Subject: [PATCH] net/bnxt: fix configuring LRO While configuring LRO, driver should check the return value of bnxt_hwrm_vnic_tpa_cfg() HWRM command and return error when the FW command fails. Fixes: 0958d8b6435d ("net/bnxt: support LRO") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 02fe00036b..20ca57eae5 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -479,10 +479,11 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id) bnxt_hwrm_vnic_plcmode_cfg(bp, vnic); - if (rx_offloads & DEV_RX_OFFLOAD_TCP_LRO) - bnxt_hwrm_vnic_tpa_cfg(bp, vnic, 1); - else - bnxt_hwrm_vnic_tpa_cfg(bp, vnic, 0); + rc = bnxt_hwrm_vnic_tpa_cfg(bp, vnic, + (rx_offloads & DEV_RX_OFFLOAD_TCP_LRO) ? + true : false); + if (rc) + goto err_out; return 0; err_out: -- 2.20.1