Subject: Re: [PATCH v2 2/3] net_sched: Add accessor function for packet length for qdiscs

From: Patrick McHardy <[email-masked]>
Date: Wed, 30 Jul 2008 13:40:22 +0200

Jarek Poplawski wrote:
> On Wed, Jul 30, 2008 at 01:21:22PM +0200, Patrick McHardy wrote:
>> Jarek Poplawski wrote:
> ...
>>> I thought it needs to wait for your audit. (Considering current
>>> state of NET_XMIT statuses it's simple and reliable.) Otherwise
>>> I'd prefer nice methods too.
>>>   
>> Well, the problems are already clear, someone just needs to fix them :)
>> I won't be able to do this until next week.
> 
> ...alas to me the solution looks less clear...

The reason why it translates it at all seems to be to not increase
the drops counter. Within a single qdisc this could be avoided by
other means easily, upper qdiscs would still increase the counter
when we return anything besides NET_XMIT_SUCCESS though.

This means we need a new NET_XMIT return value to indicate this to
the upper qdiscs. So I'd suggest to introduce NET_XMIT_STOLEN,
return that to upper qdiscs and translate it to NET_XMIT_SUCCESS
in dev_queue_xmit, similar to NET_XMIT_BYPASS.