bpf: Allow to use kfunc XDP hints and frags together
authorLarysa Zaremba <larysa.zaremba@intel.com>
Fri, 15 Sep 2023 08:39:10 +0000 (10:39 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Fri, 15 Sep 2023 18:39:46 +0000 (11:39 -0700)
commit9b2b86332a9b9932d9022a0c004251d5d6437020
tree54113d830200222a657401d92edd10340df7d3cd
parent45ee73a0722b9e1d0b7a524d06756291b13b5912
bpf: Allow to use kfunc XDP hints and frags together

There is no fundamental reason, why multi-buffer XDP and XDP kfunc RX hints
cannot coexist in a single program.

Allow those features to be used together by modifying the flags condition
for dev-bound-only programs, segments are still prohibited for fully
offloaded programs, hence additional check.

Suggested-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/CAKH8qBuzgtJj=OKMdsxEkyML36VsAuZpcrsXcyqjdKXSJCBq=Q@mail.gmail.com/
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/20230915083914.65538-1-larysa.zaremba@intel.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
kernel/bpf/offload.c