Message ID | 1713954817-30133-1-git-send-email-shradhagupta@linux.microsoft.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Add sysfs attributes for MANA | expand |
On Wed, 24 Apr 2024 03:33:37 -0700 Shradha Gupta wrote: > Add sysfs attributes to read max_mtu and min_mtu value for > network devices Absolutely pointless. You posted v1, dumping this as a driver specific value, even tho it's already reported by the core... And you can't even produce a meaningful commit message longer than one sentence. This is not meeting the bar. Please get your patches reviewed internally at Microsoft by someone with good understanding of Linux networking before you post.
On Wed, Apr 24, 2024 at 08:27:03PM -0700, Jakub Kicinski wrote: > On Wed, 24 Apr 2024 03:33:37 -0700 Shradha Gupta wrote: > > Add sysfs attributes to read max_mtu and min_mtu value for > > network devices > > Absolutely pointless. You posted v1, dumping this as a driver > specific value, even tho it's already reported by the core... > And you can't even produce a meaningful commit message longer > than one sentence. > > This is not meeting the bar. Please get your patches reviewed > internally at Microsoft by someone with good understanding of > Linux networking before you post. Noted, I'll do the needful going forward. Apologies.
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net index ebf21beba846..f68f3b9be6ec 100644 --- a/Documentation/ABI/testing/sysfs-class-net +++ b/Documentation/ABI/testing/sysfs-class-net @@ -352,3 +352,19 @@ Description: 0 threaded mode disabled for this dev 1 threaded mode enabled for this dev == ================================== + +What: /sys/class/net/<iface>/max_mtu +Date: April 2024 +KernelVersion: 6.10 +Contact: netdev@vger.kernel.org +Description: + Indicates the interface's maximum supported MTU value, in + bytes, and in decimal format. + +What: /sys/class/net/<iface>/min_mtu +Date: April 2024 +KernelVersion: 6.10 +Contact: netdev@vger.kernel.org +Description: + Indicates the interface's minimum supported MTU value, in + bytes, and in decimal format. diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index e3d7a8cfa20b..525b85d47676 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -114,6 +114,8 @@ 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); +NETDEVICE_SHOW_RO(min_mtu, fmt_dec); static ssize_t iflink_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -671,6 +673,8 @@ static struct attribute *net_class_attrs[] __ro_after_init = { &dev_attr_carrier_up_count.attr, &dev_attr_carrier_down_count.attr, &dev_attr_threaded.attr, + &dev_attr_max_mtu.attr, + &dev_attr_min_mtu.attr, NULL, }; ATTRIBUTE_GROUPS(net_class);
Add sysfs attributes to read max_mtu and min_mtu value for network devices Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com> --- Changes in v2: * Created a new patch for generic attributes --- Documentation/ABI/testing/sysfs-class-net | 16 ++++++++++++++++ net/core/net-sysfs.c | 4 ++++ 2 files changed, 20 insertions(+)