Commit f9dc3e5
committed
net: ethtool: remove the data argument from ethtool_notify()
ethtool_notify() takes a const void *data argument, which presumably
was intended to pass information from the call site to the subcommand
handler. This argument currently has no users.
Expecting the data to be subcommand-specific has two complications.
Complication #1 is that its not plumbed thru any of the standardized
callbacks. It gets propagated to ethnl_default_notify() where it
remains unused. Coming from the ethnl_default_set_doit() side we pass
in NULL, because how could we have a command specific attribute in
a generic handler.
Complication #2 is that we expect the ethtool_notify() callers to
know what attribute type to pass in. Again, the data pointer is
untyped.
RSS will need to pass the context ID to the notifications.
I think it's a better design if the "subcommand" exports its own
typed interface and constructs the appropriate argument struct
(which will be req_info). Remove the unused data argument from
ethtool_notify() but retain it in a new internal helper which
subcommands can use to build a typed interface.
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250623231720.3124717-5-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 963781b commit f9dc3e5
File tree
4 files changed
+23
-18
lines changed- include/linux
- net/ethtool
4 files changed
+23
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5138 | 5138 | | |
5139 | 5139 | | |
5140 | 5140 | | |
5141 | | - | |
| 5141 | + | |
5142 | 5142 | | |
5143 | | - | |
5144 | | - | |
| 5143 | + | |
5145 | 5144 | | |
5146 | 5145 | | |
5147 | 5146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | | - | |
621 | | - | |
| 620 | + | |
| 621 | + | |
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
712 | | - | |
| 711 | + | |
| 712 | + | |
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
| |||
1868 | 1868 | | |
1869 | 1869 | | |
1870 | 1870 | | |
1871 | | - | |
| 1871 | + | |
1872 | 1872 | | |
1873 | 1873 | | |
1874 | 1874 | | |
| |||
1944 | 1944 | | |
1945 | 1945 | | |
1946 | 1946 | | |
1947 | | - | |
| 1947 | + | |
1948 | 1948 | | |
1949 | 1949 | | |
1950 | 1950 | | |
| |||
2184 | 2184 | | |
2185 | 2185 | | |
2186 | 2186 | | |
2187 | | - | |
| 2187 | + | |
2188 | 2188 | | |
2189 | 2189 | | |
2190 | 2190 | | |
| |||
2228 | 2228 | | |
2229 | 2229 | | |
2230 | 2230 | | |
2231 | | - | |
| 2231 | + | |
2232 | 2232 | | |
2233 | 2233 | | |
2234 | 2234 | | |
| |||
2295 | 2295 | | |
2296 | 2296 | | |
2297 | 2297 | | |
2298 | | - | |
| 2298 | + | |
2299 | 2299 | | |
2300 | 2300 | | |
2301 | 2301 | | |
| |||
2326 | 2326 | | |
2327 | 2327 | | |
2328 | 2328 | | |
2329 | | - | |
| 2329 | + | |
2330 | 2330 | | |
2331 | 2331 | | |
2332 | 2332 | | |
| |||
3328 | 3328 | | |
3329 | 3329 | | |
3330 | 3330 | | |
3331 | | - | |
| 3331 | + | |
3332 | 3332 | | |
3333 | 3333 | | |
3334 | 3334 | | |
| |||
3392 | 3392 | | |
3393 | 3393 | | |
3394 | 3394 | | |
3395 | | - | |
| 3395 | + | |
3396 | 3396 | | |
3397 | 3397 | | |
3398 | 3398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
911 | 911 | | |
912 | 912 | | |
913 | 913 | | |
914 | | - | |
| 914 | + | |
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
| |||
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
1052 | | - | |
| 1052 | + | |
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
| |||
1062 | 1062 | | |
1063 | 1063 | | |
1064 | 1064 | | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1065 | 1070 | | |
1066 | 1071 | | |
1067 | 1072 | | |
1068 | 1073 | | |
1069 | 1074 | | |
1070 | 1075 | | |
1071 | | - | |
| 1076 | + | |
1072 | 1077 | | |
1073 | 1078 | | |
1074 | 1079 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
0 commit comments