Andrey Ignatov
57c3bb725a
bpf: Introduce ARG_PTR_TO_{INT,LONG} arg types
...
Currently the way to pass result from BPF helper to BPF program is to
provide memory area defined by pointer and size: func(void *, size_t).
It works great for generic use-case, but for simple types, such as int,
it's overkill and consumes two arguments when it could use just one.
Introduce new argument types ARG_PTR_TO_INT and ARG_PTR_TO_LONG to be
able to pass result from helper to program via pointer to int and long
correspondingly: func(int *) or func(long *).
New argument types are similar to ARG_PTR_TO_MEM with the following
differences:
* they don't require corresponding ARG_CONST_SIZE argument, predefined
access sizes are used instead (32bit for int, 64bit for long);
* it's possible to use more than one such an argument in a helper;
* provided pointers have to be aligned.
It's easy to introduce similar ARG_PTR_TO_CHAR and ARG_PTR_TO_SHORT
argument types. It's not done due to lack of use-case though.
Signed-off-by: Andrey Ignatov <rdna@fb.com >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
2019-04-12 13:54:59 -07:00
..
2019-04-12 13:54:59 -07:00
2019-03-12 14:08:19 -07:00
2018-10-24 20:55:56 -04:00
2018-12-30 08:31:52 +00:00
2019-03-12 10:04:02 -07:00
2019-03-22 22:50:41 +01:00
2019-03-07 18:32:02 -08:00
2019-03-23 12:32:01 +01:00
2019-03-05 15:56:59 +01:00
2019-03-09 14:15:51 +01:00
2019-03-12 10:04:02 -07:00
2019-03-15 14:22:59 -07:00
2019-03-06 07:59:36 -08:00
2019-03-24 11:42:10 -07:00
2019-03-22 13:38:26 +01:00
2019-04-05 09:26:43 -04:00
2019-03-07 18:32:02 -08:00
2018-01-04 16:45:09 -08:00
2019-01-31 14:20:54 +01:00
2019-01-18 17:53:29 -05:00
2019-01-14 18:01:05 -05:00
2019-01-18 17:53:29 -05:00
2019-02-03 17:49:35 -05:00
2019-02-07 21:44:27 -05:00
2019-02-12 20:17:13 -05:00
2019-02-03 17:49:35 -05:00
2018-10-31 08:54:14 -07:00
2019-01-25 11:22:43 -08:00
2019-02-07 00:13:27 +01:00
2019-03-07 18:32:02 -08:00
2017-07-31 13:09:49 +02:00
2019-03-28 13:34:58 +01:00
2019-03-05 21:07:14 -08:00
2019-01-08 13:18:44 -08:00
2018-10-26 16:26:32 -07:00
2018-05-16 07:23:35 +02:00
2017-11-02 11:10:55 +01:00
2018-05-16 07:23:35 +02:00
2019-03-07 10:11:41 -08:00
2018-02-21 16:54:06 +01:00
2018-10-31 08:54:12 -07:00
2019-03-09 15:53:03 -08:00
2018-08-06 12:35:20 +02:00
2019-03-22 13:05:26 +01:00
2017-12-14 16:00:49 -08:00
2019-03-07 18:31:59 -08:00
2018-05-15 23:08:33 -07:00
2018-01-08 19:43:15 +01:00
2019-01-06 09:46:51 +09:00
2019-01-21 17:38:56 -03:00
2017-11-02 11:10:55 +01:00
2019-02-01 20:55:38 +01:00
2018-12-15 17:44:35 +09:00
2019-03-07 18:32:02 -08:00
2018-12-28 12:11:47 -08:00
2018-12-06 14:38:50 +00:00
2017-11-02 11:10:55 +01:00
2018-07-16 12:31:57 -07:00
2017-09-08 18:26:51 -07:00
2019-02-13 08:16:40 +01:00
2017-07-12 16:25:59 -07:00
2019-03-06 10:31:36 -08:00
2019-03-07 18:32:02 -08:00
2018-12-28 12:11:52 -08:00
2018-11-07 14:41:41 +01:00
2018-07-02 11:36:17 +02:00
2019-03-07 18:32:00 -08:00
2018-11-16 14:11:04 +08:00
2019-03-07 18:31:59 -08:00
2018-04-11 10:28:37 -07:00
2018-09-16 16:08:25 +02:00
2018-12-28 12:42:30 -08:00
2018-10-31 08:54:16 -07:00
2019-03-29 10:01:37 -07:00
2017-11-02 11:10:55 +01:00
2018-09-11 16:13:24 +01:00
2019-03-12 13:27:20 -07:00
2019-03-16 13:05:32 -07:00
2019-01-03 18:57:57 -08:00
2019-04-05 09:26:43 -04:00
2019-04-01 23:03:18 +02:00
2019-01-30 19:27:00 +01:00
2018-07-03 09:20:44 +02:00
2017-11-02 11:10:55 +01:00
2019-02-10 21:51:39 +01:00
2018-12-05 19:31:44 -08:00
2018-08-13 11:25:07 -07:00
2019-03-16 13:47:14 -07:00
2019-03-07 19:25:37 -08:00
2019-01-04 13:13:47 -08:00
2019-04-05 16:02:31 -10:00
2017-12-17 13:57:15 +01:00
2019-03-22 10:38:23 -04:00
2018-06-21 12:33:05 +02:00
2019-02-09 08:47:52 -08:00
2018-11-27 09:21:41 -08:00
2018-04-05 21:36:27 -07:00
2018-04-02 20:15:59 +02:00
2018-04-02 20:15:30 +02:00
2019-01-11 18:05:40 -08:00
2018-10-09 16:51:11 +02:00
2018-11-07 23:51:16 -06:00
2018-08-22 10:52:47 -07:00
2018-08-11 02:05:53 -05:00
2018-04-11 10:28:35 -07:00
2018-08-30 12:56:40 +02:00
2019-03-28 13:32:01 +01:00
2019-02-01 15:46:23 -08:00
2019-03-21 12:00:18 +01:00