remarkable-linux/drivers/net
Eric Dumazet 8f646c922d vxlan: keep original skb ownership
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>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06 16:37:09 -05:00
..
appletalk
arcnet
bonding bonding: fix kstrtou8() return value verification in num_peer_notif 2014-01-06 16:26:00 -05:00
caif virtio: use size-based config accessors. 2013-10-17 10:55:37 +10:30
can can: ti_hecc: Replace platform dependency with ARM dependency 2013-12-22 00:03:51 +01:00
cris
dsa
ethernet i40e: Do not allow AQ calls from ndo-ops 2014-01-06 03:56:28 -08:00
fddi net: fddi: slight optimization of addr compare 2013-12-31 16:48:33 -05:00
hamradio hamradio: 6pack: fix error return code 2014-01-02 03:30:35 -05:00
hippi net: hippi: remove unnecessary pci_set_drvdata() 2013-12-10 22:31:32 -05:00
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-12-18 16:42:06 -05:00
ieee802154 net: ieee802154: remove unnecessary spi_set_drvdata() 2013-12-10 22:31:32 -05:00
irda irda: vlsi_ir: remove unnecessary pci_set_drvdata() 2013-12-09 18:09:28 -05:00
phy phylib: make phy_scan_fixups() static 2014-01-04 19:27:58 -05:00
plip net: plip: slight optimization of addr compare 2013-12-31 16:48:33 -05:00
ppp ppp: slight optimization of addr compare 2013-12-26 13:31:33 -05:00
slip slip/slcan: added locking in wakeup function 2013-09-20 15:38:26 -04:00
team team: fix master carrier set when user linkup is enabled 2013-11-29 16:34:33 -05:00
usb r8152: replace the return value of rtl_ops_init 2014-01-06 16:24:09 -05:00
vmxnet3 vmxnet3: use initialized skb pointer to set hash 2013-12-26 13:55:29 -05:00
wan drivers: net: Include new header file in sbni.c 2013-12-19 18:51:20 -05:00
wimax wimax: Remove extern from function prototypes 2013-09-24 16:46:22 -07:00
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2014-01-01 15:39:56 -05:00
xen-netback xen-netback: add gso_segs calculation 2013-12-19 15:11:49 -05:00
dummy.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
eql.c
ifb.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
Kconfig
LICENSE.SRC
loopback.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
macvlan.c macvlan: unify macvlan_pcpu_stats and vlan_pcpu_stats 2014-01-04 20:11:33 -05:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-12-18 16:42:06 -05:00
Makefile
mdio.c mdio: unused ethtool functions 2013-12-26 13:29:35 -05:00
mii.c
netconsole.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-11-04 13:48:30 -05:00
nlmon.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
ntb_netdev.c
rionet.c
sb1000.c
Space.c drivers: net: Include new header file in sbni.c 2013-12-19 18:51:20 -05:00
sungem_phy.c
tun.c tun, rfs: fix the incorrect hash value 2014-01-02 02:41:22 -05:00
veth.c Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-14 16:30:30 +09:00
virtio_net.c virtio_net: spelling fixes 2013-12-10 22:28:06 -05:00
vxlan.c vxlan: keep original skb ownership 2014-01-06 16:37:09 -05:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-11-19 15:50:47 -08:00