Skip to content

Commit

Permalink
net/gve: fix max MTU limit
Browse files Browse the repository at this point in the history
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.

Fixes: 71dea04 ("net/gve: support device info and configure")
Cc: [email protected]

Signed-off-by: Joshua Washington <[email protected]>
  • Loading branch information
josh8551021 authored and ferruhy committed Oct 4, 2023
1 parent 7d18af7 commit 030025b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 3 additions & 2 deletions drivers/net/gve/gve_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 =
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/gve/gve_ethdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 030025b

Please sign in to comment.