lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a8cf886d-415b-4211-8c70-e8427cc67921@lunn.ch>
Date: Tue, 10 Sep 2024 14:14:25 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
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

> > +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.

	 Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ