From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E8F4BA0353; Tue, 19 Nov 2019 19:57:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D3DB92F42; Tue, 19 Nov 2019 19:57:01 +0100 (CET) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 7A19DB62; Tue, 19 Nov 2019 19:56:51 +0100 (CET) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 0EDCF30C0C2; Tue, 19 Nov 2019 10:53:19 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 0EDCF30C0C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1574189599; bh=D4Up5i0ZcGQa3MbxaN4f1905rwEOu0ObgNP+ChC44rs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xni6clttBQToaOs5elXgjD+0M/9JpeMqMmKCYU2taq2WDhv45a/4nLIUBomzy66wI AF2KQc9wqLaeEV8mlQeX4RRJL827RBvkJCfyDGDBBASdoJGDefrsbVokqLhzpkHmFd 9xUSwb8kbFu48+yWMGrBxdYi7YQE4/fVFO9ZuisE= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.69.74.102]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 4AE0414008D; Tue, 19 Nov 2019 10:56:47 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Rahul Gupta , stable@dpdk.org, Somnath Kotur Date: Tue, 19 Nov 2019 10:56:37 -0800 Message-Id: <20191119185638.78740-3-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122.2) In-Reply-To: <20191119185638.78740-1-ajit.khaparde@broadcom.com> References: <20191119185638.78740-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/3] net/bnxt: fix jumbo frame configuration in firmware X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Rahul Gupta In order to prevent reconfiguration of firmware resources for every MTU change, configure FW with max MTU value using hwrm_func_cfg to support all frame sizes. There is no need to overwrite the driver level MTU variable data->mtu with the FW MTU. Fixes: 905cd45ce30e ("net/bnxt: use configured MTU during load") Cc: stable@dpdk.org Signed-off-by: Rahul Gupta Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 4 ---- drivers/net/bnxt/bnxt_hwrm.c | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 06033e3b8..b1e831b87 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -4582,10 +4582,6 @@ static int bnxt_init_fw(struct bnxt *bp) if (rc) bp->flags &= ~BNXT_FLAG_FW_CAP_ERROR_RECOVERY; - if (mtu >= RTE_ETHER_MIN_MTU && mtu <= BNXT_MAX_MTU && - mtu != bp->eth_dev->data->mtu) - bp->eth_dev->data->mtu = mtu; - bnxt_hwrm_port_led_qcaps(bp); return 0; diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 1d3732eee..41730089b 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -2978,8 +2978,7 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings) } req.flags = rte_cpu_to_le_32(bp->pf.func_cfg_flags); - req.mtu = rte_cpu_to_le_16(RTE_MIN(bp->eth_dev->data->mtu, - BNXT_MAX_MTU)); //FW adds hdr sizes + req.mtu = rte_cpu_to_le_16(BNXT_MAX_MTU); req.mru = rte_cpu_to_le_16(BNXT_VNIC_MRU(bp->eth_dev->data->mtu)); req.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx); req.num_stat_ctxs = rte_cpu_to_le_16(bp->max_stat_ctx); -- 2.21.0 (Apple Git-122.2)