On Tue, 25 Oct 2022 17:07:26 +0800 Junfeng Guo <junfeng....@intel.com> wrote:
> +static int > +gve_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) > +{ > + struct gve_priv *priv = dev->data->dev_private; > + int err; > + > + if (mtu < RTE_ETHER_MIN_MTU || mtu > priv->max_mtu) { > + PMD_DRV_LOG(ERR, "MIN MTU is %u, MAX MTU is %u", > + RTE_ETHER_MIN_MTU, priv->max_mtu); > + return -EINVAL; > + } This check should not be necessary. In rte_eth_dev_set_mtu it queries device for min/max mtu then calls eth_dev_validate_mtu() to check that the mtu is ok.