linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <Alexander.Levin@microsoft.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: Xin Long <lucien.xin@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Sasha Levin <Alexander.Levin@microsoft.com>
Subject: [PATCH AUTOSEL for 4.14 035/110] vxlan: update skb dst pmtu on tx path
Date: Sat, 3 Feb 2018 18:00:45 +0000	[thread overview]
Message-ID: <20180203180015.29073-35-alexander.levin@microsoft.com> (raw)
In-Reply-To: <20180203180015.29073-1-alexander.levin@microsoft.com>

From: Xin Long <lucien.xin@gmail.com>

[ Upstream commit a93bf0ff449064e6b7f44e58522e940f88c0d966 ]

Unlike ip tunnels, now vxlan doesn't do any pmtu update for
upper dst pmtu, even if it doesn't match the lower dst pmtu
any more.

The problem can be reproduced when reducing the vxlan lower
dev's pmtu when running netperf. In jianlin's testing, the
performance went to 1/7 of the previous.

This patch is to update the upper dst pmtu to match the lower
dst pmtu on tx path so that packets can be sent out even when
lower dev's pmtu has been changed.

It also works for metadata dst.

Note that this patch doesn't process any pmtu icmp packet.
But even in the future, the support for pmtu icmp packets
process of udp tunnels will also needs this.

The same thing will be done for geneve in another patch.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
 drivers/net/vxlan.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 9e9202b50e73..bb44f0c6891f 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2155,6 +2155,13 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
 		}
 
 		ndst = &rt->dst;
+		if (skb_dst(skb)) {
+			int mtu = dst_mtu(ndst) - VXLAN_HEADROOM;
+
+			skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL,
+						       skb, mtu);
+		}
+
 		tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
 		ttl = ttl ? : ip4_dst_hoplimit(&rt->dst);
 		err = vxlan_build_skb(skb, ndst, sizeof(struct iphdr),
@@ -2190,6 +2197,13 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
 				goto out_unlock;
 		}
 
+		if (skb_dst(skb)) {
+			int mtu = dst_mtu(ndst) - VXLAN6_HEADROOM;
+
+			skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL,
+						       skb, mtu);
+		}
+
 		tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
 		ttl = ttl ? : ip6_dst_hoplimit(ndst);
 		skb_scrub_packet(skb, xnet);
-- 
2.11.0

  parent reply	other threads:[~2018-02-03 18:45 UTC|newest]

Thread overview: 138+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-03 18:00 [PATCH AUTOSEL for 4.14 001/110] net: phy: fix resume handling Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 002/110] exec: avoid gcc-8 warning for get_task_comm Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 003/110] mm/frame_vector.c: release a semaphore in 'get_vaddr_frames()' Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 004/110] scsi: aacraid: Fix I/O drop during reset Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 005/110] dmaengine: fsl-edma: disable clks on all error paths Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 006/110] KVM/x86: Check input paging mode when cs.l is set Sasha Levin
2018-02-04  1:24   ` Eric Biggers
2018-02-04  2:17     ` Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 007/110] phy: cpcap-usb: Fix platform_get_irq_byname's error checking Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 008/110] nvme-fc: remove double put reference if admin connect fails Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 009/110] nvme: check hw sectors before setting chunk sectors Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 010/110] net: aquantia: Fix actual speed capabilities reporting Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 011/110] net: aquantia: Fix hardware DMA stream overload on large MRRS Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 013/110] mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 012/110] net: usb: qmi_wwan: add Telit ME910 PID 0x1101 support Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 015/110] ipv6: icmp6: Allow icmp messages to be looped back Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 014/110] mtd: nand: brcmnand: Zero bitflip is not an error Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 017/110] ARM: 8731/1: Fix csum_partial_copy_from_user() stack mismatch Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 016/110] parisc: Reduce thread stack to 16 kb Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 018/110] x86/asm: Allow again using asm.h when building for the 'bpf' clang target Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 020/110] mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 019/110] sctp: fix the issue that a __u16 variable may overflow in sctp_ulpq_renege Sasha Levin
2018-02-05 11:35   ` David Laight
2018-02-06 10:42     ` Xin Long
2018-02-06 11:00       ` David Laight
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 022/110] net: phy: xgene: disable clk on error paths Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 021/110] sget(): handle failures of register_shrinker() Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 023/110] drm/nouveau/pci: do a msi rearm on init Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 024/110] scsi: core: check for device state in __scsi_remove_target() Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 025/110] xfrm: Reinject transport-mode packets through tasklet Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 026/110] x86/stacktrace: Make zombie stack traces reliable Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 028/110] spi: atmel: fixed spin_lock usage inside atmel_spi_remove Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 027/110] mac80211_hwsim: Fix a possible sleep-in-atomic bug in hwsim_get_radio_nl Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 030/110] cgroup: Fix deadlock in cpu hotplug path Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 029/110] ASoC: nau8825: fix issue that pop noise when start capture Sasha Levin
2018-02-05 11:41   ` Mark Brown
2018-02-06  1:41     ` Sasha Levin
2018-02-06  9:28       ` Greg KH
2018-02-06 11:25       ` Mark Brown
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 031/110] staging: ion: Fix ion_cma_heap allocations Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 032/110] x86-64/Xen: eliminate W+X mappings Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 033/110] net: mediatek: setup proper state for disabled GMAC on the default Sasha Levin
2018-02-03 18:00 ` Sasha Levin [this message]
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 034/110] net: arc_emac: fix arc_emac_rx() error paths Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 037/110] ip6_gre: remove the incorrect mtu limit for ipgre tap Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 036/110] ip_gre: " Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 038/110] ip6_tunnel: get the min mtu properly in ip6_tnl_xmit Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 039/110] net: stmmac: Fix TX timestamp calculation Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 040/110] net: stmmac: Fix bad RX timestamp extraction Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 042/110] net/mlx5: Cleanup IRQs in case of unload failure Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 041/110] net/mlx5e: Fix ETS BW check Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 044/110] ASoC: rsnd: fixup ADG register mask Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 043/110] net/mlx5: Stay in polling mode when command EQ destroy fails Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 046/110] netfilter: nf_tables: fix chain filter in nf_tables_dump_rules() Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 045/110] xen/balloon: Mark unallocated host memory as UNUSABLE Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 049/110] i915: Reject CCS modifiers for pipe C on Geminilake Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 048/110] netfilter: uapi: correct UNTRACKED conntrack state bit number Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 047/110] scsi: storvsc: Fix scsi_cmd error assignments in storvsc_handle_error Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 051/110] ARM: dts: ls1021a: fix incorrect clock references Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 050/110] RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 053/110] lib/mpi: Fix umul_ppmm() for MIPS64r6 Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 052/110] crypto: af_alg - Fix race around ctx->rcvused by making it atomic_t Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 054/110] arm64: dts: renesas: ulcb: Remove renesas, no-ether-link property Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 057/110] crypto: inside-secure - fix request allocations in invalidation path Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 056/110] crypto: inside-secure - free requests even if their handling failed Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 055/110] crypto: inside-secure - per request invalidation Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 058/110] netfilter: nf_tables: fix potential NULL-ptr deref in nf_tables_dump_obj_done() Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 059/110] tipc: error path leak fixes in tipc_enable_bearer() Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 060/110] tipc: fix tipc_mon_delete() oops in tipc_enable_bearer() error path Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 061/110] tg3: Add workaround to restrict 5762 MRRS to 2048 Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 062/110] tg3: Enable PHY reset in MTU change path for 5720 Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 063/110] bnx2x: Improve reliability in case of nested PCI errors Sasha Levin
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 065/110] led: core: Fix brightness setting when setting delay_off=0 Sasha Levin
2018-02-03 20:35   ` Pavel Machek
2018-02-04  0:30     ` Sasha Levin
2018-02-04  9:05       ` Pavel Machek
2018-02-04 11:15         ` Greg KH
2018-02-04 17:17           ` Pavel Machek
2018-02-06  2:02             ` Sasha Levin
2018-02-06 20:44               ` Jacek Anaszewski
2018-03-12 15:00                 ` Matthias Schiffer
2018-03-12 15:28                   ` Greg KH
2018-03-12 15:45                     ` Matthias Schiffer
2018-03-12 20:20                       ` Jacek Anaszewski
2018-03-13  7:50                         ` Pavel Machek
2018-03-13  9:37                         ` Greg KH
2018-03-13 13:27                           ` Pavel Machek
2018-03-13 19:44                             ` Jacek Anaszewski
2018-03-16 12:46                               ` Greg KH
2018-02-06 21:51               ` Pavel Machek
2018-02-04 15:49         ` Sasha Levin
2018-02-04 17:31           ` Pavel Machek
2018-02-03 18:00 ` [PATCH AUTOSEL for 4.14 064/110] perf/x86/intel: Plug memory leak in intel_pmu_init() Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 067/110] genirq: Guard handle_bad_irq log messages Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 066/110] IB/mlx5: Fix mlx5_ib_alloc_mr error flow Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 068/110] afs: Fix missing error handling in afs_write_end() Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 069/110] s390/dasd: fix wrongly assigned configuration data Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 071/110] ip6_tunnel: allow ip6gre dev mtu to be set below 1280 Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 070/110] btrfs: Fix flush bio leak Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 072/110] Input: xen-kbdfront - do not advertise multi-touch pressure support Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 073/110] IB/mlx4: Fix mlx4_ib_alloc_mr error flow Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 075/110] xfs: quota: fix missed destroy of qi_tree_lock Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 074/110] IB/ipoib: Fix race condition in neigh creation Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 076/110] xfs: quota: check result of register_shrinker() Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 077/110] macvlan: Fix one possible double free Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 078/110] e1000: fix disabling already-disabled warning Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 079/110] NET: usb: qmi_wwan: add support for YUGA CLM920-NC5 PID 0x9625 Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 080/110] drm/ttm: check the return value of kzalloc Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 081/110] RDMA/netlink: Fix locking around __ib_get_device_by_index Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 082/110] x86/efi: Fix kernel param add_efi_memmap regression Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 083/110] uapi libc compat: add fallback for unsupported libcs Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 084/110] i40e/i40evf: Account for frags split over multiple descriptors in check linearize Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 085/110] i40e: don't remove netdev->dev_addr when syncing uc list Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 086/110] net: ena: unmask MSI-X only after device initialization is completed Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 087/110] nl80211: Check for the required netlink attribute presence Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 089/110] can: flex_can: Correct the checking for frame length in flexcan_start_xmit() Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 088/110] mac80211: mesh: drop frames appearing to be from us Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 090/110] wcn36xx: Fix dynamic power saving Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 091/110] block: drain queue before waiting for q_usage_counter becoming zero Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 092/110] ia64, sched/cputime: Fix build error if CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 093/110] bpf: sockmap missing NULL psock check Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 094/110] leds: core: Fix regression caused by commit 2b83ff96f51d Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 095/110] powerpc/pseries: Make RAS IRQ explicitly dependent on DLPAR WQ Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 096/110] nvme-fabrics: initialize default host->id in nvmf_host_default() Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 097/110] x86/platform/intel-mid: Revert "Make 'bt_sfi_data' const" Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 098/110] bnxt_en: Fix population of flow_type in bnxt_hwrm_cfa_flow_alloc() Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 099/110] bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 100/110] xen-netfront: enable device after manual module load Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 101/110] mdio-sun4i: Fix a memory leak Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 103/110] xen/gntdev: Fix off-by-one error when unmapping with holes Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 102/110] SolutionEngine771x: fix Ether platform data Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 104/110] xen/gntdev: Fix partial gntdev_mmap() cleanup Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 105/110] sctp: add a ceiling to optlen in some sockopts Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 106/110] sctp: make use of pre-calculated len Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 107/110] net: gianfar_ptp: move set_fipers() to spinlock protecting area Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 109/110] nfp: always unmask aux interrupts at init Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 108/110] of_mdio: avoid MDIO bus removal when a PHY is missing Sasha Levin
2018-02-03 18:01 ` [PATCH AUTOSEL for 4.14 110/110] mlxsw: pci: Wait after reset before accessing HW Sasha Levin

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=20180203180015.29073-35-alexander.levin@microsoft.com \
    --to=alexander.levin@microsoft.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=stable@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).