From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF872A0548; Fri, 2 Apr 2021 05:03:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2BF0340F35; Fri, 2 Apr 2021 05:03:52 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (saphodev.broadcom.com [192.19.232.172]) by mails.dpdk.org (Postfix) with ESMTP id 69FAF40150 for ; Fri, 2 Apr 2021 05:03:51 +0200 (CEST) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 91CDA7DA6; Thu, 1 Apr 2021 20:03:49 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 91CDA7DA6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1617332630; bh=aZkGAlzOXzu42usybUk2Nnz9YuuvZ8Bu0TQ8T8C5a6c=; h=From:To:Cc:Subject:Date:From; b=CtdOkBpo3ECW7rCa5I5laXUNyWOqjV3B+XsS+PQICfOKO/blYEGdxjlBFSkbjNvfu GoR2fDOaeCEb18ax8RTGnaJll6uDXG/uNxiMq8Ughl1W2rYK7FLbMMglkKWajo7kdT QXw8DWQe+ZV5agb2ewDxQyKKrMdG9RP2tdEPiStE= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Date: Fri, 2 Apr 2021 08:55:51 +0530 Message-Id: <20210402032551.24484-1-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 Subject: [dpdk-dev] [PATCH] net/bnxt: fix configuring LRO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kalesh AP 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 0042d8a..463beaa 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.10.1