From: Jiri Pirko <jiri@resnulli.us>
To: Amir Vadai <amir@vadai.me>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
John Fastabend <john.fastabend@gmail.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@mellanox.com>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
Or Gerlitz <ogerlitz@mellanox.com>,
Hadar Har-Zion <hadarh@mellanox.com>,
Oded Shanoon <odeds@mellanox.com>,
Amir Vadai <amirva@mellanox.com>
Subject: Re: [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC
Date: Mon, 15 Aug 2016 11:48:12 +0200 [thread overview]
Message-ID: <20160815094812.GG2024@nanopsycho> (raw)
In-Reply-To: <20160815090804.GB19058@office.localdomain>
Mon, Aug 15, 2016 at 11:08:04AM CEST, amir@vadai.me wrote:
>On Mon, Aug 15, 2016 at 11:17:40AM +0300, Amir Vadai wrote:
>> On Mon, Aug 15, 2016 at 09:11:22AM +0200, Jiri Pirko wrote:
>> > Sun, Aug 14, 2016 at 07:53:30PM CEST, xiyou.wangcong@gmail.com wrote:
>> > >On Sun, Aug 14, 2016 at 7:06 AM, Amir Vadai <amir@vadai.me> wrote:
>> > >> tc qdisc add dev $ETH ingress
>> > >>
>> > >> # ENCAP rule for ARP
>> > >> tc filter add dev $ETH protocol 0x806 parent ffff: prio 11 \
>> > >> flower \
>> > >> action mirred egress redirect dev $VXLAN enc_src_ip 11.11.0.1 enc_dst_ip 11.11.0.2 enc_key_id 11 enc_dst_port 4789
>> > >>
>> > >> # ENCAP rule for ICMP
>> > >> tc filter add dev $ETH protocol ip parent ffff: prio 10 \
>> > >> flower ip_proto 1 \
>> > >> action mirred egress redirect dev $VXLAN enc_src_ip 11.11.0.1 enc_dst_ip 11.11.0.2 enc_key_id 11 enc_dst_port 4789
>> > >>
>> > >
>> > >I don't like this. This makes mirred action unnecessarily
>> > >complex, it should really just mirror or redirect packets as
>> > >it is, why it should be aware of tunnel information?
>> > >
>> > >I think you probably need to introduce a new tc action
>> > >for these tunnel information and pipe it to mirred.
>> >
>> > that is the first thing that I thinked of when I saw the patch. I think
>> > you can introduce act_vxlan similar to act_vlan.
>>
>> introducing a new action was the first thing I thought of, but it felt
>> problematic because the actual encap is done by the redirection to the
>> vxlan device. This action is only responsible to supply the metadata and
>> work tightly with the mirred. It is not exactly like vlan that the
>> push/pop actions can live without mirroring/redirecting.
>> But still as all of you said, it makes mirred complex with stuff that
>> shouldn't be there. And between the two options it is better to
>> introduce a new action.
>>
>> I will go in this direction.
>>
>> Thanks,
>> Amir
>
>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 \
Looks fine to me.
> action mirred egress redirect dev $VXLAN
>
># 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 \
> action mirred egress redirect dev $ETH
next prev parent reply other threads:[~2016-08-15 9:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-14 14:06 [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC Amir Vadai
2016-08-14 14:06 ` [RFC net-next 1/2] net/sched: cls_flower: Introduce classify by vxlan outer headers Amir Vadai
2016-08-14 14:06 ` [RFC net-next 2/2] net/sched: act_mirred: Introduce vxlan support Amir Vadai
2016-08-14 17:53 ` [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC Cong Wang
2016-08-15 5:05 ` John Fastabend
2016-08-15 7:11 ` Jiri Pirko
2016-08-15 8:17 ` Amir Vadai
2016-08-15 9:08 ` Amir Vadai
2016-08-15 9:48 ` Jiri Pirko [this message]
2016-08-15 9:50 ` Shmulik Ladkani
2016-08-15 9:58 ` Amir Vadai
2016-08-15 10:42 ` Shmulik Ladkani
2016-08-15 10:08 ` Jamal Hadi Salim
2016-08-15 10:24 ` Shmulik Ladkani
2016-08-15 10:41 ` Jamal Hadi Salim
2016-08-15 11:36 ` Amir Vadai
2016-08-15 16:35 ` John Fastabend
2016-08-15 12:34 ` Jiri Pirko
2016-08-15 12:59 ` Amir Vadai
2016-08-15 16:37 ` John Fastabend
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160815094812.GG2024@nanopsycho \
--to=jiri@resnulli.us \
--cc=amir@vadai.me \
--cc=amirva@mellanox.com \
--cc=hadarh@mellanox.com \
--cc=jhs@mojatatu.com \
--cc=jiri@mellanox.com \
--cc=john.fastabend@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=odeds@mellanox.com \
--cc=ogerlitz@mellanox.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox