Commit ccba9f6
net: update NAPI threaded config even for disabled NAPIs
We have to make sure that all future NAPIs will have the right threaded
state when the state is configured on the device level.
We chose not to have an "unset" state for threaded, and not to wipe
the NAPI config clean when channels are explicitly disabled.
This means the persistent config structs "exist" even when their NAPIs
are not instantiated.
Differently put - the NAPI persistent state lives in the net_device
(ncfg == struct napi_config):
,--- [napi 0] - [napi 1]
[dev] | |
`--- [ncfg 0] - [ncfg 1]
so say we a device with 2 queues but only 1 enabled:
,--- [napi 0]
[dev] |
`--- [ncfg 0] - [ncfg 1]
now we set the device to threaded=1:
,---------- [napi 0 (thr:1)]
[dev(thr:1)] |
`---------- [ncfg 0 (thr:1)] - [ncfg 1 (thr:?)]
Since [ncfg 1] was not attached to a NAPI during configuration we
skipped it. If we create a NAPI for it later it will have the old
setting (presumably disabled). One could argue if this is right
or not "in principle", but it's definitely not how things worked
before per-NAPI config..
Fixes: 2677010 ("Add support to set NAPI threaded for individual NAPI")
Signed-off-by: Jakub Kicinski <[email protected]>
Reviewed-by: Joe Damato <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>1 parent bda053d commit ccba9f6
2 files changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2071 | 2071 | | |
2072 | 2072 | | |
2073 | 2073 | | |
| 2074 | + | |
| 2075 | + | |
2074 | 2076 | | |
2075 | 2077 | | |
2076 | 2078 | | |
| |||
2482 | 2484 | | |
2483 | 2485 | | |
2484 | 2486 | | |
2485 | | - | |
| 2487 | + | |
2486 | 2488 | | |
| 2489 | + | |
2487 | 2490 | | |
2488 | 2491 | | |
2489 | 2492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6999 | 6999 | | |
7000 | 7000 | | |
7001 | 7001 | | |
7002 | | - | |
| 7002 | + | |
7003 | 7003 | | |
7004 | 7004 | | |
7005 | 7005 | | |
| |||
7021 | 7021 | | |
7022 | 7022 | | |
7023 | 7023 | | |
| 7024 | + | |
| 7025 | + | |
| 7026 | + | |
| 7027 | + | |
7024 | 7028 | | |
7025 | 7029 | | |
7026 | 7030 | | |
| |||
11873 | 11877 | | |
11874 | 11878 | | |
11875 | 11879 | | |
| 11880 | + | |
11876 | 11881 | | |
11877 | 11882 | | |
11878 | 11883 | | |
| |||
0 commit comments