Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3026897ybc; Mon, 18 Nov 2019 08:23:37 -0800 (PST) X-Google-Smtp-Source: APXvYqzPpPGUjCmVNksb1kPo+/9VswZCkzTXgy0S0k9gi2c1BMr9JcGissnkLD7kiA3VYXP8h+cg X-Received: by 2002:a17:906:f154:: with SMTP id gw20mr27616142ejb.279.1574094217588; Mon, 18 Nov 2019 08:23:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574094217; cv=none; d=google.com; s=arc-20160816; b=0D82zFkx1vRsuc962Lkcmhw9Gv4xcJ7uxjsHJ8OhaScAMMh/oUfhOrvSD5CCKlDgPH DLtM14Sqw5sHhxaVAYhBLQ8JTL7g9gKJQAIUkTk+WSxKlUkxOLPM9Ye5CqHSvEaNgjRC cYGCGpNEF7IWCe0F3LO5bh+ETXP+CtfZB/iRtP/QksWOurwyofMvsHqmgNbytIDSTDaE XN952J+FE37FBpxEf4TGUbpKQ9oMQ33g361alroGWwHQxejUZFojT/kgxC+gl428Ojzy uzNLDhOU3e6zmWgUnvsx829GNj0/IpUf/mmNIUFNBUfMhjBdYmUyTvUi40gD0cust/nc BBXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=28mkf4nY/BfFSxfeD37z9AkThti/R74qtb4OVd2ijnk=; b=maqkLVGM76U35FQZWgRmmnwuyj4mJNgltxllDPYRJDf+BjU7QWE4AnXyoF6WJymo25 St/gGldnfPhePcOtzD1lY23T/Tg4CLJMeCfq8ZT60KH5WqIuPFzb3KH8e40i1mbIkhfB FLvaTkwqFrLZj5tDgoBWKccpbIeUk9ovAe5+GYLijxMNh748DnLhRybUhIOA25XeQ9GG e6LbI4+ffq1IBFFXth36VT9nSuaJdcRqS/VQVZGB/AoDdiLo5Mf7/JCHS2EE0ECtLX+t tDXpWgBGI2epGpEYOkjPPRYIcyrRSAD+Oya2IR4kt4h4luyjHJPTETN1LkyYXVL+/+nZ AQlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si8872058ejc.136.2019.11.18.08.23.13; Mon, 18 Nov 2019 08:23:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726774AbfKRQUB (ORCPT + 99 others); Mon, 18 Nov 2019 11:20:01 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:34777 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726635AbfKRQUB (ORCPT ); Mon, 18 Nov 2019 11:20:01 -0500 X-Originating-IP: 75.54.222.30 Received: from ovn.org (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id B28741C0005; Mon, 18 Nov 2019 16:19:56 +0000 (UTC) Date: Mon, 18 Nov 2019 08:19:51 -0800 From: Ben Pfaff To: Matteo Croce Cc: Simon Horman , dev@openvswitch.org, netdev , LKML , Bindiya Kurle , "David S. Miller" Subject: Re: [ovs-dev] [PATCH net-next] openvswitch: add TTL decrement action Message-ID: <20191118161951.GF3988@ovn.org> References: <20191112102518.4406-1-mcroce@redhat.com> <20191112150046.2aehmeoq7ri6duwo@netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 12, 2019 at 04:46:12PM +0100, Matteo Croce wrote: > On Tue, Nov 12, 2019 at 4:00 PM Simon Horman wrote: > > > > On Tue, Nov 12, 2019 at 11:25:18AM +0100, Matteo Croce wrote: > > > New action to decrement TTL instead of setting it to a fixed value. > > > This action will decrement the TTL and, in case of expired TTL, send the > > > packet to userspace via output_userspace() to take care of it. > > > > > > Supports both IPv4 and IPv6 via the ttl and hop_limit fields, respectively. > > > > > > > Usually OVS achieves this behaviour by matching on the TTL and > > setting it to the desired value, pre-calculated as TTL -1. > > With that in mind could you explain the motivation for this > > change? > > > > Hi, > > the problem is that OVS creates a flow for each ttl it see. I can let > vswitchd create 255 flows with like this: > > $ for i in {2..255}; do ping 192.168.0.2 -t $i -c1 -w1 &>/dev/null & done > $ ovs-dpctl dump-flows |fgrep -c 'set(ipv4(ttl' > 255 Sure, you can easily invent a situation. In real traffic there's not usually such a variety of TTLs for a flow that matches on the number of fields that OVS usually needs to match. Do you see a real problem given actual traffic in practice?