From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shmulik Ladkani Subject: Re: [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC Date: Mon, 15 Aug 2016 13:42:57 +0300 Message-ID: <20160815134257.7eb5b5d0@pixies> References: <20160814140652.15985-1-amir@vadai.me> <20160815071121.GA2024@nanopsycho> <20160815081740.GA19058@office.localdomain> <20160815090804.GB19058@office.localdomain> <20160815125039.07809d54@pixies> <20160815095809.GC19058@office.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Jiri Pirko , Cong Wang , John Fastabend , Jamal Hadi Salim , Jiri Pirko , Linux Kernel Network Developers , Or Gerlitz , Hadar Har-Zion , Oded Shanoon , Amir Vadai To: Amir Vadai Return-path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:33582 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752635AbcHOKnI (ORCPT ); Mon, 15 Aug 2016 06:43:08 -0400 Received: by mail-wm0-f65.google.com with SMTP id o80so10459535wme.0 for ; Mon, 15 Aug 2016 03:43:07 -0700 (PDT) In-Reply-To: <20160815095809.GC19058@office.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 15 Aug 2016 12:58:09 +0300, amir@vadai.me wrote: > On Mon, Aug 15, 2016 at 12:50:39PM +0300, Shmulik Ladkani wrote: > > On Mon, 15 Aug 2016 12:08:04 +0300, amir@vadai.me wrote: > > > > > > Any objection to the following? > > > > > > # ENCAP rule > > > tc filter add dev $ETH protocol ip parent ffff: prio 10 \ > > > flower ip_proto 1 \ > > > action set_tunnel_key src_ip 11.11.0.1 dst_ip 11.11.0.2 key_id 11 dst_port 4789 \ > > > > Ability to control few tun_flags (e.g. TUNNEL_CSUM, TUNNEL_DONT_FRAGMENT) > > might be useful too. > > I guess it should be added when needed. Currenly I don't have a use case > for that. Sure. > > > # DECAP rule > > > tc filter add dev $VXLAN protocol ip parent ffff: prio 10 \ > > > flower \ > > > enc_src_ip 11.11.0.2 enc_dst_ip 11.11.0.1 enc_key_id 11 \ > > > ip_proto 1 \ > > > > You might want to match the tunnel's udp port as well, for symmetry. > > actually, now that you raise it, the udp port is already an attribute of > the vxlan device. So I think it should be ommitted in both encap and > decap. Selecting the udp port will be done when creating the vxlan > device. Sounds better. Manual port override can be added if needed.