patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/3] net/bnxt: fix to ignore resource qcaps error with older FW
       [not found] <20191119185638.78740-1-ajit.khaparde@broadcom.com>
@ 2019-11-19 18:56 ` Ajit Khaparde
  2019-11-19 18:56 ` [dpdk-stable] [PATCH 2/3] net/bnxt: fix jumbo frame configuration in firmware Ajit Khaparde
  1 sibling, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2019-11-19 18:56 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, stable, Somnath Kotur

On some old versions of FW, bnxt_hwrm_func_resc_qcaps can return an
error. This is because the command was not implemented completely
in FW till the subsequent version. Ignore the error and continue with
the driver initialization.

Fixes: edafb57ba4a1 ("net/bnxt: fix VF resource allocation")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 2cba007ea..1d3732eee 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -692,7 +692,12 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
 			bp->flags |= BNXT_FLAG_NEW_RM;
 	}
 
-	return rc;
+	/* On older FW,
+	 * bnxt_hwrm_func_resc_qcaps can fail and cause init failure.
+	 * But the error can be ignored. Return success.
+	 */
+
+	return 0;
 }
 
 /* VNIC cap covers capability of all VNICs. So no need to pass vnic_id */
@@ -901,7 +906,7 @@ int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)
 
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 
-	HWRM_CHECK_RESULT();
+	HWRM_CHECK_RESULT_SILENT();
 
 	if (BNXT_VF(bp)) {
 		bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->max_rsscos_ctx);
-- 
2.21.0 (Apple Git-122.2)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-stable] [PATCH 2/3] net/bnxt: fix jumbo frame configuration in firmware
       [not found] <20191119185638.78740-1-ajit.khaparde@broadcom.com>
  2019-11-19 18:56 ` [dpdk-stable] [PATCH 1/3] net/bnxt: fix to ignore resource qcaps error with older FW Ajit Khaparde
@ 2019-11-19 18:56 ` Ajit Khaparde
  1 sibling, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2019-11-19 18:56 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Rahul Gupta, stable, Somnath Kotur

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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-19 18:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191119185638.78740-1-ajit.khaparde@broadcom.com>
2019-11-19 18:56 ` [dpdk-stable] [PATCH 1/3] net/bnxt: fix to ignore resource qcaps error with older FW Ajit Khaparde
2019-11-19 18:56 ` [dpdk-stable] [PATCH 2/3] net/bnxt: fix jumbo frame configuration in firmware Ajit Khaparde

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/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 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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