]> git.baikalelectronics.ru Git - kernel.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)
commit5881b94b61fcc6384dfbbb5899ca73469ff915e9
treee4d0b2ed3dc2e6900106edff81e834f063007e1c
parentac692962ddae4a9bb64105ec9e1543c507ebed7a
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