Skip to content

Commit f8f238d

Browse files
author
Stanislav Fomichev
committed
sync to upstream 21deb2d96692
Signed-off-by: Stanislav Fomichev <stfomichev@gmail.com>
1 parent ebe8767 commit f8f238d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+22281
-990
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.a
22
*.o
3+
*.d
34
lib/__pycache__/

Documentation/netlink/genetlink-c.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ properties:
148148
attr-max-name:
149149
description: The explicit name for last member of attribute enum.
150150
type: string
151+
header:
152+
description: For C-compatible languages, header which already defines this attribute set.
153+
type: string
151154
# End genetlink-c
152155
attributes:
153156
description: List of attributes in the space.
@@ -161,7 +164,7 @@ properties:
161164
type: string
162165
type: &attr-type
163166
enum: [ unused, pad, flag, binary,
164-
uint, sint, u8, u16, u32, u64, s32, s64,
167+
uint, sint, u8, u16, u32, u64, s8, s16, s32, s64,
165168
string, nest, indexed-array, nest-type-value ]
166169
doc:
167170
description: Documentation of the attribute.

Documentation/netlink/genetlink-legacy.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ $schema: https://json-schema.org/draft-07/schema
66

77
# Common defines
88
$defs:
9+
name:
10+
type: string
11+
pattern: ^[0-9a-z-]+$
912
uint:
1013
type: integer
1114
minimum: 0
@@ -76,7 +79,7 @@ properties:
7679
additionalProperties: False
7780
properties:
7881
name:
79-
type: string
82+
$ref: '#/$defs/name'
8083
header:
8184
description: For C-compatible languages, header which already defines this value.
8285
type: string
@@ -103,7 +106,7 @@ properties:
103106
additionalProperties: False
104107
properties:
105108
name:
106-
type: string
109+
$ref: '#/$defs/name'
107110
value:
108111
type: integer
109112
doc:
@@ -132,7 +135,7 @@ properties:
132135
additionalProperties: False
133136
properties:
134137
name:
135-
type: string
138+
$ref: '#/$defs/name'
136139
type:
137140
description: The netlink attribute type
138141
enum: [ u8, u16, u32, u64, s8, s16, s32, s64, string, binary ]
@@ -152,6 +155,9 @@ properties:
152155
the right formatting mechanism when displaying values of this
153156
type.
154157
enum: [ hex, mac, fddi, ipv4, ipv6, uuid ]
158+
struct:
159+
description: Name of the nested struct type.
160+
type: string
155161
# End genetlink-legacy
156162

157163
attribute-sets:
@@ -166,7 +172,7 @@ properties:
166172
name:
167173
description: |
168174
Name used when referring to this space in other definitions, not used outside of the spec.
169-
type: string
175+
$ref: '#/$defs/name'
170176
name-prefix:
171177
description: |
172178
Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
@@ -190,6 +196,9 @@ properties:
190196
attr-max-name:
191197
description: The explicit name for last member of attribute enum.
192198
type: string
199+
header:
200+
description: For C-compatible languages, header which already defines this attribute set.
201+
type: string
193202
# End genetlink-c
194203
attributes:
195204
description: List of attributes in the space.
@@ -200,11 +209,11 @@ properties:
200209
additionalProperties: False
201210
properties:
202211
name:
203-
type: string
212+
$ref: '#/$defs/name'
204213
type: &attr-type
205214
description: The netlink attribute type
206215
enum: [ unused, pad, flag, binary, bitfield32,
207-
uint, sint, u8, u16, u32, u64, s32, s64,
216+
uint, sint, u8, u16, u32, u64, s8, s16, s32, s64,
208217
string, nest, indexed-array, nest-type-value ]
209218
doc:
210219
description: Documentation of the attribute.
@@ -342,7 +351,7 @@ properties:
342351
properties:
343352
name:
344353
description: Name of the operation, also defining its C enum value in uAPI.
345-
type: string
354+
$ref: '#/$defs/name'
346355
doc:
347356
description: Documentation for the command.
348357
type: string

Documentation/netlink/genetlink.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ $schema: https://json-schema.org/draft-07/schema
66

77
# Common defines
88
$defs:
9+
name:
10+
type: string
11+
pattern: ^[0-9a-z-]+$
912
uint:
1013
type: integer
1114
minimum: 0
@@ -29,7 +32,7 @@ additionalProperties: False
2932
properties:
3033
name:
3134
description: Name of the genetlink family.
32-
type: string
35+
$ref: '#/$defs/name'
3336
doc:
3437
type: string
3538
protocol:
@@ -48,7 +51,7 @@ properties:
4851
additionalProperties: False
4952
properties:
5053
name:
51-
type: string
54+
$ref: '#/$defs/name'
5255
header:
5356
description: For C-compatible languages, header which already defines this value.
5457
type: string
@@ -75,7 +78,7 @@ properties:
7578
additionalProperties: False
7679
properties:
7780
name:
78-
type: string
81+
$ref: '#/$defs/name'
7982
value:
8083
type: integer
8184
doc:
@@ -96,7 +99,7 @@ properties:
9699
name:
97100
description: |
98101
Name used when referring to this space in other definitions, not used outside of the spec.
99-
type: string
102+
$ref: '#/$defs/name'
100103
name-prefix:
101104
description: |
102105
Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
@@ -121,10 +124,10 @@ properties:
121124
additionalProperties: False
122125
properties:
123126
name:
124-
type: string
127+
$ref: '#/$defs/name'
125128
type: &attr-type
126129
enum: [ unused, pad, flag, binary,
127-
uint, sint, u8, u16, u32, u64, s32, s64,
130+
uint, sint, u8, u16, u32, u64, s8, s16, s32, s64,
128131
string, nest, indexed-array, nest-type-value ]
129132
doc:
130133
description: Documentation of the attribute.
@@ -243,7 +246,7 @@ properties:
243246
properties:
244247
name:
245248
description: Name of the operation, also defining its C enum value in uAPI.
246-
type: string
249+
$ref: '#/$defs/name'
247250
doc:
248251
description: Documentation for the command.
249252
type: string
@@ -327,7 +330,7 @@ properties:
327330
name:
328331
description: |
329332
The name for the group, used to form the define and the value of the define.
330-
type: string
333+
$ref: '#/$defs/name'
331334
flags: *cmd_flags
332335

333336
kernel-family:

Documentation/netlink/netlink-raw.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ $schema: https://json-schema.org/draft-07/schema
66

77
# Common defines
88
$defs:
9+
name:
10+
type: string
11+
pattern: ^[0-9a-z-]+$
12+
name-cap:
13+
type: string
14+
pattern: ^[0-9a-zA-Z-]+$
915
uint:
1016
type: integer
1117
minimum: 0
@@ -71,7 +77,7 @@ properties:
7177
additionalProperties: False
7278
properties:
7379
name:
74-
type: string
80+
$ref: '#/$defs/name'
7581
header:
7682
description: For C-compatible languages, header which already defines this value.
7783
type: string
@@ -98,7 +104,7 @@ properties:
98104
additionalProperties: False
99105
properties:
100106
name:
101-
type: string
107+
$ref: '#/$defs/name'
102108
value:
103109
type: integer
104110
doc:
@@ -124,7 +130,7 @@ properties:
124130
additionalProperties: False
125131
properties:
126132
name:
127-
type: string
133+
$ref: '#/$defs/name-cap'
128134
type:
129135
description: |
130136
The netlink attribute type. Members of type 'binary' or 'pad'
@@ -183,7 +189,7 @@ properties:
183189
name:
184190
description: |
185191
Name used when referring to this space in other definitions, not used outside of the spec.
186-
type: string
192+
$ref: '#/$defs/name'
187193
name-prefix:
188194
description: |
189195
Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
@@ -207,6 +213,9 @@ properties:
207213
attr-max-name:
208214
description: The explicit name for last member of attribute enum.
209215
type: string
216+
header:
217+
description: For C-compatible languages, header which already defines this attribute set.
218+
type: string
210219
# End genetlink-c
211220
attributes:
212221
description: List of attributes in the space.
@@ -217,7 +226,7 @@ properties:
217226
additionalProperties: False
218227
properties:
219228
name:
220-
type: string
229+
$ref: '#/$defs/name'
221230
type: &attr-type
222231
description: The netlink attribute type
223232
enum: [ unused, pad, flag, binary, bitfield32,
@@ -405,7 +414,7 @@ properties:
405414
properties:
406415
name:
407416
description: Name of the operation, also defining its C enum value in uAPI.
408-
type: string
417+
$ref: '#/$defs/name'
409418
doc:
410419
description: Documentation for the command.
411420
type: string

0 commit comments

Comments
 (0)