[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100516.004041.73702151.davem@davemloft.net>
Date: Sun, 16 May 2010 00:40:41 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: joakim.tjernlund@...nsmode.se
Cc: kaber@...sh.net, eric.dumazet@...il.com, netdev@...r.kernel.org
Subject: Re: VLAN I/F's and TX queue.
From: Joakim Tjernlund <joakim.tjernlund@...nsmode.se>
Date: Mon, 10 May 2010 16:50:20 +0200
> Patrick McHardy <kaber@...sh.net> wrote on 2010/05/10 16:33:00:
>>
>> Joakim Tjernlund wrote:
>> > Eric Dumazet <eric.dumazet@...il.com> wrote on 2010/05/07 10:53:23:
>> >>> 3) I would expect lost pkgs to be accounted on eth0 instead of
>> >>> the VLAN interface(s) since that is where the pkg is lost, why
>> >>> isn't it so?
>> >> You try to send packets on eth0.XXX, some are dropped, and accounted for
>> >> on eth0.XXX stats. What is wrong with this ?
>> >
>> > In this case one lost pkg is accounted for twice, once on eth0.1 and
>> > once more on eth0.1.1. Note that eth0.1.1 is stacked on
>> > top of eth0.1
>> >
>> > I would at least expect eth0 to also account lost pkgs too.
>> > I was confused by the current accounting as I knew that
>> > the underlying HW I/F should be the only I/F that could
>> > drop pkgs.
>>
>> In case of NET_XMIT_CN, the packet is dropped by the qdisc before
>> it reaches eth0, so its only accounted on the upper devices.
>
> hmm, I am afraid I don't follow this. Why would a pkg be dropped before
> it reaches eth0?
Because we have packet schedulers that sit before the device transmit
happens, and those packet schedulers enforce limits based upon
classification results or other criteria, and if those limits are
exceeded packets are droppers and NET_XMIT_CN is returned back up into
the transmit path of the networking stack.
The device never sees that packet get submitted to it's ->ndo_start_xmit()
routine, and this is entirely intentional. And it is entirely intentional
that NET_XMIT_CN gets passed up into the caller, where protocols such as
TCP can key off this information to make congestion control decisions.
--
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