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:41:40 +0200 [thread overview]
Message-ID: <4BE81B24.4020601@trash.net> (raw)
In-Reply-To: <1273502195.2221.4.camel@edumazet-laptop>
Eric Dumazet wrote:
> Le lundi 10 mai 2010 à 16:26 +0200, Patrick McHardy a écrit :
>
>> 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.
>>
>
> I see, so maybe we want following patch instead ?
>
> (letting NET_XMIT_CN be given to caller, but accounting current packet
> as transmitted ?)
Perfect, thanks. I'd suggest to change macvlan in a similar fashion
for consistency though.
In any case please feel free to add my
Acked-by: Patrick McHardy <kaber@trash.net>
> diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> index b5249c5..55be908 100644
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -327,7 +327,7 @@ static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
> len = skb->len;
> ret = dev_queue_xmit(skb);
>
> - if (likely(ret == NET_XMIT_SUCCESS)) {
> + if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) {
> txq->tx_packets++;
> txq->tx_bytes += len;
> } else
> @@ -353,7 +353,7 @@ static netdev_tx_t vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
> len = skb->len;
> ret = dev_queue_xmit(skb);
>
> - if (likely(ret == NET_XMIT_SUCCESS)) {
> + if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) {
> txq->tx_packets++;
> txq->tx_bytes += len;
> } else
>
>
next prev parent reply other threads:[~2010-05-10 14:41 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
2010-05-10 14:36 ` Eric Dumazet
2010-05-10 14:41 ` Patrick McHardy [this message]
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=4BE81B24.4020601@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.