mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
UPSTREAM: cpumap: Formalize map value as a named struct
As it has been already done for devmap, introduce 'struct bpf_cpumap_val' to formalize the expected values that can be passed in for a CPUMAP. Update cpumap code to use the struct. Change-Id: I747c5bd9ce9032f3bcbe9a87c8d03b3b803e5bc0 Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Link: https://lore.kernel.org/bpf/754f950674665dae6139c061d28c1d982aaf4170.1594734381.git.lorenzo@kernel.org
This commit is contained in:
parent
6312f5960f
commit
4597eb1008
3 changed files with 33 additions and 13 deletions
|
|
@ -3828,6 +3828,15 @@ struct bpf_devmap_val {
|
|||
} bpf_prog;
|
||||
};
|
||||
|
||||
/* CPUMAP map-value layout
|
||||
*
|
||||
* The struct data-layout of map-value is a configuration interface.
|
||||
* New members can only be added to the end of this structure.
|
||||
*/
|
||||
struct bpf_cpumap_val {
|
||||
__u32 qsize; /* queue size to remote target CPU */
|
||||
};
|
||||
|
||||
enum sk_action {
|
||||
SK_DROP = 0,
|
||||
SK_PASS,
|
||||
|
|
|
|||
Loading…
Reference in a new issue