~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /* Copyright (c) 2020 Facebook */
  3 #ifndef _BPF_TESTMOD_H
  4 #define _BPF_TESTMOD_H
  5 
  6 #include <linux/types.h>
  7 
  8 struct task_struct;
  9 
 10 struct bpf_testmod_test_read_ctx {
 11         char *buf;
 12         loff_t off;
 13         size_t len;
 14 };
 15 
 16 struct bpf_testmod_test_write_ctx {
 17         char *buf;
 18         loff_t off;
 19         size_t len;
 20 };
 21 
 22 struct bpf_testmod_test_writable_ctx {
 23         bool early_ret;
 24         int val;
 25 };
 26 
 27 /* BPF iter that returns *value* *n* times in a row */
 28 struct bpf_iter_testmod_seq {
 29         s64 value;
 30         int cnt;
 31 };
 32 
 33 struct bpf_testmod_ops {
 34         int (*test_1)(void);
 35         void (*test_2)(int a, int b);
 36         /* Used to test nullable arguments. */
 37         int (*test_maybe_null)(int dummy, struct task_struct *task);
 38 
 39         /* The following fields are used to test shadow copies. */
 40         char onebyte;
 41         struct {
 42                 int a;
 43                 int b;
 44         } unsupported;
 45         int data;
 46 
 47         /* The following pointers are used to test the maps having multiple
 48          * pages of trampolines.
 49          */
 50         int (*tramp_1)(int value);
 51         int (*tramp_2)(int value);
 52         int (*tramp_3)(int value);
 53         int (*tramp_4)(int value);
 54         int (*tramp_5)(int value);
 55         int (*tramp_6)(int value);
 56         int (*tramp_7)(int value);
 57         int (*tramp_8)(int value);
 58         int (*tramp_9)(int value);
 59         int (*tramp_10)(int value);
 60         int (*tramp_11)(int value);
 61         int (*tramp_12)(int value);
 62         int (*tramp_13)(int value);
 63         int (*tramp_14)(int value);
 64         int (*tramp_15)(int value);
 65         int (*tramp_16)(int value);
 66         int (*tramp_17)(int value);
 67         int (*tramp_18)(int value);
 68         int (*tramp_19)(int value);
 69         int (*tramp_20)(int value);
 70         int (*tramp_21)(int value);
 71         int (*tramp_22)(int value);
 72         int (*tramp_23)(int value);
 73         int (*tramp_24)(int value);
 74         int (*tramp_25)(int value);
 75         int (*tramp_26)(int value);
 76         int (*tramp_27)(int value);
 77         int (*tramp_28)(int value);
 78         int (*tramp_29)(int value);
 79         int (*tramp_30)(int value);
 80         int (*tramp_31)(int value);
 81         int (*tramp_32)(int value);
 82         int (*tramp_33)(int value);
 83         int (*tramp_34)(int value);
 84         int (*tramp_35)(int value);
 85         int (*tramp_36)(int value);
 86         int (*tramp_37)(int value);
 87         int (*tramp_38)(int value);
 88         int (*tramp_39)(int value);
 89         int (*tramp_40)(int value);
 90 };
 91 
 92 struct bpf_testmod_ops2 {
 93         int (*test_1)(void);
 94 };
 95 
 96 #endif /* _BPF_TESTMOD_H */
 97 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php