DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michal Krawczyk <mk@semihalf.com>
To: ferruh.yigit@intel.com
Cc: shaibran@amazon.com, upstream@semihalf.com, mw@semihalf.com,
	dev@dpdk.org, Dawid Gorecki <dgr@semihalf.com>,
	Michal Krawczyk <mk@semihalf.com>,
	Amit Bernstein <amitbern@amazon.com>
Subject: [PATCH 2/4] net/ena: skip MTU verification
Date: Tue,  7 Jun 2022 18:43:39 +0200	[thread overview]
Message-ID: <20220607164341.19088-3-mk@semihalf.com> (raw)
In-Reply-To: <20220607164341.19088-1-mk@semihalf.com>

From: Dawid Gorecki <dgr@semihalf.com>

Remove MTU verification from ena_mtu_set() and ena_start(). It is done
by rte_ethdev already, so there is no reason to repeat it inside the ENA
driver.

Signed-off-by: Dawid Gorecki <dgr@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 68a4478410..efd6dea4c2 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -987,20 +987,6 @@ static int ena_queue_start_all(struct rte_eth_dev *dev,
 	return rc;
 }
 
-static int ena_check_valid_conf(struct ena_adapter *adapter)
-{
-	uint32_t mtu = adapter->edev_data->mtu;
-
-	if (mtu > adapter->max_mtu || mtu < ENA_MIN_MTU) {
-		PMD_INIT_LOG(ERR,
-			"Unsupported MTU of %d. Max MTU: %d, min MTU: %d\n",
-			mtu, adapter->max_mtu, ENA_MIN_MTU);
-		return ENA_COM_UNSUPPORTED;
-	}
-
-	return 0;
-}
-
 static int
 ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx,
 		       bool use_large_llq_hdr)
@@ -1165,13 +1151,6 @@ static int ena_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	ena_dev = &adapter->ena_dev;
 	ena_assert_msg(ena_dev != NULL, "Uninitialized device\n");
 
-	if (mtu > adapter->max_mtu || mtu < ENA_MIN_MTU) {
-		PMD_DRV_LOG(ERR,
-			"Invalid MTU setting. New MTU: %d, max MTU: %d, min MTU: %d\n",
-			mtu, adapter->max_mtu, ENA_MIN_MTU);
-		return -EINVAL;
-	}
-
 	rc = ENA_PROXY(adapter, ena_com_set_dev_mtu, ena_dev, mtu);
 	if (rc)
 		PMD_DRV_LOG(ERR, "Could not set MTU: %d\n", mtu);
@@ -1193,10 +1172,6 @@ static int ena_start(struct rte_eth_dev *dev)
 		return -EPERM;
 	}
 
-	rc = ena_check_valid_conf(adapter);
-	if (rc)
-		return rc;
-
 	rc = ena_setup_rx_intr(dev);
 	if (rc)
 		return rc;
-- 
2.25.1


  parent reply	other threads:[~2022-06-07 16:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 16:43 [PATCH 0/4] net/ena: v2.7.0 driver release Michal Krawczyk
2022-06-07 16:43 ` [PATCH 1/4] net/ena: add fast mbuf free support Michal Krawczyk
2022-06-07 16:43 ` Michal Krawczyk [this message]
2022-06-07 16:43 ` [PATCH 3/4] net/ena: add an option to disable LLQ Michal Krawczyk
2022-06-07 16:43 ` [PATCH 4/4] net/ena: update version to 2.7.0 Michal Krawczyk
2022-06-07 19:02 ` [PATCH 0/4] net/ena: v2.7.0 driver release Ferruh Yigit

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=20220607164341.19088-3-mk@semihalf.com \
    --to=mk@semihalf.com \
    --cc=amitbern@amazon.com \
    --cc=dev@dpdk.org \
    --cc=dgr@semihalf.com \
    --cc=ferruh.yigit@intel.com \
    --cc=mw@semihalf.com \
    --cc=shaibran@amazon.com \
    --cc=upstream@semihalf.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).