lkml.org 
[lkml]   [2024]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net-next v3] net: Add sysfs atttribute for max_mtu
On Thu, May 9, 2024 at 11:11 AM 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.
> Exposing this attribute as sysfs param, would be helpful in debugging
> and customization of config issues with such drivers.
>
> Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
> ---
> Changes in v3:
> * Removed the min_mtu sysfs attribute as it was not needed
> * Improved the commit message to explain the need for the changes
> * Seperated this patch from other mana attributes requirements.
> ---
> Documentation/ABI/testing/sysfs-class-net | 8 ++++++++
> net/core/net-sysfs.c | 2 ++
> 2 files changed, 10 insertions(+)


Sorry, this is a NACK from my side.

Adding sysfs attributes is costly for setups adding/deleting many
netns/devices per second.

RTNL already provides this value.

net/core/rtnetlink.c:1850: nla_put_u32(skb, IFLA_MAX_MTU,
READ_ONCE(dev->max_mtu)) ||

\
 
 \ /
  Last update: 2024-05-09 12:02    [W:0.032 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site