]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Extend the sk_lookup() helper to XDP hookpoint.
authorNitin Hande <nitin.hande@gmail.com>
Mon, 29 Oct 2018 04:02:45 +0000 (21:02 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 9 Nov 2018 09:14:54 +0000 (10:14 +0100)
commit46eb66874b0b8eee59085918937fb3a6e5ac11e0
treebcaf2c624e5c4cf7f51fb33dd1c4bf115cc6c3fb
parent47eb0029a48022fcb764ab8fbff66c6f9ac7d9c8
bpf: Extend the sk_lookup() helper to XDP hookpoint.

This patch proposes to extend the sk_lookup() BPF API to the
XDP hookpoint. The sk_lookup() helper supports a lookup
on incoming packet to find the corresponding socket that will
receive this packet. Current support for this BPF API is
at the tc hookpoint. This patch will extend this API at XDP
hookpoint. A XDP program can map the incoming packet to the
5-tuple parameter and invoke the API to find the corresponding
socket structure.

Signed-off-by: Nitin Hande <Nitin.Hande@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/uapi/linux/bpf.h
net/core/filter.c