Re: take 2 WAS (RE: [RFC] make qdisc_restart more readable

2007-05-12 Thread jamal
On Sat, 2007-12-05 at 11:46 +0200, Thomas Graf wrote: > > + struct sk_buff *skb = NULL; > > + > > + if (skb = dev->gso_skb) > > This must have caused a warning Possibly (dont recall) - i will move the assignment to the first line. > and you probably want to inline this function. will do.

Re: take 2 WAS (RE: [RFC] make qdisc_restart more readable

2007-05-12 Thread Thomas Graf
* jamal <[EMAIL PROTECTED]> 2007-05-11 15:29 > diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c > + netif_schedule(dev); > + return 0; > +} > + > +static struct sk_buff * > +try_get_tx_pkt(struct net_device *dev, struct Qdisc *q) > +{ > + struct sk_buff *skb = NULL; > + >

RE: take 2 WAS (RE: [RFC] make qdisc_restart more readable

2007-05-11 Thread jamal
On Fri, 2007-11-05 at 15:01 -0700, Waskiewicz Jr, Peter P wrote: > The current requeue calls in qdisc_restart() returns a value of 1 to the > upper layer. Which was not meaningful ;-> i.e qdisc run would break as a result. Note, this is still in conformance with net-2.6 based on a change in the

RE: take 2 WAS (RE: [RFC] make qdisc_restart more readable

2007-05-11 Thread Waskiewicz Jr, Peter P
> Ok, booting fine to me; > if you receive this email, it must have worked. OTOH, if you > didnt receive this it probably failed ;-> (as the presenter > said "if you cant hear me in the far corner please raise your hand"). > > clip away ... +static inline int +handle_dev_requeue(struct sk_buff *sk

take 2 WAS (RE: [RFC] make qdisc_restart more readable

2007-05-11 Thread jamal
On Fri, 2007-11-05 at 11:46 -0700, Waskiewicz Jr, Peter P wrote: > Clippers are standing by. :) Nothing as nice as time off to code away;-> Ok, booting fine to me; if you receive this email, it must have worked. OTOH, if you didnt receive this it probably failed ;-> (as the presenter said "if

RE: [RFC] make qdisc_restart more readable

2007-05-11 Thread Waskiewicz Jr, Peter P
> For lockless drivers, I think it could be moved up; only > thing is nothing is stopping it from changing again at transmit time. > For drivers that are not lockless, i am wondering if its even > useful to have that check given we have already grabbed the tx lock. Good point. I live in an LLTX

RE: [RFC] make qdisc_restart more readable

2007-05-11 Thread jamal
On Fri, 2007-11-05 at 11:13 -0700, Waskiewicz Jr, Peter P wrote: > After thinking about this a bit more: even if the queue is stopped, > you'd end up requeueing anyways. Plus, you'd need to re-acquire > dev->queue_lock (which is what happens today). I think the best way > overall would be to che

Re: [RFC] make qdisc_restart more readable

2007-05-11 Thread jamal
On Fri, 2007-11-05 at 19:01 +0200, Thomas Graf wrote: > * jamal <[EMAIL PROTECTED]> 2007-05-10 20:13 > > * Compute the worst case header length according to the protocols > > diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c > > index f28bb2d..b821040 100644 > > --- a/net/sched/sch_

RE: [RFC] make qdisc_restart more readable

2007-05-11 Thread Waskiewicz Jr, Peter P
> On Fri, 2007-11-05 at 08:56 -0700, Waskiewicz Jr, Peter P wrote: > > > In qdisc_restart(), you removed any check for if > > (!netif_queue_stopped(dev)) before calling > dev_hard_start_xmit(). If > > the underlying queue is stopped and you send the skb, > you'll generate > > a requeue. Is t

RE: [RFC] make qdisc_restart more readable

2007-05-11 Thread jamal
On Fri, 2007-11-05 at 08:56 -0700, Waskiewicz Jr, Peter P wrote: > In qdisc_restart(), you removed any check for if > (!netif_queue_stopped(dev)) before calling dev_hard_start_xmit(). If > the underlying queue is stopped and you send the skb, you'll generate a > requeue. Is there a reason it was

Re: [RFC] make qdisc_restart more readable

2007-05-11 Thread Thomas Graf
* jamal <[EMAIL PROTECTED]> 2007-05-10 20:13 > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index f671cd2..718d6fd 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -83,6 +83,9 @@ struct wireless_dev; > #define NETDEV_TX_OK 0 /* d

RE: [RFC] make qdisc_restart more readable

2007-05-11 Thread Waskiewicz Jr, Peter P
> This compiles and passes some basic tests - no serious testing. > Against net-2.6. > > The patch is ugly looking, so i have at the end the > re-written qdisc; you can easily tell the rest from the patch. > > Please flush out any fluff - I would like to submit this > (almost lost it, thanks to