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: <CANn89iJsdvjsbcYv_Re5HHvmY=P7Sq6ewV_sdQuWTAFtOPoKbw@mail.gmail.com>
Date: Thu, 15 Feb 2024 13:47:47 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Breno Leitao <leitao@...ian.org>
Cc: kuba@...nel.org, davem@...emloft.net, pabeni@...hat.com, 
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org, horms@...nel.org, 
	Johannes Berg <johannes.berg@...el.com>, Amritha Nambiar <amritha.nambiar@...el.com>
Subject: Re: [PATCH net-next] net: sysfs: Do not create sysfs for non BQL device

On Thu, Feb 15, 2024 at 12:28 PM Breno Leitao <leitao@...ian.org> wrote:
>
> Creation of sysfs entries is expensive, mainly for workloads that
> constantly creates netdev and netns often.
>
> Do not create BQL sysfs entries for devices that don't need,
> basically those that do not have a real queue, i.e, devices that has
> NETIF_F_LLTX and IFF_NO_QUEUE, such as `lo` interface.
>
> This will remove the /sys/class/net/eth0/queues/tx-X/byte_queue_limits/
> directory for these devices.
>
> In the example below, eth0 has the `byte_queue_limits` directory but not
> `lo`.
>
>         # ls /sys/class/net/lo/queues/tx-0/
>         traffic_class  tx_maxrate  tx_timeout  xps_cpus  xps_rxqs
>
>         # ls /sys/class/net/eth0/queues/tx-0/byte_queue_limits/
>         hold_time  inflight  limit  limit_max  limit_min
>
> Suggested-by: Eric Dumazet <edumazet@...gle.com>
> Signed-off-by: Breno Leitao <leitao@...ian.org>
> ---
>  net/core/net-sysfs.c | 23 ++++++++++++++++++-----
>  1 file changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
> index a09d507c5b03..c79bc11a0347 100644
> --- a/net/core/net-sysfs.c
> +++ b/net/core/net-sysfs.c
> @@ -1417,6 +1417,15 @@ static ssize_t bql_show_inflight(struct netdev_queue *queue,
>         return sysfs_emit(buf, "%u\n", dql->num_queued - dql->num_completed);
>  }
>
> +static bool netdev_uses_bql(struct net_device *dev)

  const struct net_device *dev

> +{
> +       if (dev->features & NETIF_F_LLTX ||
> +           dev->priv_flags & IFF_NO_QUEUE)
> +               return false;
> +
> +       return true;
> +}
> +
>

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ