From: Joshua Washington <joshwash@google.com>
To: Junfeng Guo <junfeng.guo@intel.com>,
Jeroen de Borst <jeroendb@google.com>,
Rushil Gupta <rushilg@google.com>,
Joshua Washington <joshwash@google.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@amd.com>
Subject: [PATCH] net/gve: allow GVE MTU greater than RTE_ETHER_MTU
Date: Fri, 29 Sep 2023 13:38:25 -0700 [thread overview]
Message-ID: <20230929203825.3136449-1-joshwash@google.com> (raw)
This patch corrects the MTU setting behavior in the GVE DPDK driver to
remove the artificial upper limit of RTE_ETHER_MTU. Instead, the max MTU
is dictated by the default value of the MTU that the device sends during
initialization, which will always be the maximum supported MTU.
Signed-off-by: Joshua Washington <joshwash@google.com>
---
drivers/net/gve/gve_ethdev.c | 5 +++--
drivers/net/gve/gve_ethdev.h | 3 ---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index 9b25f3036b..b441f96623 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -7,6 +7,7 @@
#include "base/gve_register.h"
#include "base/gve_osdep.h"
#include "gve_version.h"
+#include "rte_ether.h"
static void
gve_write_version(uint8_t *driver_version_register)
@@ -297,8 +298,8 @@ gve_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_tx_queues = priv->max_nb_txq;
dev_info->min_rx_bufsize = GVE_MIN_BUF_SIZE;
dev_info->max_rx_pktlen = GVE_MAX_RX_PKTLEN;
- dev_info->max_mtu = GVE_MAX_MTU;
- dev_info->min_mtu = GVE_MIN_MTU;
+ dev_info->max_mtu = priv->max_mtu;
+ dev_info->min_mtu = RTE_ETHER_MIN_MTU;
dev_info->rx_offload_capa = 0;
dev_info->tx_offload_capa =
diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h
index ca94a09a2f..1cba282128 100644
--- a/drivers/net/gve/gve_ethdev.h
+++ b/drivers/net/gve/gve_ethdev.h
@@ -23,9 +23,6 @@
#define GVE_MIN_BUF_SIZE 1024
#define GVE_MAX_RX_PKTLEN 65535
-#define GVE_MAX_MTU RTE_ETHER_MTU
-#define GVE_MIN_MTU RTE_ETHER_MIN_MTU
-
#define GVE_TX_CKSUM_OFFLOAD_MASK ( \
RTE_MBUF_F_TX_L4_MASK | \
RTE_MBUF_F_TX_TCP_SEG)
--
2.42.0.582.g8ccd20d70d-goog
next reply other threads:[~2023-09-29 20:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-29 20:38 Joshua Washington [this message]
2023-10-04 12:06 ` 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=20230929203825.3136449-1-joshwash@google.com \
--to=joshwash@google.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=jeroendb@google.com \
--cc=junfeng.guo@intel.com \
--cc=rushilg@google.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).