summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/call-graph-from-sql.py
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2018-10-09 13:04:43 +0300
committerAlexei Starovoitov <ast@kernel.org>2018-10-10 07:59:09 +0300
commit2972495699320229b55b8e5065a310be5c81485b (patch)
tree817a6d59427a927677f69f6efe97d5f98e6f1267 /tools/perf/scripts/python/call-graph-from-sql.py
parente0aa5cf5919ee272732fce9576222e58e48622ab (diff)
downloadlinux-2972495699320229b55b8e5065a310be5c81485b.tar.xz
net: fix generic XDP to handle if eth header was mangled
XDP can modify (and resize) the Ethernet header in the packet. There is a bug in generic-XDP, because skb->protocol and skb->pkt_type are setup before reaching (netif_receive_)generic_xdp. This bug was hit when XDP were popping VLAN headers (changing eth->h_proto), as skb->protocol still contains VLAN-indication (ETH_P_8021Q) causing invocation of skb_vlan_untag(skb), which corrupt the packet (basically popping the VLAN again). This patch catch if XDP changed eth header in such a way, that SKB fields needs to be updated. V2: on request from Song Liu, use ETH_HLEN instead of mac_len, in __skb_push() as eth_type_trans() use ETH_HLEN in paired skb_pull_inline(). Fixes: d445516966dc ("net: xdp: support xdp generic on virtual devices") Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions