> -----Original Message-----
> From: Stephen Hemminger <step...@networkplumber.org>
> Sent: Tuesday, October 25, 2022 23:55
> To: Guo, Junfeng <junfeng....@intel.com>
> Cc: Zhang, Qi Z <qi.z.zh...@intel.com>; Wu, Jingjing
> <jingjing...@intel.com>; ferruh.yi...@xilinx.com; Xing, Beilei
> <beilei.x...@intel.com>; dev@dpdk.org; Li, Xiaoyun
> <xiaoyun...@intel.com>; awogbem...@google.com; Richardson, Bruce
> <bruce.richard...@intel.com>; hemant.agra...@nxp.com; Xia, Chenbo
> <chenbo....@intel.com>; Zhang, Helin <helin.zh...@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....@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!

Reply via email to