Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4118866ybv; Sun, 16 Feb 2020 14:23:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxpvTwBSzVYLg2qJucnrg46vfsUZAz0iVM+lPD3y3N5gVcqhPITcE2HM4+r12yetkFv9os8 X-Received: by 2002:a9d:7842:: with SMTP id c2mr9392912otm.252.1581891810485; Sun, 16 Feb 2020 14:23:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581891810; cv=none; d=google.com; s=arc-20160816; b=Q3askEDVyxDqChntIROsDz8pxZhj7Ph47Hcl+UI/XTJ3vCXXbR+z3rZlhsmOddWZ/l Tm8/OLbd0xzwf2Bcl+yJjgRCKAq0xJ3SF/Jb66+RXcXH83VD5Cv3snjlqKXHQfkhWQU+ 4qEGauI3sKMH/zL+lMIMDfGBbbrR0onZUnxYzDu9yJxNWne6MjudxegY42y2iBRH3oSA oIxVKQh2iiKgKvGO6DmfHVpGHJ1BleT0dK9xaYDAFR1rPCHOh4NWbRuYE6tTvQczn5MP lneIhYFwGSuBI1CQmqhzwKlo5kViK5YTx0VxQ7SCYWl7uHCHq+uAwpeL86/vVTt9qgeR fjPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=Y4ESkt7FUzCtCRLgRJWlJ9Ae750HDv2ooFbCy29n4Kc=; b=XZ1zpm21MyiK9LX5P3bAw/9UvqlmF6Z/HZ/hd0yXiRBSaOoRH9HLezOMhu+GwUcg8J 2SDfFGSzP+wauo00rfpJttcBKuBylhRQnVl9XnTNkbhfVXIbgj8FWmmEhs7VjTeSzGcm oBtwKiiqc4sSpqIW6O3Y89QxWjII7Oavei/cpVoTS+/ZGbkwgvePlsdq/lEQH2sFPhVq 7Nv4TUOaMI59ZycxRSNSpM3FBvrz4M86ExJ4HWVsWGQBfZoZiTGVAa3p+Jugw/Vbu6MR 02jBnk4nCuiIbmsie96nBuGlOKKY4tvyzza9E6hIldBu25oL2lh12Z/onJQL8//0B18Y r3mA== 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 k4si6645238otp.186.2020.02.16.14.22.45; Sun, 16 Feb 2020 14:23:30 -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 S1728003AbgBPWWR (ORCPT + 99 others); Sun, 16 Feb 2020 17:22:17 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:52125 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbgBPWWR (ORCPT ); Sun, 16 Feb 2020 17:22:17 -0500 X-Originating-IP: 209.85.222.43 Received: from mail-ua1-f43.google.com (mail-ua1-f43.google.com [209.85.222.43]) (Authenticated sender: pshelar@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 8CB781C0004; Sun, 16 Feb 2020 22:22:14 +0000 (UTC) Received: by mail-ua1-f43.google.com with SMTP id f7so5471468uaa.8; Sun, 16 Feb 2020 14:22:14 -0800 (PST) X-Gm-Message-State: APjAAAXOuO0FtgIz44XaZ5s7sSxC0Gag4k/bRYp9ZDN8KXc6i7bm1drZ yfKiiRnuPx9eCOwQkgrowMIJu/k8F4Ynorpg4yk= X-Received: by 2002:ab0:4753:: with SMTP id i19mr6353393uac.70.1581891733184; Sun, 16 Feb 2020 14:22:13 -0800 (PST) MIME-Version: 1.0 References: <20200215132056.42124-1-mcroce@redhat.com> In-Reply-To: <20200215132056.42124-1-mcroce@redhat.com> From: Pravin Shelar Date: Sun, 16 Feb 2020 14:22:02 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v5] openvswitch: add TTL decrement action To: Matteo Croce Cc: Linux Kernel Network Developers , ovs dev , LKML , "David S. Miller" , Bindiya Kurle , Simon Horman , Ben Pfaff , Nikolay Aleksandrov , Nicolas Dichtel , Jeremy Harris Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 15, 2020 at 5:21 AM 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, 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 > --- Thanks! Acked-by: Pravin B Shelar