Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4326790ybv; Sun, 16 Feb 2020 19:35:15 -0800 (PST) X-Google-Smtp-Source: APXvYqysBwob6TIb+v/Yv253xFpNNjGWmZT7zHoPr6k/PWqVoQvttiukN+7tF30exGbQTt9tjo7Q X-Received: by 2002:a05:6830:1289:: with SMTP id z9mr11253879otp.317.1581910515713; Sun, 16 Feb 2020 19:35:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581910515; cv=none; d=google.com; s=arc-20160816; b=cLp71ctRzI0UwcOe+uP68E3uUG/G/566IFVJdjyqISyX4t00gFGFJ8q0/PyDwxpqJd baaAM+2+e/XjXlakj6cflCysizOLxga9tiaZcERrzaCrG96Y6DbFDf5J363SRPDS7R6e UEWJbSx5Nj1x6rd6WOhVW29VmX3qPtv8fhjvVtyVBnfEWwrFwfn+Ho0gzLJV6wTJnDBv WaOoFMJr4GcjZe20XF4tfkyezGage7wynmQALUhE5FaUhPf93j5nlQiivMk7+u7gVRMQ wpWf6+S59azKIADo5w+gy23qLcpLZD+VEN4cqLJzhh0chR+LRUcHZ1PrpDtFLb4AiCwu 3PKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=gquWKNbklxblHPbMa3J4bEeEcq3gaMUI/pJTPRZ1gU0=; b=caMakt/ui7V/ENSsZ1zXccwlXN+/jVtV9GA4s0oeQEa9zDbB1NLsvoHITQC6I4VnCe 9dh/elybwpNHU/aHOcNG3no9QXLhVcjLGMePmxC0NtzDtJU7rpcf/NOTvi7zyFpFvTCS rJdKjWX9gX31VZ6CZu4pfqcAzEDd2rNHVJn50F2GTGmtDABQiDBKOlp7YG1NVky8vabZ S7HdAXHwKSieGpfYSKcG0m3N/2qRTp6yqtLBeMmbegwPt4viQM+805cRG2e+qM2p+wGe SFcDkeuta7U8YJw5wFYpYPDY9bpWXozeor2jXGoHnhqINE5RtcgG6cXAqxuGy0kWOZC3 nN2w== 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 a12si6106371oid.189.2020.02.16.19.35.03; Sun, 16 Feb 2020 19:35:15 -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 S1727681AbgBQDe7 (ORCPT + 99 others); Sun, 16 Feb 2020 22:34:59 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:48326 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726498AbgBQDe6 (ORCPT ); Sun, 16 Feb 2020 22:34:58 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id DD3FC1574C457; Sun, 16 Feb 2020 19:34:57 -0800 (PST) Date: Sun, 16 Feb 2020 19:34:57 -0800 (PST) Message-Id: <20200216.193457.413155281457804366.davem@davemloft.net> To: mcroce@redhat.com Cc: netdev@vger.kernel.org, dev@openvswitch.org, linux-kernel@vger.kernel.org, pshelar@ovn.org, bindiyakurle@gmail.com, simon.horman@netronome.com, blp@ovn.org, nikolay@cumulusnetworks.com, nicolas.dichtel@6wind.com, jgh@redhat.com Subject: Re: [PATCH net-next v5] openvswitch: add TTL decrement action From: David Miller In-Reply-To: <20200215132056.42124-1-mcroce@redhat.com> References: <20200215132056.42124-1-mcroce@redhat.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 16 Feb 2020 19:34:58 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matteo Croce Date: Sat, 15 Feb 2020 14:20:56 +0100 > 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, drop it > or execute an action passed via a nested attribute. > The default TTL expired action is to drop the packet. > > Supports both IPv4 and IPv6 via the ttl and hop_limit fields, respectively. > > Tested with a corresponding change in the userspace: > > # ovs-dpctl dump-flows > in_port(2),eth(),eth_type(0x0800), packets:0, bytes:0, used:never, actions:dec_ttl{ttl<=1 action:(drop)},1 > in_port(1),eth(),eth_type(0x0800), packets:0, bytes:0, used:never, actions:dec_ttl{ttl<=1 action:(drop)},2 > in_port(1),eth(),eth_type(0x0806), packets:0, bytes:0, used:never, actions:2 > in_port(2),eth(),eth_type(0x0806), packets:0, bytes:0, used:never, actions:1 > > # ping -c1 192.168.0.2 -t 42 > IP (tos 0x0, ttl 41, id 61647, offset 0, flags [DF], proto ICMP (1), length 84) > 192.168.0.1 > 192.168.0.2: ICMP echo request, id 386, seq 1, length 64 > # ping -c1 192.168.0.2 -t 120 > IP (tos 0x0, ttl 119, id 62070, offset 0, flags [DF], proto ICMP (1), length 84) > 192.168.0.1 > 192.168.0.2: ICMP echo request, id 388, seq 1, length 64 > # ping -c1 192.168.0.2 -t 1 > # > > Co-developed-by: Bindiya Kurle > Signed-off-by: Bindiya Kurle > Signed-off-by: Matteo Croce Applied.