From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754013AbdASQmp (ORCPT ); Thu, 19 Jan 2017 11:42:45 -0500 Received: from sender153-mail.zoho.com ([74.201.84.153]:25099 "EHLO sender153-mail.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753686AbdASQmn (ORCPT ); Thu, 19 Jan 2017 11:42:43 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=date:from:to:cc:message-id:in-reply-to:subject:mime-version:content-type:user-agent; b=myQYtjixst2GwyIxDu1ukxyfQrLyqNWfsRmj4+fdVVBGkKct85ONJ+pbGw9eK2sz0OgNesdEzOG3 ABo7MxryAKfUJIopCHfVdsouhmixWW/d+XeA5kA82pUDdf0uryeL Date: Thu, 19 Jan 2017 17:41:23 +0100 From: Fredrik Markstrom To: "netdev" Cc: "Evan Jones" , "David S. Miller" , "Cong Wang" , "Greg Kroah-Hartman" , "Vijay Pandurangan" , "linux-kernel" Message-ID: <159b79aa979.e23be6a5186096.2767722456700391441@gmail.com> In-Reply-To: Subject: Inconsistency in packet drop due to MTU (eth vs veth) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, I've noticed an inconsistency between how physical ethernet and veth handles mtu. If I setup two physical interfaces (directly connected) with different mtu:s, only the size of the outgoing packets are limited by the mtu. But with veth a packet is dropped if the mtu of the receiving interface is smaller then the packet size. This seems inconsistent to me, but maybe there is a reason for it ? Can someone confirm if it's a deliberate inconsistency or just a side effect of using dev_forward_skb() ? Example: Using physical interfaces ================= client> ip link set dev eth0 mtu 500 server> ip link set dev eth2 mtu 1500 server> ping -qc 2 -s 600 client PING 135.15.35.74 (135.15.35.74) 1100(1128) bytes of data. --- 135.15.35.74 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.818/0.864/0.910/0.046 ms Using veth ============= server> ip netns add clientns server> ip link add name serverif type veth peer name clientif server> ip addr add 10.0.0.1/24 dev serverif server> ip link set serverif mtu 1500 up server> ip link set clientif up netns clientns server> ip netns exec clientns ip link set clientif mtu 500 server> ip netns exec clientns ip addr add 10.0.0.74/24 dev clientif server> ping -qc 2 -s 600 10.0.0.74 PING 10.0.0.74 (10.0.0.74) 600(628) bytes of data. --- 10.0.0.74 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1008ms /F