[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45C0B05D.3020101@trash.net>
Date: Wed, 31 Jan 2007 16:06:05 +0100
From: Patrick McHardy <kaber@...sh.net>
To: Jarek Poplawski <jarkao2@...pl>
CC: netdev@...r.kernel.org
Subject: Re: [PATCH][NET_SCHED] sch_prio: class statistics printing enabled
Jarek Poplawski wrote:
>>>From sch_api.c:
>
>
>> if (cl_ops->dump && cl_ops->dump(q, cl, skb, tcm) < 0)
>> goto rtattr_failure;
>>
>> if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS,
>> TCA_XSTATS, q->stats_lock, &d) < 0)
>> goto rtattr_failure;
>>
>> if (cl_ops->dump_stats && cl_ops->dump_stats(q, cl, &d) < 0)
>> goto rtattr_failure;
>
>
> I can't see any difference between calling ->dump and
> ->dump_stats? Of course we may forsee this error should
> jump over cl_ops...
Why should there be a difference?
The class passed to both ->dump and ->dump_stats is not a classid but
a qdisc-internal identifier (pointer, integer, whatever) which comes
from either ->get or ->walk, and thus is valid unless these functions
have bugs. Your check would cover the bug up and has no other purpose.
-
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