[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH-L+nN7k-AuzRsQijp1wtMnz0Mmko2ZhsdBV3cQb4JzP3YkmQ@mail.gmail.com>
Date: Tue, 10 Sep 2024 17:50:18 +0530
From: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Jijie Shao <shaojijie@...wei.com>, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, shenjian15@...wei.com,
wangpeiyang1@...wei.com, liuyonglong@...wei.com, chenhao418@...wei.com,
sudongming1@...wei.com, xujunsheng@...wei.com, shiyongbang@...wei.com,
libaihan@...wei.com, jdamato@...tly.com, horms@...nel.org,
jonathan.cameron@...wei.com, shameerali.kolothum.thodi@...wei.com,
salil.mehta@...wei.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V9 net-next 05/11] net: hibmcge: Implement some .ndo functions
On Tue, Sep 10, 2024 at 5:44 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> > > +static void hbg_change_mtu(struct hbg_priv *priv, int new_mtu)
> > > +{
> > > + u32 frame_len;
> > > +
> > > + frame_len = new_mtu + VLAN_HLEN * priv->dev_specs.vlan_layers +
> > > + ETH_HLEN + ETH_FCS_LEN;
> > > + hbg_hw_set_mtu(priv, frame_len);
> > > +}
> > > +
> > > +static int hbg_net_change_mtu(struct net_device *netdev, int new_mtu)
> > > +{
> > > + struct hbg_priv *priv = netdev_priv(netdev);
> > > + bool is_running = netif_running(netdev);
> > > +
> > > + if (is_running)
> > > + hbg_net_stop(netdev);
> > > +
> > > + hbg_change_mtu(priv, new_mtu);
> > > + WRITE_ONCE(netdev->mtu, new_mtu);
> > [Kalesh] IMO the setting of "netdev->mtu" should be moved to the core
> > layer so that not all drivers have to do this.
> > __dev_set_mtu() can be modified to incorporate this. Just a thought.
>
> Hi Kalesh
>
> If you look at git history, the core has left the driver to set
> dev->mtu since the beginning of the code being in git, and probably
> longer. It seems a bit unfair to ask a developer to go modify over 200
> drivers. Please feel free to submit 200 patches yourself.
Hi Andrew,
I did not ask Jijie to make this change. In fact, I had added my RB
tag and added this as a comment saying this comment has nothing to do
with his changes.
Sorry for the confusion.
>
> Andrew
--
Regards,
Kalesh A P
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4239 bytes)
Powered by blists - more mailing lists