> -----Original Message-----
> From: Stephen Hemminger <[email protected]>
> Sent: Tuesday, October 25, 2022 23:55
> To: Guo, Junfeng <[email protected]>
> Cc: Zhang, Qi Z <[email protected]>; Wu, Jingjing
> <[email protected]>; [email protected]; Xing, Beilei
> <[email protected]>; [email protected]; Li, Xiaoyun
> <[email protected]>; [email protected]; Richardson, Bruce
> <[email protected]>; [email protected]; Xia, Chenbo
> <[email protected]>; Zhang, Helin <[email protected]>
> Subject: Re: [PATCH v8 5/8] net/gve: add support for MTU setting
> 
> On Tue, 25 Oct 2022 17:07:26 +0800
> Junfeng Guo <[email protected]> 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!

Reply via email to