diff options
| author | Ingo Molnar <mingo@kernel.org> | 2020-01-20 08:43:44 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2020-01-20 08:43:44 +0100 |
| commit | cb6c82df684e912b10245c13200ef09c9d372fc2 (patch) | |
| tree | 98448cea990ecf17ad39798980ab18165b72b7ac /include/linux/if_ether.h | |
| parent | 5738891229a25e9e678122a843cbf0466a456d0c (diff) | |
| parent | def9d2780727cec3313ed3522d0123158d87224d (diff) | |
Merge tag 'v5.5-rc7' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/if_ether.h')
| -rw-r--r-- | include/linux/if_ether.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 76cf11e905e1..8a9792a6427a 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h @@ -24,6 +24,14 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) return (struct ethhdr *)skb_mac_header(skb); } +/* Prefer this version in TX path, instead of + * skb_reset_mac_header() + eth_hdr() + */ +static inline struct ethhdr *skb_eth_hdr(const struct sk_buff *skb) +{ + return (struct ethhdr *)skb->data; +} + static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb) { return (struct ethhdr *)skb_inner_mac_header(skb); |
