diff options
author | David S. Miller <davem@davemloft.net> | 2010-07-07 18:59:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-07 18:59:38 -0400 |
commit | 597e608a8492d662736c9bc6aa507dbf1cadc17d (patch) | |
tree | 6c330cdd0a4809f67dd191b37e34f5b4318cef78 /include/net | |
parent | acbc0f039ff4b93da737c91937b7c70018ded39f (diff) | |
parent | 33b665eeeb85956ccbdf31c4c31a4e2a31133c44 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
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 977ec06ed0c7..3c8728aaab4e 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -336,12 +336,24 @@ extern void qdisc_calculate_pkt_len(struct sk_buff *skb, | |||
336 | extern void tcf_destroy(struct tcf_proto *tp); | 336 | extern void tcf_destroy(struct tcf_proto *tp); |
337 | extern void tcf_destroy_chain(struct tcf_proto **fl); | 337 | extern void tcf_destroy_chain(struct tcf_proto **fl); |
338 | 338 | ||
339 | /* Reset all TX qdiscs of a device. */ | 339 | /* Reset all TX qdiscs greater then index of a device. */ |
340 | static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) | ||
341 | { | ||
342 | struct Qdisc *qdisc; | ||
343 | |||
344 | for (; i < dev->num_tx_queues; i++) { | ||
345 | qdisc = netdev_get_tx_queue(dev, i)->qdisc; | ||
346 | if (qdisc) { | ||
347 | spin_lock_bh(qdisc_lock(qdisc)); | ||
348 | qdisc_reset(qdisc); | ||
349 | spin_unlock_bh(qdisc_lock(qdisc)); | ||
350 | } | ||
351 | } | ||
352 | } | ||
353 | |||
340 | static inline void qdisc_reset_all_tx(struct net_device *dev) | 354 | static inline void qdisc_reset_all_tx(struct net_device *dev) |
341 | { | 355 | { |
342 | unsigned int i; | 356 | qdisc_reset_all_tx_gt(dev, 0); |
343 | for (i = 0; i < dev->num_tx_queues; i++) | ||
344 | qdisc_reset(netdev_get_tx_queue(dev, i)->qdisc); | ||
345 | } | 357 | } |
346 | 358 | ||
347 | /* Are all TX queues of the device empty? */ | 359 | /* 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 | ||