[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW3PR11MB4522368189AECDC70E77E6688F6E0@MW3PR11MB4522.namprd11.prod.outlook.com>
Date: Mon, 29 Jun 2020 18:48:34 +0000
From: "Brady, Alan" <alan.brady@...el.com>
To: Jakub Kicinski <kuba@...nel.org>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"Michael, Alice" <alice.michael@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"nhorman@...hat.com" <nhorman@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>,
"Burra, Phani R" <phani.r.burra@...el.com>,
"Hay, Joshua A" <joshua.a.hay@...el.com>,
"Chittim, Madhu" <madhu.chittim@...el.com>,
"Linga, Pavan Kumar" <pavan.kumar.linga@...el.com>,
"Skidmore, Donald C" <donald.c.skidmore@...el.com>,
"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
"Samudrala, Sridhar" <sridhar.samudrala@...el.com>
Subject: RE: [net-next v3 13/15] iecm: Add ethtool
> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Friday, June 26, 2020 11:57 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@...el.com>
> Cc: davem@...emloft.net; Michael, Alice <alice.michael@...el.com>;
> netdev@...r.kernel.org; nhorman@...hat.com; sassmann@...hat.com;
> Brady, Alan <alan.brady@...el.com>; Burra, Phani R <phani.r.burra@...el.com>;
> Hay, Joshua A <joshua.a.hay@...el.com>; Chittim, Madhu
> <madhu.chittim@...el.com>; Linga, Pavan Kumar
> <pavan.kumar.linga@...el.com>; Skidmore, Donald C
> <donald.c.skidmore@...el.com>; Brandeburg, Jesse
> <jesse.brandeburg@...el.com>; Samudrala, Sridhar
> <sridhar.samudrala@...el.com>
> Subject: Re: [net-next v3 13/15] iecm: Add ethtool
>
> On Thu, 25 Jun 2020 19:07:35 -0700 Jeff Kirsher wrote:
> > @@ -978,7 +1059,20 @@ static int iecm_open(struct net_device *netdev)
> > */
> > static int iecm_change_mtu(struct net_device *netdev, int new_mtu) {
> > - /* stub */
> > + struct iecm_vport *vport = iecm_netdev_to_vport(netdev);
> > +
> > + if (new_mtu < netdev->min_mtu) {
> > + netdev_err(netdev, "new MTU invalid. min_mtu is %d\n",
> > + netdev->min_mtu);
> > + return -EINVAL;
> > + } else if (new_mtu > netdev->max_mtu) {
> > + netdev_err(netdev, "new MTU invalid. max_mtu is %d\n",
> > + netdev->max_mtu);
> > + return -EINVAL;
> > + }
>
> Core already checks this. Please remove all checks which core already does.
>
> > + netdev->mtu = new_mtu;
> > +
> > + return iecm_initiate_soft_reset(vport, __IECM_SR_MTU_CHANGE);
> > }
Will fix, thanks
Alan
Powered by blists - more mailing lists