net: Add utility function to copy skb hash

Adds skb_copy_hash to copy rxhash and l4_rxhash from one skb to another.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tom Herbert
2013-12-15 22:16:29 -08:00
committed by David S. Miller
parent 09323cc479
commit 3df7a74e79
2 changed files with 7 additions and 2 deletions

View File

@@ -764,6 +764,12 @@ static inline void skb_clear_hash_if_not_l4(struct sk_buff *skb)
skb_clear_hash(skb);
}
static inline void skb_copy_hash(struct sk_buff *to, const struct sk_buff *from)
{
to->rxhash = from->rxhash;
to->l4_rxhash = from->l4_rxhash;
};
#ifdef NET_SKBUFF_DATA_USES_OFFSET
static inline unsigned char *skb_end_pointer(const struct sk_buff *skb)
{