diff options
| author | Shmulik Ladkani <shmulik.ladkani@gmail.com> | 2016-09-19 12:11:09 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-09-22 01:34:20 -0400 |
| commit | bfca4c520f7ea78138ddccea2de18dc062b0fefd (patch) | |
| tree | 4cc5c63ae28bf81bd39d619be5e5449f03574ccf | |
| parent | 688dc5369a6311c4d60f8908698c1999910d659f (diff) | |
net: skbuff: Export __skb_vlan_pop
This exports the functionality of extracting the tag from the payload,
without moving next vlan tag into hw accel tag.
Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | include/linux/skbuff.h | 1 | ||||
| -rw-r--r-- | net/core/skbuff.c | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c6dab3f7457c..9bf60b556bd2 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -3085,6 +3085,7 @@ bool skb_gso_validate_mtu(const struct sk_buff *skb, unsigned int mtu); | |||
| 3085 | struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features); | 3085 | struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features); |
| 3086 | struct sk_buff *skb_vlan_untag(struct sk_buff *skb); | 3086 | struct sk_buff *skb_vlan_untag(struct sk_buff *skb); |
| 3087 | int skb_ensure_writable(struct sk_buff *skb, int write_len); | 3087 | int skb_ensure_writable(struct sk_buff *skb, int write_len); |
| 3088 | int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci); | ||
| 3088 | int skb_vlan_pop(struct sk_buff *skb); | 3089 | int skb_vlan_pop(struct sk_buff *skb); |
| 3089 | int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci); | 3090 | int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci); |
| 3090 | struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy, | 3091 | struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy, |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 7bf82a28e10a..6c22351bd519 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
| @@ -4522,8 +4522,10 @@ int skb_ensure_writable(struct sk_buff *skb, int write_len) | |||
| 4522 | } | 4522 | } |
| 4523 | EXPORT_SYMBOL(skb_ensure_writable); | 4523 | EXPORT_SYMBOL(skb_ensure_writable); |
| 4524 | 4524 | ||
| 4525 | /* remove VLAN header from packet and update csum accordingly. */ | 4525 | /* remove VLAN header from packet and update csum accordingly. |
| 4526 | static int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci) | 4526 | * expects a non skb_vlan_tag_present skb with a vlan tag payload |
| 4527 | */ | ||
| 4528 | int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci) | ||
| 4527 | { | 4529 | { |
| 4528 | struct vlan_hdr *vhdr; | 4530 | struct vlan_hdr *vhdr; |
| 4529 | unsigned int offset = skb->data - skb_mac_header(skb); | 4531 | unsigned int offset = skb->data - skb_mac_header(skb); |
| @@ -4554,6 +4556,7 @@ pull: | |||
| 4554 | 4556 | ||
| 4555 | return err; | 4557 | return err; |
| 4556 | } | 4558 | } |
| 4559 | EXPORT_SYMBOL(__skb_vlan_pop); | ||
| 4557 | 4560 | ||
| 4558 | int skb_vlan_pop(struct sk_buff *skb) | 4561 | int skb_vlan_pop(struct sk_buff *skb) |
| 4559 | { | 4562 | { |
