netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Joakim Tjernlund <joakim.tjernlund@transmode.se>, netdev@vger.kernel.org
Subject: Re: VLAN I/F's and TX queue.
Date: Mon, 10 May 2010 16:26:27 +0200	[thread overview]
Message-ID: <4BE81793.3060905@trash.net> (raw)
In-Reply-To: <1273222403.2261.26.camel@edumazet-laptop>

Eric Dumazet wrote:
> Le vendredi 07 mai 2010 à 10:04 +0200, Joakim Tjernlund a écrit :
>> So I did some more testing
>> two nodes A and B connected over a slow link.
>> Create two VLAN's as above and start pinging from A to B
>> with pkg size 9600, start a few(4-10) parallel ping processes.
>>
>> Now I see dropped packages on B, the receiver of pings, and no
>> pkg loss on A.
>>
> 
> dropped on RX path or TX path ?
> 
>> 1) since the link is symmetrical, why do I only see pkg loss
>>    at B?
>>
>> 2) pkg loss in B only manifests on the VLAN's interfaces and
>>    always in pair as if one lost pkg is counted twice?
>>
> 
> Congestion notifications can be stacked since commit cbbef5e183079
> (vlan/macvlan: propagate transmission state to upper layers)
> 
>> 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 ?
> 
> If you want to avoid this, just add queues to your vlans
> 
> ip link add link eth0 eth0.103 txqueuelen 100 type vlan id 103
> 
> Patrick what do you think of special casing NET_XMIT_CN ?

Is the intention just to avoid accounting the packet as dropped?
That seems fine to me since in case of NET_XMIT_CN its actually
not the currently transmitted packet that was dropped.

But part of the intention of the above mentioned patch was actually
to inform higher layers of congestion so they can take action if
desired, which would be defeated by this patch.

> diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> index b5249c5..c671b1a 100644
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -327,6 +327,8 @@ static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
>  	len = skb->len;
>  	ret = dev_queue_xmit(skb);
>  
> +	ret = net_xmit_eval(ret);
> +
>  	if (likely(ret == NET_XMIT_SUCCESS)) {
>  		txq->tx_packets++;
>  		txq->tx_bytes += len;
> @@ -353,6 +355,8 @@ static netdev_tx_t vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
>  	len = skb->len;
>  	ret = dev_queue_xmit(skb);
>  
> +	ret = net_xmit_eval(ret);
> +
>  	if (likely(ret == NET_XMIT_SUCCESS)) {
>  		txq->tx_packets++;
>  		txq->tx_bytes += len;
> 
> 


  parent reply	other threads:[~2010-05-10 14:26 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
2010-05-16 14:22             ` Joakim Tjernlund
2010-05-10 14:26     ` Patrick McHardy [this message]
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=4BE81793.3060905@trash.net \
    --to=kaber@trash.net \
    --cc=eric.dumazet@gmail.com \
    --cc=joakim.tjernlund@transmode.se \
    --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).