]> git.karo-electronics.de Git - karo-tx-linux.git/commit
s390/bpf: recache skb->data/hlen for skb_vlan_push/pop
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Wed, 29 Jul 2015 19:15:18 +0000 (21:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jul 2015 21:59:58 +0000 (14:59 -0700)
commit9db7f2b818809ef2c40fbd64cfcf5ccb0107d7e8
treee4d0b2ed3dc2e6900106edff81e834f063007e1c
parentcde66c2d88da1d73d755109c80ce4c34b917596b
s390/bpf: recache skb->data/hlen for skb_vlan_push/pop

Allow eBPF programs attached to TC qdiscs call skb_vlan_push/pop
via helper functions. These functions may change skb->data/hlen.
This data is cached by s390 JIT to improve performance of ld_abs/ld_ind
instructions. Therefore after a change we have to reload the data.

In case of usage of skb_vlan_push/pop, in the prologue we store
the SKB pointer on the stack and restore it after BPF_JMP_CALL
to skb_vlan_push/pop.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/s390/net/bpf_jit.h
arch/s390/net/bpf_jit_comp.c