[PATCH v5] net/i40e: rework maximum frame size configuration

Su, Simei simei.su at intel.com
Fri Feb 3 05:00:29 CET 2023


Hi David,

> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Thursday, February 2, 2023 9:24 PM
> To: Su, Simei <simei.su at intel.com>
> Cc: Xing, Beilei <beilei.xing at intel.com>; Zhang, Yuying
> <yuying.zhang at intel.com>; dev at dpdk.org; Zhang, Qi Z
> <qi.z.zhang at intel.com>; Yang, Qiming <qiming.yang at intel.com>;
> stable at dpdk.org
> Subject: Re: [PATCH v5] net/i40e: rework maximum frame size configuration
> 
> On Thu, Feb 2, 2023 at 1:37 PM Simei Su <simei.su at intel.com> wrote:
> > @@ -2467,8 +2466,16 @@ i40e_dev_start(struct rte_eth_dev *dev)
> >                             "please call hierarchy_commit() "
> >                             "before starting the port");
> >
> > -       max_frame_size = dev->data->mtu + I40E_ETH_OVERHEAD;
> > -       i40e_set_mac_max_frame(dev, max_frame_size);
> > +       max_frame_size = dev->data->mtu ?
> > +               dev->data->mtu + I40E_ETH_OVERHEAD :
> > +               I40E_FRAME_SIZE_MAX;
> > +
> > +       /* Set the max frame size to HW*/
> > +       ret = i40e_aq_set_mac_config(hw, max_frame_size, TRUE, false, 0,
> NULL);
> > +       if (ret) {
> > +               PMD_DRV_LOG(ERR, "Fail to set mac config");
> > +               return ret;
> > +       }
> 
> Reading this patch again.
> 
> Returning here seems incorrect as we leave rx/tx queue in started state.
> Don't we need to jump to tx_err label on error?

Yes, it's my fault to return here incorrectly. I will modify it in next version.

Thanks,
Simei

> 
> >
> >         return I40E_SUCCESS;
> >
> 
> --
> David Marchand



More information about the stable mailing list