diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-07 22:56:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-07 22:56:00 -0400 |
commit | 2aa72f612144a0a7d4b0b22ae7c122692ac6a013 (patch) | |
tree | 8af2d2ac975887a04b4e4109de3d785f7046979b /include/net | |
parent | 78178c7d6e127fff6dba027315fd6914304b05cf (diff) | |
parent | 33b665eeeb85956ccbdf31c4c31a4e2a31133c44 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (35 commits)
NET: SB1250: Initialize .owner
vxge: show startup message with KERN_INFO
ll_temac: Fix missing iounmaps
bridge: Clear IPCB before possible entry into IP stack
bridge br_multicast: BUG: unable to handle kernel NULL pointer dereference
net: Fix definition of netif_vdbg() when VERBOSE_DEBUG is defined
net/ne: fix memory leak in ne_drv_probe()
xfrm: fix xfrm by MARK logic
virtio_net: fix oom handling on tx
virtio_net: do not reschedule rx refill forever
s2io: resolve statistics issues
linux/net.h: fix kernel-doc warnings
net: decreasing real_num_tx_queues needs to flush qdisc
sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock
qlge: fix a eeh handler to not add a pending timer
qlge: Replacing add_timer() to mod_timer()
usbnet: Set parent device early for netdev_printk()
net: Revert "rndis_host: Poll status channel before control channel"
netfilter: ip6t_REJECT: fix a dst leak in ipv6 REJECT
drivers: bluetooth: bluecard_cs.c: Fixed include error, changed to linux/io.h
...
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/sch_generic.h | 20 | ||||
-rw-r--r-- | include/net/xfrm.h | 2 |
2 files changed, 17 insertions, 5 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 03ca5d826757..433604bb3fe8 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -313,12 +313,24 @@ extern void qdisc_calculate_pkt_len(struct sk_buff *skb, | |||
313 | extern void tcf_destroy(struct tcf_proto *tp); | 313 | extern void tcf_destroy(struct tcf_proto *tp); |
314 | extern void tcf_destroy_chain(struct tcf_proto **fl); | 314 | extern void tcf_destroy_chain(struct tcf_proto **fl); |
315 | 315 | ||
316 | /* Reset all TX qdiscs of a device. */ | 316 | /* Reset all TX qdiscs greater then index of a device. */ |
317 | static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) | ||
318 | { | ||
319 | struct Qdisc *qdisc; | ||
320 | |||
321 | for (; i < dev->num_tx_queues; i++) { | ||
322 | qdisc = netdev_get_tx_queue(dev, i)->qdisc; | ||
323 | if (qdisc) { | ||
324 | spin_lock_bh(qdisc_lock(qdisc)); | ||
325 | qdisc_reset(qdisc); | ||
326 | spin_unlock_bh(qdisc_lock(qdisc)); | ||
327 | } | ||
328 | } | ||
329 | } | ||
330 | |||
317 | static inline void qdisc_reset_all_tx(struct net_device *dev) | 331 | static inline void qdisc_reset_all_tx(struct net_device *dev) |
318 | { | 332 | { |
319 | unsigned int i; | 333 | qdisc_reset_all_tx_gt(dev, 0); |
320 | for (i = 0; i < dev->num_tx_queues; i++) | ||
321 | qdisc_reset(netdev_get_tx_queue(dev, i)->qdisc); | ||
322 | } | 334 | } |
323 | 335 | ||
324 | /* Are all TX queues of the device empty? */ | 336 | /* Are all TX queues of the device empty? */ |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 1913af67c43d..fc8f36dd0f5c 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1586,7 +1586,7 @@ static inline struct xfrm_state *xfrm_input_state(struct sk_buff *skb) | |||
1586 | static inline int xfrm_mark_get(struct nlattr **attrs, struct xfrm_mark *m) | 1586 | static inline int xfrm_mark_get(struct nlattr **attrs, struct xfrm_mark *m) |
1587 | { | 1587 | { |
1588 | if (attrs[XFRMA_MARK]) | 1588 | if (attrs[XFRMA_MARK]) |
1589 | memcpy(m, nla_data(attrs[XFRMA_MARK]), sizeof(m)); | 1589 | memcpy(m, nla_data(attrs[XFRMA_MARK]), sizeof(struct xfrm_mark)); |
1590 | else | 1590 | else |
1591 | m->v = m->m = 0; | 1591 | m->v = m->m = 0; |
1592 | 1592 | ||