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.