diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bfin_mac.h | 1 | ||||
-rw-r--r-- | include/linux/etherdevice.h | 15 | ||||
-rw-r--r-- | include/linux/if_bridge.h | 2 | ||||
-rw-r--r-- | include/linux/netdevice.h | 15 | ||||
-rw-r--r-- | include/linux/netfilter/x_tables.h | 10 | ||||
-rw-r--r-- | include/linux/skbuff.h | 15 | ||||
-rw-r--r-- | include/net/ah.h | 2 | ||||
-rw-r--r-- | include/net/arp.h | 1 | ||||
-rw-r--r-- | include/net/netfilter/ipv6/nf_conntrack_ipv6.h | 10 | ||||
-rw-r--r-- | include/net/netfilter/ipv6/nf_defrag_ipv6.h | 10 | ||||
-rw-r--r-- | include/net/phonet/phonet.h | 4 | ||||
-rw-r--r-- | include/net/red.h | 1 | ||||
-rw-r--r-- | include/net/sch_generic.h | 20 |
13 files changed, 71 insertions, 35 deletions
diff --git a/include/linux/bfin_mac.h b/include/linux/bfin_mac.h index 904dec7d03a1..a69554ef8476 100644 --- a/include/linux/bfin_mac.h +++ b/include/linux/bfin_mac.h | |||
@@ -24,6 +24,7 @@ struct bfin_mii_bus_platform_data { | |||
24 | const unsigned short *mac_peripherals; | 24 | const unsigned short *mac_peripherals; |
25 | int phy_mode; | 25 | int phy_mode; |
26 | unsigned int phy_mask; | 26 | unsigned int phy_mask; |
27 | unsigned short vlan1_mask, vlan2_mask; | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | #endif | 30 | #endif |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index f16a01081e15..ab68f785fd19 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -48,8 +48,10 @@ extern int eth_validate_addr(struct net_device *dev); | |||
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count); | 51 | extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs, |
52 | unsigned int rxqs); | ||
52 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) | 53 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) |
54 | #define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count) | ||
53 | 55 | ||
54 | /** | 56 | /** |
55 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. | 57 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. |
@@ -97,6 +99,17 @@ static inline int is_broadcast_ether_addr(const u8 *addr) | |||
97 | } | 99 | } |
98 | 100 | ||
99 | /** | 101 | /** |
102 | * is_unicast_ether_addr - Determine if the Ethernet address is unicast | ||
103 | * @addr: Pointer to a six-byte array containing the Ethernet address | ||
104 | * | ||
105 | * Return true if the address is a unicast address. | ||
106 | */ | ||
107 | static inline int is_unicast_ether_addr(const u8 *addr) | ||
108 | { | ||
109 | return !is_multicast_ether_addr(addr); | ||
110 | } | ||
111 | |||
112 | /** | ||
100 | * is_valid_ether_addr - Determine if the given Ethernet address is valid | 113 | * is_valid_ether_addr - Determine if the given Ethernet address is valid |
101 | * @addr: Pointer to a six-byte array containing the Ethernet address | 114 | * @addr: Pointer to a six-byte array containing the Ethernet address |
102 | * | 115 | * |
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index f7e73c338c40..dd3f20139640 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
@@ -103,7 +103,7 @@ struct __fdb_entry { | |||
103 | 103 | ||
104 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); | 104 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); |
105 | 105 | ||
106 | typedef int (*br_should_route_hook_t)(struct sk_buff *skb); | 106 | typedef int br_should_route_hook_t(struct sk_buff *skb); |
107 | extern br_should_route_hook_t __rcu *br_should_route_hook; | 107 | extern br_should_route_hook_t __rcu *br_should_route_hook; |
108 | 108 | ||
109 | #endif | 109 | #endif |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index de2bfe6da359..d971346b0340 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -520,9 +520,6 @@ struct netdev_queue { | |||
520 | * please use this field instead of dev->trans_start | 520 | * please use this field instead of dev->trans_start |
521 | */ | 521 | */ |
522 | unsigned long trans_start; | 522 | unsigned long trans_start; |
523 | u64 tx_bytes; | ||
524 | u64 tx_packets; | ||
525 | u64 tx_dropped; | ||
526 | } ____cacheline_aligned_in_smp; | 523 | } ____cacheline_aligned_in_smp; |
527 | 524 | ||
528 | static inline int netdev_queue_numa_node_read(const struct netdev_queue *q) | 525 | static inline int netdev_queue_numa_node_read(const struct netdev_queue *q) |
@@ -2191,11 +2188,15 @@ static inline void netif_addr_unlock_bh(struct net_device *dev) | |||
2191 | extern void ether_setup(struct net_device *dev); | 2188 | extern void ether_setup(struct net_device *dev); |
2192 | 2189 | ||
2193 | /* Support for loadable net-drivers */ | 2190 | /* Support for loadable net-drivers */ |
2194 | extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | 2191 | extern struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, |
2195 | void (*setup)(struct net_device *), | 2192 | void (*setup)(struct net_device *), |
2196 | unsigned int queue_count); | 2193 | unsigned int txqs, unsigned int rxqs); |
2197 | #define alloc_netdev(sizeof_priv, name, setup) \ | 2194 | #define alloc_netdev(sizeof_priv, name, setup) \ |
2198 | alloc_netdev_mq(sizeof_priv, name, setup, 1) | 2195 | alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1) |
2196 | |||
2197 | #define alloc_netdev_mq(sizeof_priv, name, setup, count) \ | ||
2198 | alloc_netdev_mqs(sizeof_priv, name, setup, count, count) | ||
2199 | |||
2199 | extern int register_netdev(struct net_device *dev); | 2200 | extern int register_netdev(struct net_device *dev); |
2200 | extern void unregister_netdev(struct net_device *dev); | 2201 | extern void unregister_netdev(struct net_device *dev); |
2201 | 2202 | ||
@@ -2261,8 +2262,6 @@ extern void dev_load(struct net *net, const char *name); | |||
2261 | extern void dev_mcast_init(void); | 2262 | extern void dev_mcast_init(void); |
2262 | extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, | 2263 | extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, |
2263 | struct rtnl_link_stats64 *storage); | 2264 | struct rtnl_link_stats64 *storage); |
2264 | extern void dev_txq_stats_fold(const struct net_device *dev, | ||
2265 | struct rtnl_link_stats64 *stats); | ||
2266 | 2265 | ||
2267 | extern int netdev_max_backlog; | 2266 | extern int netdev_max_backlog; |
2268 | extern int netdev_tstamp_prequeue; | 2267 | extern int netdev_tstamp_prequeue; |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 742bec051440..6712e713b299 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -472,7 +472,7 @@ extern void xt_free_table_info(struct xt_table_info *info); | |||
472 | * necessary for reading the counters. | 472 | * necessary for reading the counters. |
473 | */ | 473 | */ |
474 | struct xt_info_lock { | 474 | struct xt_info_lock { |
475 | spinlock_t lock; | 475 | seqlock_t lock; |
476 | unsigned char readers; | 476 | unsigned char readers; |
477 | }; | 477 | }; |
478 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); | 478 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); |
@@ -497,7 +497,7 @@ static inline void xt_info_rdlock_bh(void) | |||
497 | local_bh_disable(); | 497 | local_bh_disable(); |
498 | lock = &__get_cpu_var(xt_info_locks); | 498 | lock = &__get_cpu_var(xt_info_locks); |
499 | if (likely(!lock->readers++)) | 499 | if (likely(!lock->readers++)) |
500 | spin_lock(&lock->lock); | 500 | write_seqlock(&lock->lock); |
501 | } | 501 | } |
502 | 502 | ||
503 | static inline void xt_info_rdunlock_bh(void) | 503 | static inline void xt_info_rdunlock_bh(void) |
@@ -505,7 +505,7 @@ static inline void xt_info_rdunlock_bh(void) | |||
505 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); | 505 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); |
506 | 506 | ||
507 | if (likely(!--lock->readers)) | 507 | if (likely(!--lock->readers)) |
508 | spin_unlock(&lock->lock); | 508 | write_sequnlock(&lock->lock); |
509 | local_bh_enable(); | 509 | local_bh_enable(); |
510 | } | 510 | } |
511 | 511 | ||
@@ -516,12 +516,12 @@ static inline void xt_info_rdunlock_bh(void) | |||
516 | */ | 516 | */ |
517 | static inline void xt_info_wrlock(unsigned int cpu) | 517 | static inline void xt_info_wrlock(unsigned int cpu) |
518 | { | 518 | { |
519 | spin_lock(&per_cpu(xt_info_locks, cpu).lock); | 519 | write_seqlock(&per_cpu(xt_info_locks, cpu).lock); |
520 | } | 520 | } |
521 | 521 | ||
522 | static inline void xt_info_wrunlock(unsigned int cpu) | 522 | static inline void xt_info_wrunlock(unsigned int cpu) |
523 | { | 523 | { |
524 | spin_unlock(&per_cpu(xt_info_locks, cpu).lock); | 524 | write_sequnlock(&per_cpu(xt_info_locks, cpu).lock); |
525 | } | 525 | } |
526 | 526 | ||
527 | /* | 527 | /* |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 20ec0a64cb9f..bf221d65d9ad 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -255,6 +255,11 @@ typedef unsigned int sk_buff_data_t; | |||
255 | typedef unsigned char *sk_buff_data_t; | 255 | typedef unsigned char *sk_buff_data_t; |
256 | #endif | 256 | #endif |
257 | 257 | ||
258 | #if defined(CONFIG_NF_DEFRAG_IPV4) || defined(CONFIG_NF_DEFRAG_IPV4_MODULE) || \ | ||
259 | defined(CONFIG_NF_DEFRAG_IPV6) || defined(CONFIG_NF_DEFRAG_IPV6_MODULE) | ||
260 | #define NET_SKBUFF_NF_DEFRAG_NEEDED 1 | ||
261 | #endif | ||
262 | |||
258 | /** | 263 | /** |
259 | * struct sk_buff - socket buffer | 264 | * struct sk_buff - socket buffer |
260 | * @next: Next buffer in list | 265 | * @next: Next buffer in list |
@@ -362,6 +367,8 @@ struct sk_buff { | |||
362 | void (*destructor)(struct sk_buff *skb); | 367 | void (*destructor)(struct sk_buff *skb); |
363 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 368 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
364 | struct nf_conntrack *nfct; | 369 | struct nf_conntrack *nfct; |
370 | #endif | ||
371 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
365 | struct sk_buff *nfct_reasm; | 372 | struct sk_buff *nfct_reasm; |
366 | #endif | 373 | #endif |
367 | #ifdef CONFIG_BRIDGE_NETFILTER | 374 | #ifdef CONFIG_BRIDGE_NETFILTER |
@@ -2057,6 +2064,8 @@ static inline void nf_conntrack_get(struct nf_conntrack *nfct) | |||
2057 | if (nfct) | 2064 | if (nfct) |
2058 | atomic_inc(&nfct->use); | 2065 | atomic_inc(&nfct->use); |
2059 | } | 2066 | } |
2067 | #endif | ||
2068 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
2060 | static inline void nf_conntrack_get_reasm(struct sk_buff *skb) | 2069 | static inline void nf_conntrack_get_reasm(struct sk_buff *skb) |
2061 | { | 2070 | { |
2062 | if (skb) | 2071 | if (skb) |
@@ -2085,6 +2094,8 @@ static inline void nf_reset(struct sk_buff *skb) | |||
2085 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 2094 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
2086 | nf_conntrack_put(skb->nfct); | 2095 | nf_conntrack_put(skb->nfct); |
2087 | skb->nfct = NULL; | 2096 | skb->nfct = NULL; |
2097 | #endif | ||
2098 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
2088 | nf_conntrack_put_reasm(skb->nfct_reasm); | 2099 | nf_conntrack_put_reasm(skb->nfct_reasm); |
2089 | skb->nfct_reasm = NULL; | 2100 | skb->nfct_reasm = NULL; |
2090 | #endif | 2101 | #endif |
@@ -2101,6 +2112,8 @@ static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src) | |||
2101 | dst->nfct = src->nfct; | 2112 | dst->nfct = src->nfct; |
2102 | nf_conntrack_get(src->nfct); | 2113 | nf_conntrack_get(src->nfct); |
2103 | dst->nfctinfo = src->nfctinfo; | 2114 | dst->nfctinfo = src->nfctinfo; |
2115 | #endif | ||
2116 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
2104 | dst->nfct_reasm = src->nfct_reasm; | 2117 | dst->nfct_reasm = src->nfct_reasm; |
2105 | nf_conntrack_get_reasm(src->nfct_reasm); | 2118 | nf_conntrack_get_reasm(src->nfct_reasm); |
2106 | #endif | 2119 | #endif |
@@ -2114,6 +2127,8 @@ static inline void nf_copy(struct sk_buff *dst, const struct sk_buff *src) | |||
2114 | { | 2127 | { |
2115 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 2128 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
2116 | nf_conntrack_put(dst->nfct); | 2129 | nf_conntrack_put(dst->nfct); |
2130 | #endif | ||
2131 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
2117 | nf_conntrack_put_reasm(dst->nfct_reasm); | 2132 | nf_conntrack_put_reasm(dst->nfct_reasm); |
2118 | #endif | 2133 | #endif |
2119 | #ifdef CONFIG_BRIDGE_NETFILTER | 2134 | #ifdef CONFIG_BRIDGE_NETFILTER |
diff --git a/include/net/ah.h b/include/net/ah.h index f0129f79a31a..ca95b98969dd 100644 --- a/include/net/ah.h +++ b/include/net/ah.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/skbuff.h> | 4 | #include <linux/skbuff.h> |
5 | 5 | ||
6 | /* This is the maximum truncated ICV length that we know of. */ | 6 | /* This is the maximum truncated ICV length that we know of. */ |
7 | #define MAX_AH_AUTH_LEN 12 | 7 | #define MAX_AH_AUTH_LEN 64 |
8 | 8 | ||
9 | struct crypto_ahash; | 9 | struct crypto_ahash; |
10 | 10 | ||
diff --git a/include/net/arp.h b/include/net/arp.h index f4cf6ce66586..91f0568a04ef 100644 --- a/include/net/arp.h +++ b/include/net/arp.h | |||
@@ -25,5 +25,6 @@ extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, | |||
25 | const unsigned char *src_hw, | 25 | const unsigned char *src_hw, |
26 | const unsigned char *target_hw); | 26 | const unsigned char *target_hw); |
27 | extern void arp_xmit(struct sk_buff *skb); | 27 | extern void arp_xmit(struct sk_buff *skb); |
28 | int arp_invalidate(struct net_device *dev, __be32 ip); | ||
28 | 29 | ||
29 | #endif /* _ARP_H */ | 30 | #endif /* _ARP_H */ |
diff --git a/include/net/netfilter/ipv6/nf_conntrack_ipv6.h b/include/net/netfilter/ipv6/nf_conntrack_ipv6.h index 1ee717eb5b09..a4c993685795 100644 --- a/include/net/netfilter/ipv6/nf_conntrack_ipv6.h +++ b/include/net/netfilter/ipv6/nf_conntrack_ipv6.h | |||
@@ -7,16 +7,6 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6; | |||
7 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6; | 7 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6; |
8 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6; | 8 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6; |
9 | 9 | ||
10 | extern int nf_ct_frag6_init(void); | ||
11 | extern void nf_ct_frag6_cleanup(void); | ||
12 | extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user); | ||
13 | extern void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb, | ||
14 | struct net_device *in, | ||
15 | struct net_device *out, | ||
16 | int (*okfn)(struct sk_buff *)); | ||
17 | |||
18 | struct inet_frags_ctl; | ||
19 | |||
20 | #include <linux/sysctl.h> | 10 | #include <linux/sysctl.h> |
21 | extern struct ctl_table nf_ct_ipv6_sysctl_table[]; | 11 | extern struct ctl_table nf_ct_ipv6_sysctl_table[]; |
22 | 12 | ||
diff --git a/include/net/netfilter/ipv6/nf_defrag_ipv6.h b/include/net/netfilter/ipv6/nf_defrag_ipv6.h index 94dd54d76b48..fd79c9a1779d 100644 --- a/include/net/netfilter/ipv6/nf_defrag_ipv6.h +++ b/include/net/netfilter/ipv6/nf_defrag_ipv6.h | |||
@@ -3,4 +3,14 @@ | |||
3 | 3 | ||
4 | extern void nf_defrag_ipv6_enable(void); | 4 | extern void nf_defrag_ipv6_enable(void); |
5 | 5 | ||
6 | extern int nf_ct_frag6_init(void); | ||
7 | extern void nf_ct_frag6_cleanup(void); | ||
8 | extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user); | ||
9 | extern void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb, | ||
10 | struct net_device *in, | ||
11 | struct net_device *out, | ||
12 | int (*okfn)(struct sk_buff *)); | ||
13 | |||
14 | struct inet_frags_ctl; | ||
15 | |||
6 | #endif /* _NF_DEFRAG_IPV6_H */ | 16 | #endif /* _NF_DEFRAG_IPV6_H */ |
diff --git a/include/net/phonet/phonet.h b/include/net/phonet/phonet.h index d5df797f9540..5395e09187df 100644 --- a/include/net/phonet/phonet.h +++ b/include/net/phonet/phonet.h | |||
@@ -107,8 +107,8 @@ struct phonet_protocol { | |||
107 | int sock_type; | 107 | int sock_type; |
108 | }; | 108 | }; |
109 | 109 | ||
110 | int phonet_proto_register(int protocol, struct phonet_protocol *pp); | 110 | int phonet_proto_register(unsigned int protocol, struct phonet_protocol *pp); |
111 | void phonet_proto_unregister(int protocol, struct phonet_protocol *pp); | 111 | void phonet_proto_unregister(unsigned int protocol, struct phonet_protocol *pp); |
112 | 112 | ||
113 | int phonet_sysctl_init(void); | 113 | int phonet_sysctl_init(void); |
114 | void phonet_sysctl_exit(void); | 114 | void phonet_sysctl_exit(void); |
diff --git a/include/net/red.h b/include/net/red.h index 995108e54d9f..3319f16b3beb 100644 --- a/include/net/red.h +++ b/include/net/red.h | |||
@@ -97,7 +97,6 @@ struct red_stats { | |||
97 | u32 forced_mark; /* Forced marks, qavg > max_thresh */ | 97 | u32 forced_mark; /* Forced marks, qavg > max_thresh */ |
98 | u32 pdrop; /* Drops due to queue limits */ | 98 | u32 pdrop; /* Drops due to queue limits */ |
99 | u32 other; /* Drops due to drop() calls */ | 99 | u32 other; /* Drops due to drop() calls */ |
100 | u32 backlog; | ||
101 | }; | 100 | }; |
102 | 101 | ||
103 | struct red_parms { | 102 | struct red_parms { |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 0af57ebae762..e9eee99d8b1f 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -207,7 +207,7 @@ static inline int qdisc_qlen(struct Qdisc *q) | |||
207 | return q->q.qlen; | 207 | return q->q.qlen; |
208 | } | 208 | } |
209 | 209 | ||
210 | static inline struct qdisc_skb_cb *qdisc_skb_cb(struct sk_buff *skb) | 210 | static inline struct qdisc_skb_cb *qdisc_skb_cb(const struct sk_buff *skb) |
211 | { | 211 | { |
212 | return (struct qdisc_skb_cb *)skb->cb; | 212 | return (struct qdisc_skb_cb *)skb->cb; |
213 | } | 213 | } |
@@ -394,7 +394,7 @@ static inline bool qdisc_tx_is_noop(const struct net_device *dev) | |||
394 | return true; | 394 | return true; |
395 | } | 395 | } |
396 | 396 | ||
397 | static inline unsigned int qdisc_pkt_len(struct sk_buff *skb) | 397 | static inline unsigned int qdisc_pkt_len(const struct sk_buff *skb) |
398 | { | 398 | { |
399 | return qdisc_skb_cb(skb)->pkt_len; | 399 | return qdisc_skb_cb(skb)->pkt_len; |
400 | } | 400 | } |
@@ -426,10 +426,18 @@ static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch) | |||
426 | return qdisc_enqueue(skb, sch) & NET_XMIT_MASK; | 426 | return qdisc_enqueue(skb, sch) & NET_XMIT_MASK; |
427 | } | 427 | } |
428 | 428 | ||
429 | static inline void __qdisc_update_bstats(struct Qdisc *sch, unsigned int len) | 429 | |
430 | static inline void bstats_update(struct gnet_stats_basic_packed *bstats, | ||
431 | const struct sk_buff *skb) | ||
432 | { | ||
433 | bstats->bytes += qdisc_pkt_len(skb); | ||
434 | bstats->packets += skb_is_gso(skb) ? skb_shinfo(skb)->gso_segs : 1; | ||
435 | } | ||
436 | |||
437 | static inline void qdisc_bstats_update(struct Qdisc *sch, | ||
438 | const struct sk_buff *skb) | ||
430 | { | 439 | { |
431 | sch->bstats.bytes += len; | 440 | bstats_update(&sch->bstats, skb); |
432 | sch->bstats.packets++; | ||
433 | } | 441 | } |
434 | 442 | ||
435 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 443 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
@@ -437,7 +445,7 @@ static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | |||
437 | { | 445 | { |
438 | __skb_queue_tail(list, skb); | 446 | __skb_queue_tail(list, skb); |
439 | sch->qstats.backlog += qdisc_pkt_len(skb); | 447 | sch->qstats.backlog += qdisc_pkt_len(skb); |
440 | __qdisc_update_bstats(sch, qdisc_pkt_len(skb)); | 448 | qdisc_bstats_update(sch, skb); |
441 | 449 | ||
442 | return NET_XMIT_SUCCESS; | 450 | return NET_XMIT_SUCCESS; |
443 | } | 451 | } |