[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46A0FC04.1000006@trash.net>
Date: Fri, 20 Jul 2007 20:16:36 +0200
From: Patrick McHardy <kaber@...sh.net>
To: Krishna Kumar <krkumar2@...ibm.com>
CC: davem@...emloft.net, rdreier@...co.com, johnpol@....mipt.ru,
Robert.Olsson@...a.slu.se, rick.jones2@...com,
herbert@...dor.apana.org.au, gaagaan@...il.com,
kumarkr@...ux.ibm.com, peter.p.waskiewicz.jr@...el.com,
mcarlson@...adcom.com, jagana@...ibm.com,
general@...ts.openfabrics.org, mchan@...adcom.com, tgraf@...g.ch,
jeff@...zik.org, sri@...ibm.com, hadi@...erus.ca,
netdev@...r.kernel.org, xma@...ibm.com
Subject: Re: [PATCH 05/10] sch_generic.c changes.
Krishna Kumar wrote:
> +static inline int get_skb(struct net_device *dev, struct Qdisc *q,
> + struct sk_buff_head *blist,
> + struct sk_buff **skbp)
> +{
> + if (likely(!blist) || (!skb_queue_len(blist) && qdisc_qlen(q) <= 1)) {
> + return likely((*skbp = dev_dequeue_skb(dev, q)) != NULL);
> + } else {
> + int max = dev->tx_queue_len - skb_queue_len(blist);
I'm assuming the driver will simply leave excess packets in the
blist for the next run. The check for tx_queue_len is wrong though,
its only a default which can be overriden and some qdiscs don't
care for it at all.
> + struct sk_buff *skb;
> +
> + while (max > 0 && (skb = dev_dequeue_skb(dev, q)) != NULL)
> + max -= dev_add_skb_to_blist(skb, dev);
> +
> + *skbp = NULL;
> + return 1; /* we have atleast one skb in blist */
> + }
> +}
> -void __qdisc_run(struct net_device *dev)
> +void __qdisc_run(struct net_device *dev, struct sk_buff_head *blist)
And the patches should really be restructured so this change is
in the same patch changing the header and the caller, for example.
> {
> do {
> - if (!qdisc_restart(dev))
> + if (!qdisc_restart(dev, blist))
> break;
> } while (!netif_queue_stopped(dev));
>
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists