summaryrefslogtreecommitdiffstats
path: root/lib/rhashtable.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2015-03-19 19:38:27 +0100
committerDavid S. Miller <davem@davemloft.net>2015-03-20 20:24:26 +0100
commit0b8c707ddf37171413fe67350263e5b6ffeedf7c (patch)
treee2f6a1849cc78ec2cc41846718ad3076e84de0cd /lib/rhashtable.c
parentipv6: invert join/leave anycast rtnl/socket locking order (diff)
downloadlinux-0b8c707ddf37171413fe67350263e5b6ffeedf7c.tar.xz
linux-0b8c707ddf37171413fe67350263e5b6ffeedf7c.zip
ebpf, filter: do not convert skb->protocol to host endianess during runtime
Commit c24973957975 ("bpf: allow BPF programs access 'protocol' and 'vlan_tci' fields") has added support for accessing protocol, vlan_present and vlan_tci into the skb offset map. As referenced in the below discussion, accessing skb->protocol from an eBPF program should be converted without handling endianess. The reason for this is that an eBPF program could simply do a check more naturally, by f.e. testing skb->protocol == htons(ETH_P_IP), where the LLVM compiler resolves htons() against a constant automatically during compilation time, as opposed to an otherwise needed run time conversion. After all, the way of programming both from a user perspective differs quite a lot, i.e. bpf_asm ["ld proto"] versus a C subset/LLVM. Reference: https://patchwork.ozlabs.org/patch/450819/ Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions