Browse Source

xlat: add BPF_F_CLONE to bpf_map_flags

* xlat/bpf_map_flags.in (BPF_F_CLONE): New flag, introduced by Linux
commit v5.4-rc1~131^2~62^2~34^2~2.
* tests/bpf.c: Update expected output.
Eugene Syromyatnikov 1 month ago
parent
commit
6192f44304
2 changed files with 8 additions and 7 deletions
  1. 7
    7
      tests/bpf.c
  2. 1
    0
      xlat/bpf_map_flags.in

+ 7
- 7
tests/bpf.c View File

@@ -285,7 +285,7 @@ static struct bpf_attr_check BPF_MAP_CREATE_checks[] = {
285 285
 			.key_size = 0xface1e55,
286 286
 			.value_size = 0xbadc0ded,
287 287
 			.max_entries = 0xbeefcafe,
288
-			.map_flags = 0xfffffe00,
288
+			.map_flags = 0xfffffc00,
289 289
 			.inner_map_fd = 2718281828,
290 290
 			.numa_node = -1,
291 291
 			.map_name = "",
@@ -295,7 +295,7 @@ static struct bpf_attr_check BPF_MAP_CREATE_checks[] = {
295 295
 		.str = "map_type=0x19 /* BPF_MAP_TYPE_??? */"
296 296
 		       ", key_size=4207812181, value_size=3134983661"
297 297
 		       ", max_entries=3203386110"
298
-		       ", map_flags=0xfffffe00 /* BPF_F_??? */"
298
+		       ", map_flags=0xfffffc00 /* BPF_F_??? */"
299 299
 		       ", inner_map_fd=-1576685468"
300 300
 		       ", map_name=\"\", map_ifindex=3141592653",
301 301
 
@@ -316,7 +316,7 @@ static struct bpf_attr_check BPF_MAP_CREATE_checks[] = {
316 316
 		       ", max_entries=3203386110"
317 317
 		       ", map_flags=BPF_F_NO_PREALLOC|BPF_F_NUMA_NODE"
318 318
 				   "|BPF_F_RDONLY|BPF_F_STACK_BUILD_ID"
319
-				   "|BPF_F_RDONLY_PROG|0xc0dede00",
319
+				   "|BPF_F_RDONLY_PROG|BPF_F_CLONE|0xc0dedc00",
320 320
 	},
321 321
 	{ /* 4 */
322 322
 		.data = { .BPF_MAP_CREATE_data = {
@@ -334,7 +334,7 @@ static struct bpf_attr_check BPF_MAP_CREATE_checks[] = {
334 334
 		       ", max_entries=3203386110"
335 335
 		       ", map_flags=BPF_F_NO_PREALLOC|BPF_F_NUMA_NODE"
336 336
 				   "|BPF_F_RDONLY|BPF_F_STACK_BUILD_ID"
337
-				   "|BPF_F_RDONLY_PROG|0xc0dede00"
337
+				   "|BPF_F_RDONLY_PROG|BPF_F_CLONE|0xc0dedc00"
338 338
 		       ", inner_map_fd=-1576685468",
339 339
 	},
340 340
 	{ /* 5 */
@@ -353,7 +353,7 @@ static struct bpf_attr_check BPF_MAP_CREATE_checks[] = {
353 353
 		       ", max_entries=3203386110"
354 354
 		       ", map_flags=BPF_F_NO_PREALLOC|BPF_F_NUMA_NODE"
355 355
 				   "|BPF_F_RDONLY|BPF_F_STACK_BUILD_ID"
356
-				   "|BPF_F_RDONLY_PROG|0xc0dede00"
356
+				   "|BPF_F_RDONLY_PROG|BPF_F_CLONE|0xc0dedc00"
357 357
 		       ", inner_map_fd=-1576685468"
358 358
 		       ", numa_node=4294967295 /* NUMA_NO_NODE */",
359 359
 	},
@@ -374,7 +374,7 @@ static struct bpf_attr_check BPF_MAP_CREATE_checks[] = {
374 374
 		       ", max_entries=3203386110"
375 375
 		       ", map_flags=BPF_F_NO_PREALLOC|BPF_F_NUMA_NODE"
376 376
 				   "|BPF_F_RDONLY|BPF_F_STACK_BUILD_ID"
377
-				   "|BPF_F_RDONLY_PROG|0xc0dede00"
377
+				   "|BPF_F_RDONLY_PROG|BPF_F_CLONE|0xc0dedc00"
378 378
 		       ", inner_map_fd=-1576685468"
379 379
 		       ", numa_node=4294967295 /* NUMA_NO_NODE */"
380 380
 		       ", map_name=\"fedcba987654321\"...",
@@ -396,7 +396,7 @@ static struct bpf_attr_check BPF_MAP_CREATE_checks[] = {
396 396
 		       ", max_entries=3203386110"
397 397
 		       ", map_flags=BPF_F_NO_PREALLOC|BPF_F_NUMA_NODE"
398 398
 				   "|BPF_F_RDONLY|BPF_F_STACK_BUILD_ID"
399
-				   "|BPF_F_RDONLY_PROG|0xc0dede00"
399
+				   "|BPF_F_RDONLY_PROG|BPF_F_CLONE|0xc0dedc00"
400 400
 		       ", inner_map_fd=-1576685468"
401 401
 		       ", numa_node=4294967295 /* NUMA_NO_NODE */"
402 402
 		       ", map_name=\"0123456789abcde\""

+ 1
- 0
xlat/bpf_map_flags.in View File

@@ -7,3 +7,4 @@ BPF_F_STACK_BUILD_ID	(1U << 5)
7 7
 BPF_F_ZERO_SEED		(1U << 6)
8 8
 BPF_F_RDONLY_PROG	(1U << 7)
9 9
 BPF_F_WRONLY_PROG	(1U << 8)
10
+BPF_F_CLONE		(1U << 9)

Loading…
Cancel
Save