netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sch_prio.c vs CONFIG_NETDEVICES_MULTIQUEUE
@ 2007-10-23 12:14 Alexey Dobriyan
  2007-10-23 12:17 ` Patrick McHardy
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2007-10-23 12:14 UTC (permalink / raw)
  To: netdev; +Cc: peter.p.waskiewicz.jr, kaber

gcc spits following warnings

net/sched/sch_prio.c:139: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast
net/sched/sch_prio.c:169: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast

and he is dead right -- passing integer instead of skb is not going to
work:

	if (!netif_subqueue_stopped(sch->dev, (q->mq ? prio : 0))) {

skb_get_queue_mapping will ignore it if multiqueue support is off and
dereference it otherwise.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sch_prio.c vs CONFIG_NETDEVICES_MULTIQUEUE
  2007-10-23 12:14 sch_prio.c vs CONFIG_NETDEVICES_MULTIQUEUE Alexey Dobriyan
@ 2007-10-23 12:17 ` Patrick McHardy
  2007-10-23 13:01   ` Pavel Emelyanov
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick McHardy @ 2007-10-23 12:17 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: netdev, peter.p.waskiewicz.jr, Pavel Emelyanov

CCed Pavel

Alexey Dobriyan wrote:
> gcc spits following warnings
> 
> net/sched/sch_prio.c:139: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast
> net/sched/sch_prio.c:169: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast
> 
> and he is dead right -- passing integer instead of skb is not going to
> work:
> 
> 	if (!netif_subqueue_stopped(sch->dev, (q->mq ? prio : 0))) {
> 
> skb_get_queue_mapping will ignore it if multiqueue support is off and
> dereference it otherwise.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sch_prio.c vs CONFIG_NETDEVICES_MULTIQUEUE
  2007-10-23 12:17 ` Patrick McHardy
@ 2007-10-23 13:01   ` Pavel Emelyanov
  2007-10-24  3:51     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Emelyanov @ 2007-10-23 13:01 UTC (permalink / raw)
  To: Patrick McHardy, Alexey Dobriyan; +Cc: netdev, peter.p.waskiewicz.jr

Try with this patch.

Log:
Fix more users of netiff_subqueue_stopped. To check for the
queue id one must use the __netiff_subqueue_stoped call.

These run out of my sight when I made the 
668f895a85b0c3a62a690425145f13dabebebd7a commit :(

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index ae41973..d337bfa 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -534,7 +534,7 @@ static void cpmac_end_xmit(struct net_device *dev, int queue)
 		dev_kfree_skb_irq(desc->skb);
 		desc->skb = NULL;
 #ifdef CONFIG_NETDEVICES_MULTIQUEUE
-		if (netif_subqueue_stopped(dev, queue))
+		if (__netif_subqueue_stopped(dev, queue))
 			netif_wake_subqueue(dev, queue);
 #else
 		if (netif_queue_stopped(dev))
@@ -545,7 +545,7 @@ static void cpmac_end_xmit(struct net_device *dev, int queue)
 			printk(KERN_WARNING
 			       "%s: end_xmit: spurious interrupt\n", dev->name);
 #ifdef CONFIG_NETDEVICES_MULTIQUEUE
-		if (netif_subqueue_stopped(dev, queue))
+		if (__netif_subqueue_stopped(dev, queue))
 			netif_wake_subqueue(dev, queue);
 #else
 		if (netif_queue_stopped(dev))
@@ -649,7 +649,7 @@ static void cpmac_clear_tx(struct net_device *dev)
 	for (i = 0; i < CPMAC_QUEUES; i++)
 		if (priv->desc_ring[i].skb) {
 			dev_kfree_skb_any(priv->desc_ring[i].skb);
-			if (netif_subqueue_stopped(dev, i))
+			if (__netif_subqueue_stopped(dev, i))
 			    netif_wake_subqueue(dev, i);
 		}
 }
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index abd82fc..de89409 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -136,7 +136,7 @@ prio_dequeue(struct Qdisc* sch)
 		 * pulling an skb.  This way we avoid excessive requeues
 		 * for slower queues.
 		 */
-		if (!netif_subqueue_stopped(sch->dev, (q->mq ? prio : 0))) {
+		if (!__netif_subqueue_stopped(sch->dev, (q->mq ? prio : 0))) {
 			qdisc = q->queues[prio];
 			skb = qdisc->dequeue(qdisc);
 			if (skb) {
@@ -165,7 +165,7 @@ static struct sk_buff *rr_dequeue(struct Qdisc* sch)
 		 * for slower queues.  If the queue is stopped, try the
 		 * next queue.
 		 */
-		if (!netif_subqueue_stopped(sch->dev,
+		if (!__netif_subqueue_stopped(sch->dev,
 					    (q->mq ? q->curband : 0))) {
 			qdisc = q->queues[q->curband];
 			skb = qdisc->dequeue(qdisc);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: sch_prio.c vs CONFIG_NETDEVICES_MULTIQUEUE
  2007-10-23 13:01   ` Pavel Emelyanov
@ 2007-10-24  3:51     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2007-10-24  3:51 UTC (permalink / raw)
  To: xemul; +Cc: kaber, adobriyan, netdev, peter.p.waskiewicz.jr

From: Pavel Emelyanov <xemul@openvz.org>
Date: Tue, 23 Oct 2007 17:01:24 +0400

> Fix more users of netiff_subqueue_stopped. To check for the
> queue id one must use the __netiff_subqueue_stoped call.
> 
> These run out of my sight when I made the 
> 668f895a85b0c3a62a690425145f13dabebebd7a commit :(
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Applied, thanks Pavel.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-10-24  3:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 12:14 sch_prio.c vs CONFIG_NETDEVICES_MULTIQUEUE Alexey Dobriyan
2007-10-23 12:17 ` Patrick McHardy
2007-10-23 13:01   ` Pavel Emelyanov
2007-10-24  3:51     ` David Miller

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).