Re: [PATCH V9 net-next 05/11] net: hibmcge: Implement some .ndo functions
From: Kalesh Anakkur Purayil
Date: Tue Sep 10 2024 - 08:21:05 EST
On Tue, Sep 10, 2024 at 5:44 PM Andrew Lunn <andrew@xxxxxxx> 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
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature