DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@xilinx.com, ajit.khaparde@broadcom.com
Subject: [dpdk-dev] [PATCH 7/8] net/bnxt: cleanups in MTU set callback
Date: Wed, 15 Jun 2022 20:27:02 +0530	[thread overview]
Message-ID: <20220615145703.6613-8-kalesh-anakkur.purayil@broadcom.com> (raw)
In-Reply-To: <20220615145703.6613-1-kalesh-anakkur.purayil@broadcom.com>

From: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>

Minor cleanup in bnxt_mtu_set_op() to move pre-mature
setting of jumbo flag post mtu check and remove
a redundant mtu set operation from rxq vnic configs.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org

Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 8 ++++----
 drivers/net/bnxt/bnxt_rxq.c    | 4 ----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f040cdc..e275d3a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3037,15 +3037,15 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 	if (!eth_dev->data->nb_rx_queues)
 		return -ENOTSUP;
 
+	/* Is there a change in mtu setting? */
+	if (eth_dev->data->mtu == new_mtu)
+		return 0;
+
 	if (new_mtu > RTE_ETHER_MTU)
 		bp->flags |= BNXT_FLAG_JUMBO;
 	else
 		bp->flags &= ~BNXT_FLAG_JUMBO;
 
-	/* Is there a change in mtu setting? */
-	if (eth_dev->data->mtu == new_mtu)
-		return 0;
-
 	for (i = 0; i < bp->nr_vnics; i++) {
 		struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
 		uint16_t size = 0;
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index f4b6417..fabbbd4 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -402,10 +402,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	rxq->rx_started = rxq->rx_deferred_start ? false : true;
 	rxq->vnic = BNXT_GET_DEFAULT_VNIC(bp);
 
-	/* Configure mtu if it is different from what was configured before */
-	if (!queue_idx)
-		bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu);
-
 	return 0;
 err:
 	bnxt_rx_queue_release_op(eth_dev, queue_idx);
-- 
2.10.1


  parent reply	other threads:[~2022-06-15 14:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15 14:56 [dpdk-dev] [PATCH 0/8] bnxt PMD fixes Kalesh A P
2022-06-15 14:56 ` [dpdk-dev] [PATCH 1/8] net/bnxt: remove assert for zero data len in Tx path Kalesh A P
2022-06-16 17:03   ` Ferruh Yigit
2022-06-19 23:09     ` Ajit Khaparde
2022-06-20 10:55       ` Ferruh Yigit
2022-06-20 17:03         ` Ajit Khaparde
2022-06-15 14:56 ` [dpdk-dev] [PATCH 2/8] net/bnxt: fix switch domain allocation Kalesh A P
2022-06-15 14:56 ` [dpdk-dev] [PATCH 3/8] net/bnxt: reduce the verbosity of a log Kalesh A P
2022-06-15 14:56 ` [dpdk-dev] [PATCH 4/8] net/bnxt: allow Tx only or Rx only configs in PMD Kalesh A P
2022-06-16 17:03   ` Ferruh Yigit
2022-06-21  4:46     ` Kalesh Anakkur Purayil
2022-06-21  4:54       ` Damodharam Ammepalli
2022-06-21  7:57         ` Ferruh Yigit
2022-06-15 14:57 ` [dpdk-dev] [PATCH 5/8] net/bnxt: fix setting forced speed Kalesh A P
2022-06-15 14:57 ` [dpdk-dev] [PATCH 6/8] net/bnxt: disallow MTU change when device is started Kalesh A P
2022-06-15 14:57 ` Kalesh A P [this message]
2022-06-15 14:57 ` [dpdk-dev] [PATCH 8/8] net/bnxt: fix the check for autoneg enablement in the PHY FW Kalesh A P
2022-06-16 17:04   ` Ferruh Yigit
2022-06-19 23:11     ` Ajit Khaparde
2022-06-26 20:45 ` [dpdk-dev] [PATCH 0/8] bnxt PMD fixes Ajit Khaparde
2022-06-27  2:08   ` Thomas Monjalon
2022-06-27  3:28     ` Ajit Khaparde

Reply instructions:

You may reply publicly 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=20220615145703.6613-8-kalesh-anakkur.purayil@broadcom.com \
    --to=kalesh-anakkur.purayil@broadcom.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@xilinx.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).