netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: sathya.perla@emulex.com, netdev@vger.kernel.org,
	edumazet@google.com, stephen@networkplumber.org
Subject: Re: [PATCH net-next] vxlan: keep original skb ownership
Date: Mon, 06 Jan 2014 16:41:40 -0500 (EST)	[thread overview]
Message-ID: <20140106.164140.1492662570549981799.davem@davemloft.net> (raw)
In-Reply-To: <1389030871.12212.203.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 06 Jan 2014 09:54:31 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> Sathya Perla posted a patch trying to address following problem :
> 
> <quote>
>  The vxlan driver sets itself as the socket owner for all the TX flows
>  it encapsulates (using vxlan_set_owner()) and assigns it's own skb
>  destructor. This causes all tunneled traffic to land up on only one TXQ
>  as all encapsulated skbs refer to the vxlan socket and not the original
>  socket.  Also, the vxlan skb destructor breaks some functionality for
>  tunneled traffic like wmem accounting and as TCP small queues and
>  FQ/pacing packet scheduler.
> </quote>
> 
> I reworked Sathya patch and added some explanations.
> 
> vxlan_xmit() can avoid one skb_clone()/dev_kfree_skb() pair
> and gain better drop monitor accuracy, by calling kfree_skb() when
> appropriate.
> 
> The UDP socket used by vxlan to perform encapsulation of xmit packets
> do not need to be alive while packets leave vxlan code. Its better
> to keep original socket ownership to get proper feedback from qdisc and
> NIC layers.
> 
> We use skb->sk to 
> 
> A) control amount of bytes/packets queued on behalf of a socket, but
> prior vxlan code did the skb->sk transfert without any limit/control
> on vxlan socket sk_sndbuf.
> 
> B) security purposes (as selinux) or netfilter uses, and I do not think
> anything is prepared to handle vxlan stacked case in this area.
> 
> By not changing ownership, vxlan tunnels behave like other tunnels.
> As Stephen mentioned, we might do the same change in L2TP.
> 
> Reported-by: Sathya Perla <sathya.perla@emulex.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks a lot Eric.

      reply	other threads:[~2014-01-06 21:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-23 12:56 [PATCH net-next] vxlan: distribute vxlan tunneled traffic across multiple TXQs Sathya Perla
2013-12-23 19:28 ` Stephen Hemminger
2013-12-24 12:27   ` Sathya Perla
2013-12-24 18:39   ` Eric Dumazet
2013-12-24 23:05     ` Stephen Hemminger
2013-12-31 18:56     ` David Miller
2014-01-02  5:56       ` Eric Dumazet
2014-01-02  6:36         ` David Miller
2014-01-06 17:54 ` [PATCH net-next] vxlan: keep original skb ownership Eric Dumazet
2014-01-06 21:41   ` David Miller [this message]

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=20140106.164140.1492662570549981799.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sathya.perla@emulex.com \
    --cc=stephen@networkplumber.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).