From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haggai Eran Subject: Re: OVS VXLAN decap rule has full match on TTL for the outer headers? Date: Sun, 29 Nov 2015 15:06:17 +0200 Message-ID: <565AF849.8030008@mellanox.com> References: <56435508.9070802@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Jesse Gross , Or Gerlitz , "Jesse Gross" , "netdev@vger.kernel.org" , Ilya Lesokhin , Rony Efraim , "Hadar Hen Zion" , Jesse Gross , "Pravin B Shelar" To: Joe Stringer , Or Gerlitz Return-path: Received: from mail-am1on0068.outbound.protection.outlook.com ([157.56.112.68]:49815 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750846AbbK2NVP (ORCPT ); Sun, 29 Nov 2015 08:21:15 -0500 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 14/11/2015 08:45, Joe Stringer wrote: > On 13 November 2015 at 06:46, Or Gerlitz wrote: >> > On Fri, Nov 13, 2015 at 10:14 AM, Joe Stringer wrote: >> > >>> >> I don't follow the logic. You observed one flow which matched on >>> >> TTL=64, therefore all vxlan packets terminated at OVS have TTL=64? >> > >>> >> If OVS received packets with different TTLs, they would miss and >>> >> ovs-vswitchd would generate flows to match that traffic too. >> > >> > ok, that makes things a bit better, but (see next) >> > >>> >> If that becomes an issue, presumably the wildcard generation can be improved. >> > >> > is there a deep reason for vlxan "learned flows" to actually match w >> > or w.o wild cards on TTLs?? for non-tunneled flow I don't see this >> > happening. > No deep reason I'm aware of. Hi, We looked into the OVS kernel module, and apparently there's a check that rejects new tunnel flows if they don't have the TTL mask set [1]. I was able to trace it to this commit [2] on the OVS tree, but I don't quite understand why the check was added. There was some discussion about the patch on the mailing list [3] that hints this was about catching zero TTL, but it has too little context for me to understand. I'm adding the author and reviewer of the patch, perhaps they can help explain this requirement. Regards, Haggai [1] http://lxr.free-electrons.com/source/net/openvswitch/flow_netlink.c?v=4.3#L660 [2] datapath: More flexible kernel/userspace tunneling attribute. 9b405f1aa8d175dc63ad3ffe5d0fe05d5ee09162 [3] http://openvswitch.org/pipermail/dev/2013-January/024573.html