[PATCH iproute2 V2 1/2] tc/cls_flower: Classify packet in ip tunnels

2016-11-28 Thread Amir Vadai
Introduce classifying by metadata extracted by the tunnel device. Outer header fields - source/dest ip and tunnel id, are extracted from the metadata when classifying. For example, the following will add a filter on the ingress Qdisc of shared vxlan device named 'vxlan0'. To forward packets with o

Re: [PATCH iproute2 V2 1/2] tc/cls_flower: Classify packet in ip tunnels

2016-11-29 Thread Stephen Hemminger
The overall design is fine, just a couple nits with the code. > diff --git a/tc/f_flower.c b/tc/f_flower.c > index 2d31d1aa832d..1cf0750b5b83 100644 > --- a/tc/f_flower.c > +++ b/tc/f_flower.c > > +static int flower_parse_key_id(char *str, int type, struct nlmsghdr *n) str is not modified, the

Re: [PATCH iproute2 V2 1/2] tc/cls_flower: Classify packet in ip tunnels

2016-11-29 Thread Amir Vadai
On Tue, Nov 29, 2016 at 07:26:58PM -0800, Stephen Hemminger wrote: > The overall design is fine, just a couple nits with the code. > > > diff --git a/tc/f_flower.c b/tc/f_flower.c > > index 2d31d1aa832d..1cf0750b5b83 100644 > > --- a/tc/f_flower.c > > +++ b/tc/f_flower.c > > > > > +static int f

Re: [PATCH iproute2 V2 1/2] tc/cls_flower: Classify packet in ip tunnels

2016-11-29 Thread Amir Vadai
On Wed, Nov 30, 2016 at 9:17 AM, Amir Vadai wrote: > On Tue, Nov 29, 2016 at 07:26:58PM -0800, Stephen Hemminger wrote: (Sending again since I just discovered that Google Inbox is adding an HTML part...) >> The overall design is fine, just a couple nits with the code. >> >> > diff --git a/tc/f_fl

Re: [PATCH iproute2 V2 1/2] tc/cls_flower: Classify packet in ip tunnels

2016-11-30 Thread Jiri Pirko
Wed, Nov 30, 2016 at 08:38:24AM CET, ami...@gmail.com wrote: >On Wed, Nov 30, 2016 at 9:17 AM Amir Vadai wrote: > >> On Tue, Nov 29, 2016 at 07:26:58PM -0800, Stephen Hemminger wrote: >> > The overall design is fine, just a couple nits with the code. >> > >> > > diff --git a/tc/f_flower.c b/tc/f_f