From: Ratheesh Kannoth <rkannoth@marvell.com>
To: Shradha Gupta <shradhagupta@linux.microsoft.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Jonathan Corbet <corbet@lwn.net>,
Haiyang Zhang <haiyangz@microsoft.com>,
Randy Dunlap <rdunlap@infradead.org>,
Johannes Berg <johannes.berg@intel.com>,
Breno Leitao <leitao@debian.org>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>,
Shradha Gupta <shradhagupta@microsoft.com>
Subject: Re: [PATCH net-next v3] net: Add sysfs atttribute for max_mtu
Date: Thu, 9 May 2024 15:12:25 +0530 [thread overview]
Message-ID: <20240509094225.GA1078660@maili.marvell.com> (raw)
In-Reply-To: <1715245883-3467-1-git-send-email-shradhagupta@linux.microsoft.com>
On 2024-05-09 at 14:41:23, Shradha Gupta (shradhagupta@linux.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
>
next prev parent reply other threads:[~2024-05-09 9:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 9:11 Shradha Gupta
2024-05-09 9:42 ` Ratheesh Kannoth [this message]
2024-05-09 20:16 ` Andrew Lunn
2024-05-09 10:01 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240509094225.GA1078660@maili.marvell.com \
--to=rkannoth@marvell.com \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haiyangz@microsoft.com \
--cc=johannes.berg@intel.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=shradhagupta@linux.microsoft.com \
--cc=shradhagupta@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®