From: David Miller <davem@davemloft.net>
To: joakim.tjernlund@transmode.se
Cc: kaber@trash.net, eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: VLAN I/F's and TX queue.
Date: Sun, 16 May 2010 00:40:41 -0700 (PDT) [thread overview]
Message-ID: <20100516.004041.73702151.davem@davemloft.net> (raw)
In-Reply-To: <OFC83B46CB.0E764A8E-ONC125771F.005109E4-C125771F.00518338@transmode.se>
From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Date: Mon, 10 May 2010 16:50:20 +0200
> Patrick McHardy <kaber@trash.net> wrote on 2010/05/10 16:33:00:
>>
>> Joakim Tjernlund wrote:
>> > Eric Dumazet <eric.dumazet@gmail.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.
next prev parent reply other threads:[~2010-05-16 7:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OF5A42C874.3AF220FE-ONC1257718.003ABC6E-C1257718.003F94D2@LocalDomain>
2010-05-07 8:04 ` VLAN I/F's and TX queue Joakim Tjernlund
2010-05-07 8:53 ` Eric Dumazet
2010-05-07 9:29 ` Joakim Tjernlund
2010-05-10 14:33 ` Patrick McHardy
2010-05-10 14:50 ` Joakim Tjernlund
2010-05-16 7:40 ` David Miller [this message]
2010-05-16 14:22 ` Joakim Tjernlund
2010-05-10 14:26 ` Patrick McHardy
2010-05-10 14:36 ` Eric Dumazet
2010-05-10 14:41 ` Patrick McHardy
2010-05-10 14:51 ` Eric Dumazet
2010-05-10 14:54 ` Joakim Tjernlund
2010-05-10 15:14 ` Eric Dumazet
2010-05-03 11:34 Joakim Tjernlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100516.004041.73702151.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=joakim.tjernlund@transmode.se \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).