mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
vxlan: introduce vxlan_hdr
Currently, pointer to the vxlan header is kept in a local variable. It has to be reloaded whenever the pskb pull operations are performed which usually happens somewhere deep in called functions. Create a vxlan_hdr function and use it to reference the vxlan header instead. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d8ef034730
commit
d4ac05ff36
2 changed files with 12 additions and 10 deletions
|
|
@ -262,6 +262,11 @@ static inline netdev_features_t vxlan_features_check(struct sk_buff *skb,
|
|||
/* IPv6 header + UDP + VXLAN + Ethernet header */
|
||||
#define VXLAN6_HEADROOM (40 + 8 + 8 + 14)
|
||||
|
||||
static inline struct vxlanhdr *vxlan_hdr(struct sk_buff *skb)
|
||||
{
|
||||
return (struct vxlanhdr *)(udp_hdr(skb) + 1);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_VXLAN)
|
||||
void vxlan_get_rx_port(struct net_device *netdev);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue