* [Patch net-next] netpoll: call ->ndo_select_queue() in tx path
@ 2012-09-18 6:16 Cong Wang
2012-09-19 21:21 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Cong Wang @ 2012-09-18 6:16 UTC (permalink / raw)
To: netdev; +Cc: Sylvain Munaut, David S. Miller, Eric Dumazet, Cong Wang
In netpoll tx path, we miss the chance of calling ->ndo_select_queue(),
thus could cause problems when bonding is involved.
This patch makes dev_pick_tx() extern (and rename it to netdev_pick_tx())
to let netpoll call it in netpoll_send_skb_on_dev().
Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Tested-by: Sylvain Munaut <s.munaut@whatever-company.com>
---
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ae3153c0..72661f6 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1403,6 +1403,9 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev,
f(dev, &dev->_tx[i], arg);
}
+extern struct netdev_queue *netdev_pick_tx(struct net_device *dev,
+ struct sk_buff *skb);
+
/*
* Net namespace inlines
*/
diff --git a/net/core/dev.c b/net/core/dev.c
index dcc673d..b13317a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2381,8 +2381,8 @@ static inline int get_xps_queue(struct net_device *dev, struct sk_buff *skb)
#endif
}
-static struct netdev_queue *dev_pick_tx(struct net_device *dev,
- struct sk_buff *skb)
+struct netdev_queue *netdev_pick_tx(struct net_device *dev,
+ struct sk_buff *skb)
{
int queue_index;
const struct net_device_ops *ops = dev->netdev_ops;
@@ -2556,7 +2556,7 @@ int dev_queue_xmit(struct sk_buff *skb)
skb_update_prio(skb);
- txq = dev_pick_tx(dev, skb);
+ txq = netdev_pick_tx(dev, skb);
q = rcu_dereference_bh(txq->qdisc);
#ifdef CONFIG_NET_CLS_ACT
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index dd67818..77a0388 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -328,7 +328,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
if (skb_queue_len(&npinfo->txq) == 0 && !netpoll_owner_active(dev)) {
struct netdev_queue *txq;
- txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
+ txq = netdev_pick_tx(dev, skb);
/* try until next clock tick */
for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Patch net-next] netpoll: call ->ndo_select_queue() in tx path
2012-09-18 6:16 [Patch net-next] netpoll: call ->ndo_select_queue() in tx path Cong Wang
@ 2012-09-19 21:21 ` David Miller
2012-10-03 9:33 ` Sylvain Munaut
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2012-09-19 21:21 UTC (permalink / raw)
To: amwang; +Cc: netdev, s.munaut, edumazet
From: Cong Wang <amwang@redhat.com>
Date: Tue, 18 Sep 2012 14:16:31 +0800
> In netpoll tx path, we miss the chance of calling ->ndo_select_queue(),
> thus could cause problems when bonding is involved.
>
> This patch makes dev_pick_tx() extern (and rename it to netdev_pick_tx())
> to let netpoll call it in netpoll_send_skb_on_dev().
>
> Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>
> Tested-by: Sylvain Munaut <s.munaut@whatever-company.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch net-next] netpoll: call ->ndo_select_queue() in tx path
2012-09-19 21:21 ` David Miller
@ 2012-10-03 9:33 ` Sylvain Munaut
2012-10-03 18:39 ` David Miller
2012-10-07 14:34 ` Cong Wang
0 siblings, 2 replies; 5+ messages in thread
From: Sylvain Munaut @ 2012-10-03 9:33 UTC (permalink / raw)
To: David Miller; +Cc: amwang, netdev, edumazet
Hi,
>> In netpoll tx path, we miss the chance of calling ->ndo_select_queue(),
>> thus could cause problems when bonding is involved.
>>
>> This patch makes dev_pick_tx() extern (and rename it to netdev_pick_tx())
>> to let netpoll call it in netpoll_send_skb_on_dev().
>>
>> Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
>> Cc: "David S. Miller" <davem@davemloft.net>
>> Cc: Eric Dumazet <edumazet@google.com>
>> Signed-off-by: Cong Wang <amwang@redhat.com>
>> Tested-by: Sylvain Munaut <s.munaut@whatever-company.com>
>
> Applied, thanks.
Huh, I don't see it in the final 3.6 ?
That's rather inconvenient :(
Cheers,
Sylvain
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch net-next] netpoll: call ->ndo_select_queue() in tx path
2012-10-03 9:33 ` Sylvain Munaut
@ 2012-10-03 18:39 ` David Miller
2012-10-07 14:34 ` Cong Wang
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2012-10-03 18:39 UTC (permalink / raw)
To: s.munaut; +Cc: amwang, netdev, edumazet
From: Sylvain Munaut <s.munaut@whatever-company.com>
Date: Wed, 3 Oct 2012 11:33:22 +0200
> Hi,
>
>>> In netpoll tx path, we miss the chance of calling ->ndo_select_queue(),
>>> thus could cause problems when bonding is involved.
>>>
>>> This patch makes dev_pick_tx() extern (and rename it to netdev_pick_tx())
>>> to let netpoll call it in netpoll_send_skb_on_dev().
>>>
>>> Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
>>> Cc: "David S. Miller" <davem@davemloft.net>
>>> Cc: Eric Dumazet <edumazet@google.com>
>>> Signed-off-by: Cong Wang <amwang@redhat.com>
>>> Tested-by: Sylvain Munaut <s.munaut@whatever-company.com>
>>
>> Applied, thanks.
>
> Huh, I don't see it in the final 3.6 ?
> That's rather inconvenient :(
What part of "net-next" in the subject line do you not understand?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch net-next] netpoll: call ->ndo_select_queue() in tx path
2012-10-03 9:33 ` Sylvain Munaut
2012-10-03 18:39 ` David Miller
@ 2012-10-07 14:34 ` Cong Wang
1 sibling, 0 replies; 5+ messages in thread
From: Cong Wang @ 2012-10-07 14:34 UTC (permalink / raw)
To: Sylvain Munaut; +Cc: David Miller, netdev, edumazet
On Wed, 2012-10-03 at 11:33 +0200, Sylvain Munaut wrote:
> Hi,
>
Hi, Sylvain
>
> Huh, I don't see it in the final 3.6 ?
> That's rather inconvenient :(
>
We can backport it to 3.6 stable if you request. :)
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-07 14:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-18 6:16 [Patch net-next] netpoll: call ->ndo_select_queue() in tx path Cong Wang
2012-09-19 21:21 ` David Miller
2012-10-03 9:33 ` Sylvain Munaut
2012-10-03 18:39 ` David Miller
2012-10-07 14:34 ` Cong Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).