Thread (22 messages) 22 messages, 5 authors, 2025-04-14

Re: [PATCH net-next v4 1/4] Add support to set napi threaded for individual napi

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-03-25 14:51:08

On Fri, 21 Mar 2025 10:10:09 -0700 Joe Damato wrote:
quoted
+int napi_set_threaded(struct napi_struct *napi, bool threaded)
+{
+	if (napi->dev->threaded)
+		return -EINVAL;  
This works differently than the existing per-NAPI defer_hard_irqs /
gro_flush_timeout which are also interface wide.

In that implementation: 
  - the per-NAPI value is set when requested by the user
  - when the sysfs value is written, all NAPIs have their values
    overwritten to the sysfs value

I think either:
  - This implementation should work like the existing ones, or
  - The existing ones should be changed to work like this

I am opposed to have two different behaviors when setting per-NAPI
vs system/nic-wide sysfs values.

I don't have a preference on which behavior is chosen, but the
behavior should be the same for all of the things that are
system/nic-wide and moving to per-NAPI.
And we should probably have a test that verifies the consistency
for all the relevant attrs.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help