From: Kalesh AP Date: Fri, 2 Apr 2021 03:25:51 +0000 (+0530) Subject: net/bnxt: fix configuring LRO X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e73fb98b69dffacb2c74e45807096ec597b88cae;p=dpdk.git 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 --- 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: