summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2018-11-07 12:07:02 -0500
committerDavid S. Miller <davem@davemloft.net>2018-11-08 01:41:19 -0500
commite0a6b8097351255a2dbbb45274a8b9c52850cbb6 (patch)
treed66d5c354fb7f304256699f102d79ac24f67cc92
parentc8accd5a0a6abfc0405a331afa5bfc06ee92623a (diff)
net/vlan: introduce __vlan_hwaccel_copy_tag() helper
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/if_vlan.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index c438fa0a1c6a..941da4bf3929 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -472,6 +472,19 @@ static inline void __vlan_hwaccel_clear_tag(struct sk_buff *skb)
472 skb->vlan_tci = 0; 472 skb->vlan_tci = 0;
473} 473}
474 474
475/**
476 * __vlan_hwaccel_copy_tag - copy hardware accelerated VLAN info from another skb
477 * @dst: skbuff to copy to
478 * @src: skbuff to copy from
479 *
480 * Copies VLAN information from @src to @dst (for branchless code)
481 */
482static inline void __vlan_hwaccel_copy_tag(struct sk_buff *dst, const struct sk_buff *src)
483{
484 dst->vlan_proto = src->vlan_proto;
485 dst->vlan_tci = src->vlan_tci;
486}
487
475/* 488/*
476 * __vlan_hwaccel_push_inside - pushes vlan tag to the payload 489 * __vlan_hwaccel_push_inside - pushes vlan tag to the payload
477 * @skb: skbuff to tag 490 * @skb: skbuff to tag