diff options
author | Gary S. Robertson <gary.robertson@linaro.org> | 2014-03-12 16:35:51 -0500 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2014-03-12 16:35:51 -0500 |
commit | 9ce234e1ee801968b204c3b9caa75ce0a76ed1c2 (patch) | |
tree | 850b06a09068c82c95dcb8419f344749392fe527 /include/linux/skbuff.h | |
parent | de4c0af15b38d383e79555be2d72e7958f1c0756 (diff) | |
parent | 6969595f011b46b49c3f1b9e0bd7da27768c1fd9 (diff) |
Merge tag 'v3.10.33' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-lnglinux-lng-v3.10.33-finallinux-lng-3.10.33-2014.03
This is the 3.10.33 stable release
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index ded45ec6b22b..478120ae34e5 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2488,6 +2488,8 @@ extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, extern struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features); +unsigned int skb_gso_transport_seglen(const struct sk_buff *skb); + static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, int len, void *buffer) { @@ -2911,5 +2913,22 @@ static inline bool skb_head_is_locked(const struct sk_buff *skb) { return !skb->head_frag || skb_cloned(skb); } + +/** + * skb_gso_network_seglen - Return length of individual segments of a gso packet + * + * @skb: GSO skb + * + * skb_gso_network_seglen is used to determine the real size of the + * individual segments, including Layer3 (IP, IPv6) and L4 headers (TCP/UDP). + * + * The MAC/L2 header is not accounted for. + */ +static inline unsigned int skb_gso_network_seglen(const struct sk_buff *skb) +{ + unsigned int hdr_len = skb_transport_header(skb) - + skb_network_header(skb); + return hdr_len + skb_gso_transport_seglen(skb); +} #endif /* __KERNEL__ */ #endif /* _LINUX_SKBUFF_H */ |