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.
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -3849,6 +3849,15 @@ struct bpf_devmap_val { · 3848 unmodified lines | |||
| 3849 | } bpf_prog; | 3849 | } bpf_prog; |
| 3850 | }; | 3850 | }; |
| 3851 | 3851 | ||
| 3852 | /* CPUMAP map-value layout | ||
| 3853 | * | ||
| 3854 | * The struct data-layout of map-value is a configuration interface. | ||
| 3855 | * New members can only be added to the end of this structure. | ||
| 3856 | */ | ||
| 3857 | struct bpf_cpumap_val { | ||
| 3858 | __u32 qsize; /* queue size to remote target CPU */ | ||
| 3859 | }; | ||
| 3860 | |||
| 3852 | enum sk_action { | 3861 | enum sk_action { |
| 3853 | SK_DROP = 0, | 3862 | SK_DROP = 0, |
| 3854 | SK_PASS, | 3863 | SK_PASS, |