[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4878AFD8.1000307@gmail.com>
Date: Sat, 12 Jul 2008 15:21:28 +0200
From: Jarek Poplawski <jarkao2@...il.com>
To: unlisted-recipients:; (no To-header on input)
CC: David Miller <davem@...emloft.net>, joy@...uzijast.net,
mchan@...adcom.com, billfink@...dspring.com,
bhutchings@...arflare.com, netdev@...r.kernel.org,
mirrors@...ian.org, kaber@...sh.net, devik@....cz
Subject: Re: bnx2_poll panicking kernel
Jarek Poplawski wrote, On 07/12/2008 11:49 AM:
> David Miller wrote, On 07/11/2008 11:56 AM:
> ...
>
>> diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
>> index 3fb58f4..aa20b47 100644
>> --- a/net/sched/sch_htb.c
>> +++ b/net/sched/sch_htb.c
>> @@ -583,6 +583,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
>> if (q->direct_queue.qlen < q->direct_qlen) {
>> __skb_queue_tail(&q->direct_queue, skb);
>> q->direct_pkts++;
>> + ret = NET_XMIT_SUCCESS;
>> } else {
>> kfree_skb(skb);
>> sch->qstats.drops++;
>> @@ -595,22 +596,26 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
>> kfree_skb(skb);
>> return ret;
>> #endif
>> - } else if (cl->un.leaf.q->enqueue(skb, cl->un.leaf.q) !=
>> - NET_XMIT_SUCCESS) {
>> - sch->qstats.drops++;
>> - cl->qstats.drops++;
>> - return NET_XMIT_DROP;
>> } else {
>> - cl->bstats.packets +=
>> - skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
>> - cl->bstats.bytes += skb->len;
>> - htb_activate(q, cl);
>> + ret = cl->un.leaf.q->enqueue(skb, cl->un.leaf.q);
>> + if (ret == NET_XMIT_DROP) {
>> + sch->qstats.drops++;
>> + cl->qstats.drops++;
>> + } else {
>> + cl->bstats.packets +=
>> + skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
>> + cl->bstats.bytes += skb->len;
>> + htb_activate(q, cl);
>
>
> This isn't correct: htb_activate() needs cl->un.leaf.q->q.qlen > 0, and
> only NET_XMIT_SUCCESS can guarantee this.
...Actually, it looks like even NET_XMIT_SUCCESS can't guarantee this
(when returned after TC_ACT_QUEUED or TC_ACT_STOLEN), so additional qlen
test is needed here.
Jarek P.
--
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