[PATCH v8 5/8] net/gve: add support for MTU setting
Guo, Junfeng
junfeng.guo at intel.com
Wed Oct 26 04:15:35 CEST 2022
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Tuesday, October 25, 2022 23:55
> To: Guo, Junfeng <junfeng.guo at intel.com>
> Cc: Zhang, Qi Z <qi.z.zhang at intel.com>; Wu, Jingjing
> <jingjing.wu at intel.com>; ferruh.yigit at xilinx.com; Xing, Beilei
> <beilei.xing at intel.com>; dev at dpdk.org; Li, Xiaoyun
> <xiaoyun.li at intel.com>; awogbemila at google.com; Richardson, Bruce
> <bruce.richardson at intel.com>; hemant.agrawal at nxp.com; Xia, Chenbo
> <chenbo.xia at intel.com>; Zhang, Helin <helin.zhang at intel.com>
> Subject: Re: [PATCH v8 5/8] net/gve: add support for MTU setting
>
> On Tue, 25 Oct 2022 17:07:26 +0800
> Junfeng Guo <junfeng.guo at 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.
Thanks for the comment. Yes, this part seems redundant with
_validate_mtu() for the same check.
Maybe better to update this as a bugfix later. Thanks!
More information about the dev
mailing list