Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'netlink-specs-rtnetlink-adjust-specs-for-c-codegen'

Jakub Kicinski says:

====================
netlink: specs: rtnetlink: adjust specs for C codegen

The first patch brings a schema extension allowing specifying
"header" (as in .h file) properties in attribute sets.
This is used for rare cases where we carry attributes from
another family in a nest - we need to include the extra
headers. If we were to generate kernel code we'd also
need to skip it in the uAPI output.

The remaining 11 patches are pretty boring schema adjustments.
====================

Link: https://patch.msgid.link/20250418021706.1967583-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+69 -23
+42 -19
Documentation/netlink/specs/rt-link.yaml
··· 2 2 3 3 name: rt-link 4 4 protocol: netlink-raw 5 + uapi-header: linux/rtnetlink.h 5 6 protonum: 0 6 7 7 8 doc: ··· 12 11 - 13 12 name: ifinfo-flags 14 13 type: flags 14 + header: linux/if.h 15 + enum-name: net-device-flags 16 + name-prefix: iff- 15 17 entries: 16 18 - 17 19 name: up ··· 57 53 - 58 54 name: vlan-protocols 59 55 type: enum 56 + enum-name: 60 57 entries: 61 58 - 62 59 name: 8021q ··· 759 754 - 760 755 name: vlan-flags 761 756 type: flags 757 + enum-name: 762 758 entries: 763 759 - reorder-hdr 764 760 - gvrp ··· 846 840 - 847 841 name: ifla-vf-link-state-enum 848 842 type: enum 843 + enum-name: 849 844 entries: 850 845 - auto 851 846 - enable ··· 913 906 - 914 907 name: rtext-filter 915 908 type: flags 909 + enum-name: 916 910 entries: 917 911 - vf 918 912 - brvlan ··· 926 918 - 927 919 name: netkit-policy 928 920 type: enum 921 + enum-name: 929 922 entries: 930 923 - 931 924 name: forward ··· 937 928 - 938 929 name: netkit-mode 939 930 type: enum 931 + enum-name: netkit-mode 940 932 entries: 941 933 - name: l2 942 934 - name: l3 ··· 945 935 - 946 936 name: netkit-scrub 947 937 type: enum 938 + enum-name: 948 939 entries: 949 940 - name: none 950 941 - name: default ··· 1188 1177 multi-attr: true 1189 1178 - 1190 1179 name: af-spec-attrs 1180 + name-prefix: af- 1181 + attr-max-name: af-max 1191 1182 attributes: 1192 1183 - 1193 - name: "inet" 1184 + name: inet 1194 1185 type: nest 1195 1186 value: 2 1196 1187 nested-attributes: ifla-attrs 1197 1188 - 1198 - name: "inet6" 1189 + name: inet6 1199 1190 type: nest 1200 1191 value: 10 1201 1192 nested-attributes: ifla6-attrs 1202 1193 - 1203 - name: "mctp" 1194 + name: mctp 1204 1195 type: nest 1205 1196 value: 45 1206 1197 nested-attributes: mctp-attrs 1207 1198 - 1208 1199 name: vfinfo-list-attrs 1200 + name-prefix: ifla-vf- 1209 1201 attributes: 1210 1202 - 1211 1203 name: info ··· 1217 1203 multi-attr: true 1218 1204 - 1219 1205 name: vfinfo-attrs 1206 + name-prefix: ifla-vf- 1220 1207 attributes: 1221 1208 - 1222 1209 name: mac ··· 1272 1257 type: binary 1273 1258 - 1274 1259 name: vf-stats-attrs 1260 + name-prefix: ifla-vf-stats- 1275 1261 attributes: 1276 1262 - 1277 1263 name: rx-packets ··· 1304 1288 type: u64 1305 1289 - 1306 1290 name: vf-vlan-attrs 1291 + name-prefix: ifla-vf-vlan- 1292 + attr-max-name: ifla-vf-vlan-info-max 1307 1293 attributes: 1308 1294 - 1309 1295 name: info ··· 1314 1296 multi-attr: true 1315 1297 - 1316 1298 name: vf-ports-attrs 1299 + name-prefix: ifla- 1317 1300 attributes: [] 1318 1301 - 1319 1302 name: port-self-attrs 1303 + name-prefix: ifla- 1320 1304 attributes: [] 1321 1305 - 1322 1306 name: linkinfo-attrs 1307 + name-prefix: ifla-info- 1323 1308 attributes: 1324 1309 - 1325 1310 name: kind ··· 1447 1426 type: indexed-array 1448 1427 sub-type: binary 1449 1428 display-hint: ipv6 1429 + checks: 1430 + exact-len: 16 1450 1431 - 1451 1432 name: coupled-control 1452 1433 type: u8 ··· 1878 1855 - 1879 1856 name: linkinfo-vti-attrs 1880 1857 name-prefix: ifla-vti- 1858 + header: linux/if_tunnel.h 1881 1859 attributes: 1882 1860 - 1883 1861 name: link ··· 2131 2107 byte-order: big-endian 2132 2108 - 2133 2109 name: ifla-vlan-qos 2134 - name-prefix: ifla-vlan-qos 2110 + name-prefix: ifla-vlan-qos- 2135 2111 attributes: 2136 2112 - 2137 2113 name: mapping ··· 2147 2123 type: u32 2148 2124 - 2149 2125 name: xdp-attrs 2126 + name-prefix: ifla-xdp- 2150 2127 attributes: 2151 2128 - 2152 2129 name: fd ··· 2175 2150 type: s32 2176 2151 - 2177 2152 name: ifla-attrs 2153 + name-prefix: ifla-inet- 2178 2154 attributes: 2179 2155 - 2180 2156 name: conf ··· 2183 2157 struct: ipv4-devconf 2184 2158 - 2185 2159 name: ifla6-attrs 2160 + name-prefix: ifla-inet6- 2186 2161 attributes: 2187 2162 - 2188 2163 name: flags ··· 2249 2222 type: binary 2250 2223 - 2251 2224 name: link-offload-xstats 2225 + name-prefix: ifla-offload-xstats- 2252 2226 attributes: 2253 2227 - 2254 2228 name: cpu-hit ··· 2264 2236 type: binary 2265 2237 - 2266 2238 name: hw-s-info-one 2239 + name-prefix: ifla-offload-xstats-hw-s-info- 2267 2240 attributes: 2268 2241 - 2269 2242 name: request ··· 2274 2245 type: u8 2275 2246 - 2276 2247 name: link-dpll-pin-attrs 2248 + name-prefix: dpll-a- 2249 + header: linux/dpll.h 2277 2250 attributes: 2278 2251 - 2279 2252 name: id ··· 2388 2357 2389 2358 operations: 2390 2359 enum-model: directional 2360 + name-prefix: rtm- 2391 2361 list: 2392 2362 - 2393 2363 name: newlink ··· 2399 2367 request: 2400 2368 value: 16 2401 2369 attributes: &link-new-attrs 2402 - - ifi-index 2403 2370 - ifname 2404 2371 - net-ns-pid 2405 2372 - net-ns-fd ··· 2414 2383 - txqlen 2415 2384 - operstate 2416 2385 - linkmode 2417 - - group 2418 2386 - gso-max-size 2419 2387 - gso-max-segs 2420 2388 - gro-max-size 2421 2389 - gso-ipv4-max-size 2422 2390 - gro-ipv4-max-size 2423 2391 - af-spec 2392 + - 2393 + name: newlink-ntf 2394 + doc: Notify that a link has been created 2395 + value: 16 2396 + notify: getlink 2397 + fixed-header: ifinfomsg 2424 2398 - 2425 2399 name: dellink 2426 2400 doc: Delete an existing link. ··· 2435 2399 request: 2436 2400 value: 17 2437 2401 attributes: 2438 - - ifi-index 2439 2402 - ifname 2440 2403 - 2441 2404 name: getlink ··· 2445 2410 request: 2446 2411 value: 18 2447 2412 attributes: 2448 - - ifi-index 2449 2413 - ifname 2450 2414 - alt-ifname 2451 2415 - ext-mask ··· 2452 2418 reply: 2453 2419 value: 16 2454 2420 attributes: &link-all-attrs 2455 - - ifi-family 2456 - - ifi-type 2457 - - ifi-index 2458 - - ifi-flags 2459 - - ifi-change 2460 2421 - address 2461 2422 - broadcast 2462 2423 - ifname ··· 2497 2468 - xdp 2498 2469 - event 2499 2470 - new-netnsid 2500 - - if-netnsid 2501 2471 - target-netnsid 2502 2472 - carrier-up-count 2503 2473 - carrier-down-count ··· 2543 2515 do: 2544 2516 request: 2545 2517 value: 94 2546 - attributes: 2547 - - ifindex 2548 2518 reply: 2549 2519 value: 92 2550 2520 attributes: &link-stats-attrs 2551 - - family 2552 - - ifindex 2553 - - filter-mask 2554 2521 - link-64 2555 2522 - link-xstats 2556 2523 - link-xstats-slave
+11 -1
Documentation/netlink/specs/rt-neigh.yaml
··· 2 2 3 3 name: rt-neigh 4 4 protocol: netlink-raw 5 + uapi-header: linux/rtnetlink.h 5 6 protonum: 0 6 7 7 8 doc: ··· 49 48 - 50 49 name: nud-state 51 50 type: flags 51 + enum-name: 52 52 entries: 53 53 - incomplete 54 54 - reachable ··· 62 60 - 63 61 name: ntf-flags 64 62 type: flags 63 + enum-name: 65 64 entries: 66 65 - use 67 66 - self ··· 75 72 - 76 73 name: ntf-ext-flags 77 74 type: flags 75 + enum-name: 78 76 entries: 79 77 - managed 80 78 - locked 81 79 - 82 80 name: rtm-type 83 81 type: enum 82 + enum-name: 84 83 entries: 85 84 - unspec 86 85 - unicast ··· 184 179 attribute-sets: 185 180 - 186 181 name: neighbour-attrs 182 + name-prefix: nda- 187 183 attributes: 188 184 - 189 185 name: unspec ··· 247 241 type: u8 248 242 - 249 243 name: ndt-attrs 244 + name-prefix: ndta- 250 245 attributes: 251 246 - 252 247 name: name ··· 281 274 type: pad 282 275 - 283 276 name: ndtpa-attrs 277 + name-prefix: ndtpa- 284 278 attributes: 285 279 - 286 280 name: ifindex ··· 343 335 344 336 operations: 345 337 enum-model: directional 338 + name-prefix: rtm- 346 339 list: 347 340 - 348 341 name: newneigh ··· 381 372 name: delneigh-ntf 382 373 doc: Notify a neighbour deletion 383 374 value: 29 384 - notify: delneigh 375 + notify: getneigh 385 376 fixed-header: ndmsg 386 377 - 387 378 name: getneigh ··· 402 393 - ifindex 403 394 - master 404 395 reply: 396 + value: 28 405 397 attributes: *neighbour-all 406 398 - 407 399 name: newneigh-ntf
+6 -2
Documentation/netlink/specs/rt-rule.yaml
··· 2 2 3 3 name: rt-rule 4 4 protocol: netlink-raw 5 + uapi-header: linux/fib_rules.h 5 6 protonum: 0 6 7 7 8 doc: ··· 57 56 - 58 57 name: fr-act 59 58 type: enum 59 + enum-name: 60 60 entries: 61 61 - unspec 62 62 - to-tbl ··· 92 90 attribute-sets: 93 91 - 94 92 name: fib-rule-attrs 93 + name-prefix: fra- 95 94 attributes: 96 95 - 97 96 name: dst ··· 201 198 operations: 202 199 enum-model: directional 203 200 fixed-header: fib-rule-hdr 201 + name-prefix: rtm- 204 202 list: 205 203 - 206 204 name: newrule ··· 238 234 name: newrule-ntf 239 235 doc: Notify a rule creation 240 236 value: 32 241 - notify: newrule 237 + notify: getrule 242 238 - 243 239 name: delrule 244 240 doc: Remove an existing FIB rule ··· 251 247 name: delrule-ntf 252 248 doc: Notify a rule deletion 253 249 value: 33 254 - notify: delrule 250 + notify: getrule 255 251 - 256 252 name: getrule 257 253 doc: Dump all FIB rules
+1 -1
tools/net/ynl/pyynl/ynl_gen_c.py
··· 2909 2909 cw.p(f'#include "{hdr_file}"') 2910 2910 cw.p('#include "ynl.h"') 2911 2911 headers = [] 2912 - for definition in parsed['definitions']: 2912 + for definition in parsed['definitions'] + parsed['attribute-sets']: 2913 2913 if 'header' in definition: 2914 2914 headers.append(definition['header']) 2915 2915 if args.mode == 'user':