Skip to content

Commit 1a1eba0

Browse files
committed
netlink: specs: rt_route: pull the ifa- prefix out of the names
YAML specs don't normally include the C prefix name in the name of the YAML attr. Remove the ifa- prefix from all attributes in route-attrs and metrics and specify name-prefix instead. This is a bit risky, hopefully there aren't many users out there. Fixes: 023289b ("doc/netlink: Add spec for rt route messages") Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250403013706.2828322-5-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 0c8e302 commit 1a1eba0

File tree

1 file changed

+91
-89
lines changed

1 file changed

+91
-89
lines changed

Documentation/netlink/specs/rt_route.yaml

Lines changed: 91 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -80,165 +80,167 @@ definitions:
8080
attribute-sets:
8181
-
8282
name: route-attrs
83+
name-prefix: rta-
8384
attributes:
8485
-
85-
name: rta-dst
86+
name: dst
8687
type: binary
8788
display-hint: ipv4
8889
-
89-
name: rta-src
90+
name: src
9091
type: binary
9192
display-hint: ipv4
9293
-
93-
name: rta-iif
94+
name: iif
9495
type: u32
9596
-
96-
name: rta-oif
97+
name: oif
9798
type: u32
9899
-
99-
name: rta-gateway
100+
name: gateway
100101
type: binary
101102
display-hint: ipv4
102103
-
103-
name: rta-priority
104+
name: priority
104105
type: u32
105106
-
106-
name: rta-prefsrc
107+
name: prefsrc
107108
type: binary
108109
display-hint: ipv4
109110
-
110-
name: rta-metrics
111+
name: metrics
111112
type: nest
112-
nested-attributes: rta-metrics
113+
nested-attributes: metrics
113114
-
114-
name: rta-multipath
115+
name: multipath
115116
type: binary
116117
-
117-
name: rta-protoinfo # not used
118+
name: protoinfo # not used
118119
type: binary
119120
-
120-
name: rta-flow
121+
name: flow
121122
type: u32
122123
-
123-
name: rta-cacheinfo
124+
name: cacheinfo
124125
type: binary
125126
struct: rta-cacheinfo
126127
-
127-
name: rta-session # not used
128+
name: session # not used
128129
type: binary
129130
-
130-
name: rta-mp-algo # not used
131+
name: mp-algo # not used
131132
type: binary
132133
-
133-
name: rta-table
134+
name: table
134135
type: u32
135136
-
136-
name: rta-mark
137+
name: mark
137138
type: u32
138139
-
139-
name: rta-mfc-stats
140+
name: mfc-stats
140141
type: binary
141142
-
142-
name: rta-via
143+
name: via
143144
type: binary
144145
-
145-
name: rta-newdst
146+
name: newdst
146147
type: binary
147148
-
148-
name: rta-pref
149+
name: pref
149150
type: u8
150151
-
151-
name: rta-encap-type
152+
name: encap-type
152153
type: u16
153154
-
154-
name: rta-encap
155+
name: encap
155156
type: binary # tunnel specific nest
156157
-
157-
name: rta-expires
158+
name: expires
158159
type: u32
159160
-
160-
name: rta-pad
161+
name: pad
161162
type: binary
162163
-
163-
name: rta-uid
164+
name: uid
164165
type: u32
165166
-
166-
name: rta-ttl-propagate
167+
name: ttl-propagate
167168
type: u8
168169
-
169-
name: rta-ip-proto
170+
name: ip-proto
170171
type: u8
171172
-
172-
name: rta-sport
173+
name: sport
173174
type: u16
174175
-
175-
name: rta-dport
176+
name: dport
176177
type: u16
177178
-
178-
name: rta-nh-id
179+
name: nh-id
179180
type: u32
180181
-
181-
name: rta-flowlabel
182+
name: flowlabel
182183
type: u32
183184
byte-order: big-endian
184185
display-hint: hex
185186
-
186-
name: rta-metrics
187+
name: metrics
188+
name-prefix: rtax-
187189
attributes:
188190
-
189-
name: rtax-unspec
191+
name: unspec
190192
type: unused
191193
value: 0
192194
-
193-
name: rtax-lock
195+
name: lock
194196
type: u32
195197
-
196-
name: rtax-mtu
198+
name: mtu
197199
type: u32
198200
-
199-
name: rtax-window
201+
name: window
200202
type: u32
201203
-
202-
name: rtax-rtt
204+
name: rtt
203205
type: u32
204206
-
205-
name: rtax-rttvar
207+
name: rttvar
206208
type: u32
207209
-
208-
name: rtax-ssthresh
210+
name: ssthresh
209211
type: u32
210212
-
211-
name: rtax-cwnd
213+
name: cwnd
212214
type: u32
213215
-
214-
name: rtax-advmss
216+
name: advmss
215217
type: u32
216218
-
217-
name: rtax-reordering
219+
name: reordering
218220
type: u32
219221
-
220-
name: rtax-hoplimit
222+
name: hoplimit
221223
type: u32
222224
-
223-
name: rtax-initcwnd
225+
name: initcwnd
224226
type: u32
225227
-
226-
name: rtax-features
228+
name: features
227229
type: u32
228230
-
229-
name: rtax-rto-min
231+
name: rto-min
230232
type: u32
231233
-
232-
name: rtax-initrwnd
234+
name: initrwnd
233235
type: u32
234236
-
235-
name: rtax-quickack
237+
name: quickack
236238
type: u32
237239
-
238-
name: rtax-cc-algo
240+
name: cc-algo
239241
type: string
240242
-
241-
name: rtax-fastopen-no-cookie
243+
name: fastopen-no-cookie
242244
type: u32
243245

244246
operations:
@@ -254,18 +256,18 @@ operations:
254256
value: 26
255257
attributes:
256258
- rtm-family
257-
- rta-src
259+
- src
258260
- rtm-src-len
259-
- rta-dst
261+
- dst
260262
- rtm-dst-len
261-
- rta-iif
262-
- rta-oif
263-
- rta-ip-proto
264-
- rta-sport
265-
- rta-dport
266-
- rta-mark
267-
- rta-uid
268-
- rta-flowlabel
263+
- iif
264+
- oif
265+
- ip-proto
266+
- sport
267+
- dport
268+
- mark
269+
- uid
270+
- flowlabel
269271
reply:
270272
value: 24
271273
attributes: &all-route-attrs
@@ -278,34 +280,34 @@ operations:
278280
- rtm-scope
279281
- rtm-type
280282
- rtm-flags
281-
- rta-dst
282-
- rta-src
283-
- rta-iif
284-
- rta-oif
285-
- rta-gateway
286-
- rta-priority
287-
- rta-prefsrc
288-
- rta-metrics
289-
- rta-multipath
290-
- rta-flow
291-
- rta-cacheinfo
292-
- rta-table
293-
- rta-mark
294-
- rta-mfc-stats
295-
- rta-via
296-
- rta-newdst
297-
- rta-pref
298-
- rta-encap-type
299-
- rta-encap
300-
- rta-expires
301-
- rta-pad
302-
- rta-uid
303-
- rta-ttl-propagate
304-
- rta-ip-proto
305-
- rta-sport
306-
- rta-dport
307-
- rta-nh-id
308-
- rta-flowlabel
283+
- dst
284+
- src
285+
- iif
286+
- oif
287+
- gateway
288+
- priority
289+
- prefsrc
290+
- metrics
291+
- multipath
292+
- flow
293+
- cacheinfo
294+
- table
295+
- mark
296+
- mfc-stats
297+
- via
298+
- newdst
299+
- pref
300+
- encap-type
301+
- encap
302+
- expires
303+
- pad
304+
- uid
305+
- ttl-propagate
306+
- ip-proto
307+
- sport
308+
- dport
309+
- nh-id
310+
- flowlabel
309311
dump:
310312
request:
311313
value: 26

0 commit comments

Comments
 (0)