[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240830083641.GI1368797@kernel.org>
Date: Fri, 30 Aug 2024 09:36:41 +0100
From: Simon Horman <horms@...nel.org>
To: Joe Damato <jdamato@...tly.com>
Cc: netdev@...r.kernel.org, edumazet@...gle.com, amritha.nambiar@...el.com,
sridhar.samudrala@...el.com, sdf@...ichev.me, bjorn@...osinc.com,
hch@...radead.org, willy@...radead.org,
willemdebruijn.kernel@...il.com, skhawaja@...gle.com,
kuba@...nel.org, Martin Karsten <mkarsten@...terloo.ca>,
"David S. Miller" <davem@...emloft.net>,
Paolo Abeni <pabeni@...hat.com>, Jiri Pirko <jiri@...nulli.us>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Breno Leitao <leitao@...ian.org>,
Johannes Berg <johannes.berg@...el.com>,
Alexander Lobakin <aleksander.lobakin@...el.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 1/5] net: napi: Make napi_defer_hard_irqs
per-NAPI
On Thu, Aug 29, 2024 at 01:11:57PM +0000, Joe Damato wrote:
> Allow per-NAPI defer_hard_irqs setting.
>
> The existing sysfs parameter is respected; writes to sysfs will write to
> all NAPI structs for the device and the net_device defer_hard_irq field.
> Reads from sysfs will read from the net_device field.
>
> sysfs code was updated to guard against what appears to be a potential
> overflow as the field is an int, but the value passed in is an unsigned
> long.
>
> The ability to set defer_hard_irqs on specific NAPI instances will be
> added in a later commit, via netdev-genl.
>
> Signed-off-by: Joe Damato <jdamato@...tly.com>
> Reviewed-by: Martin Karsten <mkarsten@...terloo.ca>
> Tested-by: Martin Karsten <mkarsten@...terloo.ca>
> ---
> include/linux/netdevice.h | 23 +++++++++++++++++++++++
> net/core/dev.c | 29 ++++++++++++++++++++++++++---
> net/core/net-sysfs.c | 5 ++++-
> 3 files changed, 53 insertions(+), 4 deletions(-)
...
> @@ -534,6 +535,28 @@ static inline void napi_schedule_irqoff(struct napi_struct *n)
> __napi_schedule_irqoff(n);
> }
>
> +/**
> + * napi_get_defer_hard_irqs - get the NAPI's defer_hard_irqs
> + * @n: napi struct to get the defer_hard_irqs field from
> + *
> + * Returns the per-NAPI value of the defar_hard_irqs field.
> + */
> +int napi_get_defer_hard_irqs(const struct napi_struct *n);
Hi Joe,
As it looks like there will be a v2 anyway, a minor nit from my side.
Thanks for documenting the return value, but I believe that
./scripts/kernel-doc -none -Wall expects "Return: " or "Returns: "
Likewise in patch 3/5.
...
Powered by blists - more mailing lists