]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: introduce bpf_clone_redirect() helper
authorAlexei Starovoitov <ast@plumgrid.com>
Tue, 2 Jun 2015 23:03:14 +0000 (16:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jun 2015 03:16:58 +0000 (20:16 -0700)
commit1a55c3fd3f7fc8f8a7c930f97c512f72d64849b9
tree2443f64281b9acf673b4b8fc02bc5e7aeeacae5f
parent03265e329c2320eea96d2c13b6b51ff7335d13fc
bpf: introduce bpf_clone_redirect() helper

Allow eBPF programs attached to classifier/actions to call
bpf_clone_redirect(skb, ifindex, flags) helper which will
mirror or redirect the packet by dynamic ifindex selection
from within the program to a target device either at ingress
or at egress. Can be used for various scenarios, for example,
to load balance skbs into veths, split parts of the traffic
to local taps, etc.

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/bpf.h
net/core/filter.c