bpf: add bpf_skb_copy_bytes() helper

Since ingress and egress programs see different skb->data,
add bpf_skb_copy_bytes() helper which is skb->mac_header relative
as a substitute for LD_ABS/LD_IND instructions which are skb->data relative

Fix all other helpers to be skb->mac_header relative

Ensure that mac_header is set before calling into programs

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
6 files changed