OSDN Git Service

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)
commitc8123ead13a5c92dc5fd15c0fdfe88eef41e6ac1
treebcaf2c624e5c4cf7f51fb33dd1c4bf115cc6c3fb
parentbf598a8f0f771302d4ecb0ef0003c54732221597
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