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: <20240509094225.GA1078660@maili.marvell.com>
Date: Thu, 9 May 2024 15:12:25 +0530
From: Ratheesh Kannoth <rkannoth@...vell.com>
To: Shradha Gupta <shradhagupta@...ux.microsoft.com>
CC: "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet
	<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni
	<pabeni@...hat.com>, Bjorn Helgaas <bhelgaas@...gle.com>,
        Jonathan Corbet
	<corbet@....net>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Randy Dunlap
	<rdunlap@...radead.org>,
        Johannes Berg <johannes.berg@...el.com>,
        Breno
 Leitao <leitao@...ian.org>, <linux-kernel@...r.kernel.org>,
        <netdev@...r.kernel.org>, Shradha Gupta <shradhagupta@...rosoft.com>
Subject: Re: [PATCH net-next v3] net: Add sysfs atttribute for max_mtu

On 2024-05-09 at 14:41:23, Shradha Gupta (shradhagupta@...ux.microsoft.com) wrote:
> For drivers like MANA, max_mtu value is populated with the value of
> maximum MTU that the underlying hardware can support.
IIUC, this reads dev->mtu. you can read the same using ifconfig, or any thing that uses
SIOCGIFMTU. why do you need to add a new sysfs ?

> Exposing this attribute as sysfs param, would be helpful in debugging
> and customization of config issues with such drivers.
>
> --- a/net/core/net-sysfs.c
> +++ b/net/core/net-sysfs.c
> @@ -114,6 +114,7 @@ NETDEVICE_SHOW_RO(addr_len, fmt_dec);
>  NETDEVICE_SHOW_RO(ifindex, fmt_dec);
>  NETDEVICE_SHOW_RO(type, fmt_dec);
>  NETDEVICE_SHOW_RO(link_mode, fmt_dec);
> +NETDEVICE_SHOW_RO(max_mtu, fmt_dec);
>
>  static ssize_t iflink_show(struct device *dev, struct device_attribute *attr,
>  			   char *buf)
> @@ -660,6 +661,7 @@ static struct attribute *net_class_attrs[] __ro_after_init = {
>  	&dev_attr_ifalias.attr,
>  	&dev_attr_carrier.attr,
>  	&dev_attr_mtu.attr,
> +	&dev_attr_max_mtu.attr,
>  	&dev_attr_flags.attr,
>  	&dev_attr_tx_queue_len.attr,
>  	&dev_attr_gro_flush_timeout.attr,
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ