aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 299ec4b31412..7ea44f6621f2 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -246,6 +246,7 @@ typedef unsigned char *sk_buff_data_t;
246 * @dma_cookie: a cookie to one of several possible DMA operations 246 * @dma_cookie: a cookie to one of several possible DMA operations
247 * done by skb DMA functions 247 * done by skb DMA functions
248 * @secmark: security marking 248 * @secmark: security marking
249 * @vlan_tci: vlan tag control information
249 */ 250 */
250 251
251struct sk_buff { 252struct sk_buff {
@@ -305,9 +306,7 @@ struct sk_buff {
305#endif 306#endif
306 307
307 int iif; 308 int iif;
308#ifdef CONFIG_NETDEVICES_MULTIQUEUE
309 __u16 queue_mapping; 309 __u16 queue_mapping;
310#endif
311#ifdef CONFIG_NET_SCHED 310#ifdef CONFIG_NET_SCHED
312 __u16 tc_index; /* traffic control index */ 311 __u16 tc_index; /* traffic control index */
313#ifdef CONFIG_NET_CLS_ACT 312#ifdef CONFIG_NET_CLS_ACT
@@ -328,6 +327,8 @@ struct sk_buff {
328 327
329 __u32 mark; 328 __u32 mark;
330 329
330 __u16 vlan_tci;
331
331 sk_buff_data_t transport_header; 332 sk_buff_data_t transport_header;
332 sk_buff_data_t network_header; 333 sk_buff_data_t network_header;
333 sk_buff_data_t mac_header; 334 sk_buff_data_t mac_header;
@@ -1671,25 +1672,17 @@ static inline void skb_init_secmark(struct sk_buff *skb)
1671 1672
1672static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) 1673static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping)
1673{ 1674{
1674#ifdef CONFIG_NETDEVICES_MULTIQUEUE
1675 skb->queue_mapping = queue_mapping; 1675 skb->queue_mapping = queue_mapping;
1676#endif
1677} 1676}
1678 1677
1679static inline u16 skb_get_queue_mapping(struct sk_buff *skb) 1678static inline u16 skb_get_queue_mapping(struct sk_buff *skb)
1680{ 1679{
1681#ifdef CONFIG_NETDEVICES_MULTIQUEUE
1682 return skb->queue_mapping; 1680 return skb->queue_mapping;
1683#else
1684 return 0;
1685#endif
1686} 1681}
1687 1682
1688static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_buff *from) 1683static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_buff *from)
1689{ 1684{
1690#ifdef CONFIG_NETDEVICES_MULTIQUEUE
1691 to->queue_mapping = from->queue_mapping; 1685 to->queue_mapping = from->queue_mapping;
1692#endif
1693} 1686}
1694 1687
1695static inline int skb_is_gso(const struct sk_buff *skb) 1688static inline int skb_is_gso(const struct sk_buff *skb)
@@ -1702,6 +1695,20 @@ static inline int skb_is_gso_v6(const struct sk_buff *skb)
1702 return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6; 1695 return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6;
1703} 1696}
1704 1697
1698extern void __skb_warn_lro_forwarding(const struct sk_buff *skb);
1699
1700static inline bool skb_warn_if_lro(const struct sk_buff *skb)
1701{
1702 /* LRO sets gso_size but not gso_type, whereas if GSO is really
1703 * wanted then gso_type will be set. */
1704 struct skb_shared_info *shinfo = skb_shinfo(skb);
1705 if (shinfo->gso_size != 0 && unlikely(shinfo->gso_type == 0)) {
1706 __skb_warn_lro_forwarding(skb);
1707 return true;
1708 }
1709 return false;
1710}
1711
1705static inline void skb_forward_csum(struct sk_buff *skb) 1712static inline void skb_forward_csum(struct sk_buff *skb)
1706{ 1713{
1707 /* Unfortunately we don't support this one. Any brave souls? */ 1714 /* Unfortunately we don't support this one. Any brave souls? */