DPDK patches and discussions
 help / color / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Rahul Gupta <rahul.gupta@broadcom.com>,
	stable@dpdk.org, Somnath Kotur <somnath.kotur@broadcom.com>
Subject: [dpdk-dev] [PATCH 2/3] net/bnxt: fix jumbo frame configuration in firmware
Date: Tue, 19 Nov 2019 10:56:37 -0800
Message-ID: <20191119185638.78740-3-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20191119185638.78740-1-ajit.khaparde@broadcom.com>

From: Rahul Gupta <rahul.gupta@broadcom.com>

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 <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 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)


  parent reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 18:56 [dpdk-dev] [PATCH 0/3] bnxt patches Ajit Khaparde
2019-11-19 18:56 ` [dpdk-dev] [PATCH 1/3] net/bnxt: fix to ignore resource qcaps error with older FW Ajit Khaparde
2019-11-19 18:56 ` Ajit Khaparde [this message]
2019-11-19 18:56 ` [dpdk-dev] [PATCH 3/3] doc: update release notes for Broadcom PMD Ajit Khaparde
2019-11-20  9:34   ` Ferruh Yigit
2019-11-20  9:45     ` Ferruh Yigit
2019-11-20 16:55       ` Ajit Khaparde
2019-11-21 23:34       ` [dpdk-dev] [PATCH v2 1/3] doc: update bnxt feature list Ajit Khaparde
2019-11-21 23:34         ` [dpdk-dev] [PATCH v2 2/3] doc: update release notes for Broadcom PMD Ajit Khaparde
2019-11-21 23:34         ` [dpdk-dev] [PATCH v2 3/3] net/bnxt: fix to free all the vnics during port stop Ajit Khaparde
2019-11-21 23:44           ` Ajit Khaparde
2019-11-19 19:01 ` [dpdk-dev] [PATCH 0/3] bnxt patches Ajit Khaparde

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191119185638.78740-3-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=rahul.gupta@broadcom.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox