Re: [PATCH net] net/act_pedit: fix an error code

2017-06-14 Thread Amir Vadai
ediately see that problem here. > > Fixes: 71d0ed7079df ("net/act_pedit: Support using offset relative to the > conventional network headers") > Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> > You are right, it was intended to be -EINVAL. Thanks. Acked-by: Amir Vadai <a...@vadai.me>

[PATCH iproute2 master 3/4] pedit: Check for extended capability in protocol parser

2017-05-14 Thread Amir Vadai
Do not allow using eth and udp header types if non-extended pedit kABI is being used. Other protocol parsers already have this check. Signed-off-by: Amir Vadai <a...@vadai.me> --- tc/p_eth.c | 3 +++ tc/p_udp.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tc/p_eth.c b/tc/p_eth.c

[PATCH iproute2 master 2/4] pedit: Do not allow using retain for too big fields

2017-05-14 Thread Amir Vadai
Using retain for fields longer than 32 bits is not supported. Do not allow user to do it. Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-pedit.8 | 3 ++- tc/m_pedit.c| 6 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/man/man8/tc-pedit.8 b/man/m

[PATCH iproute2 master 1/4] pedit: Fix a typo in warning

2017-05-14 Thread Amir Vadai
'ex' attribute should be placed after 'action pedit' and not after 'munge'. Signed-off-by: Amir Vadai <a...@vadai.me> --- tc/m_pedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_pedit.c b/tc/m_pedit.c index 6498dd91b471..7ef2acc52bce 100644 --- a/tc/m_pedit.c

[PATCH iproute2 master 4/4] pedit: Introduce ipv6 support

2017-05-14 Thread Amir Vadai
Add support for modifying IPv6 headers using pedit. Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-pedit.8 | 30 ++ tc/Makefile | 1 + tc/m_pedit.c| 43 +++-- tc/p_ip.c | 17 +- tc/p_ip6.c

[PATCH iproute2 master 0/4] pedit: Introduce IPv6 support + some minor fixes

2017-05-14 Thread Amir Vadai
ope of this patchset. So I added a patch to prevent the user from using retain on those fields. Thanks, Amir Amir Vadai (4): pedit: Fix a typo in warning pedit: Do not allow using retain for too big fields pedit: Check for extended capability in protocol parser pedit: Introduce i

Re: [PATCH iproute2 net 0/8] tc/act_pedit: Support offset relative to conventional header

2017-05-03 Thread Amir Vadai
On Mon, May 01, 2017 at 09:26:25AM -0700, Stephen Hemminger wrote: > On Sun, 23 Apr 2017 15:53:48 +0300 > Amir Vadai <a...@vadai.me> wrote: > > > Hi Stephen, > > > > This patchset extends pedit to support modifying a field in an offset > > relative

Re: [PATCH iproute2 net 3/8] tc/pedit: Introduce 'add' operation

2017-04-24 Thread Amir Vadai
On Sun, Apr 23, 2017 at 01:44:51PM -0400, Jamal Hadi Salim wrote: > > Thanks for the excellent work. > > On 17-04-23 08:53 AM, Amir Vadai wrote: > > This command could be useful to increase/decrease fields value. > > > > Does this contradict the "retain

[PATCH iproute2 net 8/8] tc/pedit: p_udp: introduce pedit udp support

2017-04-23 Thread Amir Vadai
et 888 \ action mirred egress \ redirect dev veth0 Signed-off-by: Or Gerlitz <ogerl...@mellanox.com> Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-pedit.8 | 18 ++ tc/p_udp.c | 27 +++ 2 files changed, 45 insertions(+) dif

[PATCH iproute2 net 7/8] tc/pedit: p_tcp: introduce pedit tcp support

2017-04-23 Thread Amir Vadai
veth0 Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-pedit.8 | 23 +++ tc/p_tcp.c | 37 + 2 files changed, 60 insertions(+) diff --git a/man/man8/tc-pedit.8 b/man/man8/tc-pedit.8 index 8febdfe23f6e..ad1929592660

[PATCH iproute2 net 5/8] tc/pedit: Support fields bigger than 32 bits

2017-04-23 Thread Amir Vadai
Make parse_val() accept fields up to 128 bits long, this should be enough for current use cases and involves a minimal change to code. Signed-off-by: Amir Vadai <a...@vadai.me> --- tc/m_pedit.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tc/m_pedit.

[PATCH iproute2 net 6/8] tc/pedit: p_eth: ETH header editor

2017-04-23 Thread Amir Vadai
veth0 Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-pedit.8 | 24 ++ tc/Makefile | 1 + tc/m_pedit.c| 46 ++ tc/m_pedit.h| 1 + tc/p_eth.c | 72 ++

[PATCH iproute2 net 0/8] tc/act_pedit: Support offset relative to conventional header

2017-04-23 Thread Amir Vadai
twork headers") Amir Vadai (7): tc/pedit: Fix a typo in pedit usage message tc/pedit: Extend pedit to specify offset relative to mac/transport headers tc/pedit: Introduce 'add' operation tc/pedit: p_ip: introduce editing ttl header tc/pedit: Support fields bigger than 32 bits

[PATCH iproute2 net 3/8] tc/pedit: Introduce 'add' operation

2017-04-23 Thread Amir Vadai
This command could be useful to increase/decrease fields value. Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-pedit.8 | 13 - tc/m_pedit.c| 18 +++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/man/man8/tc-pedit.8 b/man/m

[PATCH iproute2 net 4/8] tc/pedit: p_ip: introduce editing ttl header

2017-04-23 Thread Amir Vadai
dev veth0 Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-pedit.8 | 17 + tc/p_ip.c | 6 ++ 2 files changed, 23 insertions(+) diff --git a/man/man8/tc-pedit.8 b/man/man8/tc-pedit.8 index 6bba741956f1..c98d95cb0021 100644 --- a/man/man8/tc-pedit.8 +++

[PATCH iproute2 net 2/8] tc/pedit: Extend pedit to specify offset relative to mac/transport headers

2017-04-23 Thread Amir Vadai
add dev ens9 protocol ip parent : \ flower \ ip_proto udp \ dst_port 80 \ action pedit ex munge \ ip dst set 1.1.1.1 \ pipe \ action mirred egress redirect dev veth0 Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-pedit.8 | 41 +++-

[PATCH iproute2 net 1/8] tc/pedit: Fix a typo in pedit usage message

2017-04-23 Thread Amir Vadai
Signed-off-by: Amir Vadai <a...@vadai.me> --- tc/m_pedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_pedit.c b/tc/m_pedit.c index 8e9bf0720dfe..939a6a1455a5 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.c @@ -40,7 +40,7 @@ static void explain(void)

[PATCH net-next V3 1/3] net/skbuff: Introduce skb_mac_offset()

2017-02-06 Thread Amir Vadai
Introduce skb_mac_offset() that could be used to get mac header offset. Signed-off-by: Amir Vadai <a...@vadai.me> Reviewed-by: Or Gerlitz <ogerl...@mellanox.com> --- include/linux/skbuff.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/skbuff.h b/include/li

[PATCH net-next V3 2/3] net/act_pedit: Support using offset relative to the conventional network headers

2017-02-06 Thread Amir Vadai
ing the destination port to 8080. Signed-off-by: Amir Vadai <a...@vadai.me> Reviewed-by: Or Gerlitz <ogerl...@mellanox.com> --- include/net/tc_act/tc_pedit.h| 5 + include/uapi/linux/tc_act/tc_pedit.h | 23 net/sched/act_pedit.c| 196 +

[PATCH net-next V3 0/3] net/sched: act_pedit: Use offset relative to conventional network headers

2017-02-06 Thread Amir Vadai
y hardware drivers to offload the action. Amir Vadai (3): net/skbuff: Introduce skb_mac_offset() net/act_pedit: Support using offset relative to the conventional network headers net/act_pedit: Introduce 'add' operation include/linux/skbuff.h | 5 + include/net/tc_act/

[PATCH net-next V3 3/3] net/act_pedit: Introduce 'add' operation

2017-02-06 Thread Amir Vadai
above, adding 0xff to this u8 field is actually decreasing it by one, since the operation is masked. Signed-off-by: Amir Vadai <a...@vadai.me> Reviewed-by: Or Gerlitz <ogerl...@mellanox.com> --- include/net/tc_act/tc_pedit.h| 1 + include/uapi/linux/tc_act/tc_pedit.h | 8 +

Re: [PATCH net-next V2 0/3] net/sched: act_pedit: Use offset relative to conventional network headers

2017-01-08 Thread Amir Vadai
On Fri, Jan 06, 2017 at 08:51:09PM -0500, David Miller wrote: > From: Amir Vadai <a...@vadai.me> > Date: Thu, 5 Jan 2017 11:54:51 +0200 > > > Enhancing the UAPI to allow for specifying that would allow the same > > flows to be set into both SW and HW. > &

Re: [PATCH net-next V2 0/3] net/sched: act_pedit: Use offset relative to conventional network headers

2017-01-05 Thread Amir Vadai
On Thu, Jan 05, 2017 at 12:54:14PM +0100, Jiri Benc wrote: > On Thu, 5 Jan 2017 11:54:51 +0200, Amir Vadai wrote: > > You asked me [1] why did I use specific header names instead of layers (L2, > > L3...), > > and I explained that it is on purpose, this extra i

[PATCH net-next V2 3/3] net/act_pedit: Introduce 'add' operation

2017-01-05 Thread Amir Vadai
: \ flower ip_proto tcp \ action pedit munge ip ttl add 0xff pipe \ action mirred egress redirect dev veth0 In the example above, adding 0xff to this u8 field is actually decreasing it by one, since the operation is masked. Signed-off-by: Amir Vadai <a...@vadai.me> Reviewed-by: Or G

[PATCH net-next V2 0/3] net/sched: act_pedit: Use offset relative to conventional network headers

2017-01-05 Thread Amir Vadai
/iproute2.git branch: pedit Patchset was tested and applied on top of upstream commit 57ea884b0dcf ("packet: fix panic in __packet_set_timestamp on tpacket_v3 in tx mode") Thanks, Amir Amir Vadai (3): net/skbuff: Introduce skb_mac_offset() net/act_pedit: Support using offse

[PATCH net-next V2 2/3] net/act_pedit: Support using offset relative to the conventional network headers

2017-01-05 Thread Amir Vadai
tcp dport set 8080 pipe \ action mirred egress redirect dev veth0 Will forward tcp port whose original dest port is 80, while modifying the destination port to 8080. Signed-off-by: Amir Vadai <a...@vadai.me> Reviewed-by: Or Gerlitz <ogerl...@mellanox.com> --- include/uapi/linux/tc

[PATCH net-next V2 1/3] net/skbuff: Introduce skb_mac_offset()

2017-01-05 Thread Amir Vadai
Introduce skb_mac_offset() that could be used to get mac header offset. Signed-off-by: Amir Vadai <a...@vadai.me> Reviewed-by: Or Gerlitz <ogerl...@mellanox.com> --- include/linux/skbuff.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/skbuff.h b/include/li

[PATCH iproute2 V5 0/3] tc: Support for ip tunnel metadata set/unset/classify

2016-12-02 Thread Amir Vadai
unnel action") commit log and the man page tc-tunnel_key to reflect the fact that 'unset' operation is no mandatory. And describe when it might be needed. - Rename the 'release' operation to 'unset' Amir Vadai (3): libnetlink: Introduce rta_getattr_be*() tc/cls_flower: Clas

[PATCH iproute2 V5 3/3] tc/act_tunnel: Introduce ip tunnel action

2016-12-02 Thread Amir Vadai
redirect dev vxlan0 Signed-off-by: Amir Vadai <a...@vadai.me> --- include/linux/tc_act/tc_tunnel_key.h | 42 ++ man/man8/tc-tunnel_key.8 | 112 +++ tc/Makefile | 1 + tc/m_tunnel_key.c| 258

[PATCH iproute2 V5 2/3] tc/cls_flower: Classify packet in ip tunnels

2016-12-02 Thread Amir Vadai
mirred egress redirect dev vnet0 Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-flower.8 | 17 ++- tc/f_flower.c| 82 ++-- 2 files changed, 95 insertions(+), 4 deletions(-) diff --git a/man/man8/tc-flower.8 b/man/m

[PATCH iproute2 V5 1/3] libnetlink: Introduce rta_getattr_be*()

2016-12-02 Thread Amir Vadai
Add the utility functions rta_getattr_be16() and rta_getattr_be32(), and change existing code to use it. Signed-off-by: Amir Vadai <a...@vadai.me> --- bridge/fdb.c | 4 ++-- include/libnetlink.h | 9 + ip/iplink_geneve.c | 2 +- ip/iplink_vxlan.c| 2 +- tc/f_fl

Re: [PATCH net-next 2/3] net/act_pedit: Support using offset relative to the conventional network headers

2016-12-02 Thread Amir Vadai
On Thu, Dec 01, 2016 at 02:41:14PM -0500, David Miller wrote: > From: Amir Vadai <a...@vadai.me> > Date: Wed, 30 Nov 2016 11:09:27 +0200 > > > @@ -119,18 +119,45 @@ static bool offset_valid(struct sk_buff *skb, int > > offset) > > return t

[PATCH iproute2 V4 2/3] tc/cls_flower: Classify packet in ip tunnels

2016-12-01 Thread Amir Vadai
mirred egress redirect dev vnet0 Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-flower.8 | 17 ++- tc/f_flower.c| 84 +--- 2 files changed, 96 insertions(+), 5 deletions(-) diff --git a/man/man8/tc-flower.8 b/man/m

[PATCH iproute2 V4 0/3] tc: Support for ip tunnel metadata set/unset/classify

2016-12-01 Thread Amir Vadai
ration is no mandatory. And describe when it might be needed. - Rename the 'release' operation to 'unset' Amir Vadai (3): libnetlink: Introduce rta_getattr_be*() tc/cls_flower: Classify packet in ip tunnels tc/act_tunnel: Introduce ip tunnel action bridge/fdb.c

[PATCH iproute2 V4 1/3] libnetlink: Introduce rta_getattr_be*()

2016-12-01 Thread Amir Vadai
Add the utility functions rta_getattr_be16() and rta_getattr_be32(), and change existing code to use it. Signed-off-by: Amir Vadai <a...@vadai.me> --- bridge/fdb.c | 4 ++-- include/libnetlink.h | 9 + ip/iplink_geneve.c | 2 +- ip/iplink_vxlan.c| 2 +- 4 files chang

[PATCH iproute2 V4 3/3] tc/act_tunnel: Introduce ip tunnel action

2016-12-01 Thread Amir Vadai
redirect dev vxlan0 Signed-off-by: Amir Vadai <a...@vadai.me> --- include/linux/tc_act/tc_tunnel_key.h | 42 ++ man/man8/tc-tunnel_key.8 | 112 +++ tc/Makefile | 1 + tc/m_tunnel_key.c| 258

Re: [PATCH iproute2 V3 3/3] tc/act_tunnel: Introduce ip tunnel action

2016-12-01 Thread Amir Vadai
On Wed, Nov 30, 2016 at 03:44:53PM +0100, Jiri Benc wrote: > On Wed, 30 Nov 2016 09:38:40 +0200, Amir Vadai wrote: > > +The > > +.I UNSET > > +mode is optional - even without using it, the metadata information will be > > +released automatically when packet processing

[PATCH net-next 2/3] net/act_pedit: Support using offset relative to the conventional network headers

2016-11-30 Thread Amir Vadai
dit munge tcp dport set 8080 pipe \ action mirred egress redirect dev veth0 Will forward traffic to tcp port 80, and modify the destination port to 8080. hange-Id: Ibd7bbbe0b8c2f6adae0591868bb6892c55e75732 Signed-off-by: Amir Vadai <a...@vadai.me> --- include/uapi/linux/tc_act/tc_ped

[PATCH net-next 3/3] net/act_pedit: Introduce 'add' operation

2016-11-30 Thread Amir Vadai
above, adding 0xff to this u8 field is actually decreasing it by one, since the operation is masked. Signed-off-by: Amir Vadai <a...@vadai.me> --- include/uapi/linux/tc_act/tc_pedit.h | 10 ++ net/sched/act_pedit.c| 16 +++- 2 files changed, 25 insertions

[PATCH net-next 0/3] net/sched: act_pedit: Support using offset relative to the conventional network headers

2016-11-30 Thread Amir Vadai
mit 93ba5504 ("hv_netvsc: remove excessive logging on MTU change"). [1] - 95c2027bfeda ("net/sched: pedit: make sure that offset is valid") [2] - git: https://bitbucket.org/av42/iproute2.git branch: pedit Thanks, Amir Amir Vadai (3): net/skbuff: Introduce skb_mac

[PATCH net-next 1/3] net/skbuff: Introduce skb_mac_offset()

2016-11-30 Thread Amir Vadai
Introduce skb_mac_offset() that could be used to get mac header offset. Signed-off-by: Amir Vadai <a...@vadai.me> --- include/linux/skbuff.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 9c535fbccf2c..395eb5111df0

[PATCH iproute2 V3 2/3] tc/cls_flower: Classify packet in ip tunnels

2016-11-29 Thread Amir Vadai
mirred egress redirect dev vnet0 Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-flower.8 | 17 ++- tc/f_flower.c| 84 +--- 2 files changed, 96 insertions(+), 5 deletions(-) diff --git a/man/man8/tc-flower.8 b/man/m

[PATCH iproute2 V3 3/3] tc/act_tunnel: Introduce ip tunnel action

2016-11-29 Thread Amir Vadai
redirect dev vxlan0 Signed-off-by: Amir Vadai <a...@vadai.me> --- include/linux/tc_act/tc_tunnel_key.h | 42 ++ man/man8/tc-tunnel_key.8 | 113 +++ tc/Makefile | 1 + tc/m_tunnel_key.c| 258

[PATCH iproute2 V3 0/3] tc: Support for ip tunnel metadata set/unset/classify

2016-11-29 Thread Amir Vadai
'release' operation to 'unset' Amir Vadai (3): libnetlink: Introduce rta_getattr_be*() tc/cls_flower: Classify packet in ip tunnels tc/act_tunnel: Introduce ip tunnel action bridge/fdb.c | 4 +- include/libnetlink.h | 9 ++ include/linux/tc_act/tc

[PATCH iproute2 V3 1/3] libnetlink: Introduce rta_getattr_be*()

2016-11-29 Thread Amir Vadai
Add the utility functions rta_getattr_be16() and rta_getattr_be32(), and change existing code to use it. Signed-off-by: Amir Vadai <a...@vadai.me> --- bridge/fdb.c | 4 ++-- include/libnetlink.h | 9 + ip/iplink_geneve.c | 2 +- ip/iplink_vxlan.c| 2 +- 4 files chang

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 <a...@vadai.me> 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 cod

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

Re: [PATCH net V2] net/sched: pedit: make sure that offset is valid

2016-11-29 Thread Amir Vadai
field. Please use bottom posting when replying to mails... > > On Tue, Nov 29, 2016 at 3:14 PM, Amir Vadai <a...@vadai.me> wrote: > > On Tue, Nov 29, 2016 at 10:32:05AM +0800, zhuyj wrote: > >> + if (offset > 0 && offset > skb->len) > >

Re: [PATCH net V2] net/sched: pedit: make sure that offset is valid

2016-11-28 Thread Amir Vadai
0xff...>10 > > On Mon, Nov 28, 2016 at 6:56 PM, Amir Vadai <a...@vadai.me> wrote: > > Add a validation function to make sure offset is valid: > > 1. Not below skb head (could happen when offset is negative). > > 2. Validate both 'offset' and 'at'. > > > >

Re: [patch net] sched: cls_flower: remove from hashtable only in case skip sw flag is not set

2016-11-28 Thread Amir Vadai"
ce support in SKIP SW > flag") > Signed-off-by: Jiri Pirko <j...@mellanox.com> > --- Reviewed-by: Amir Vadai <a...@vadai.me>

[PATCH iproute2 V2 2/2] tc/act_tunnel: Introduce ip tunnel action

2016-11-28 Thread Amir Vadai
redirect dev vxlan0 Signed-off-by: Amir Vadai <a...@vadai.me> --- include/linux/tc_act/tc_tunnel_key.h | 42 ++ man/man8/tc-tunnel_key.8 | 113 +++ tc/Makefile | 1 + tc/m_tunnel_key.c| 259

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

2016-11-28 Thread Amir Vadai
mirred egress redirect dev vnet0 Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-flower.8 | 17 ++- tc/f_flower.c| 85 ++-- 2 files changed, 98 insertions(+), 4 deletions(-) diff --git a/man/man8/tc-flower.8 b/man/m

[PATCH iproute2 V2 0/2] tc/cls_flower: Support for ip tunnel metadata set/unset/classify

2016-11-28 Thread Amir Vadai
commit log and the man page tc-tunnel_key to reflect the fact that 'unset' operation is no mandatory. And describe when it might be needed. - Rename the 'release' operation to 'unset' Amir Vadai (2): tc/cls_flower: Classify packet in ip tunnels tc/act_tunnel: Introduce ip

[PATCH net V2] net/sched: pedit: make sure that offset is valid

2016-11-28 Thread Amir Vadai
Add a validation function to make sure offset is valid: 1. Not below skb head (could happen when offset is negative). 2. Validate both 'offset' and 'at'. Signed-off-by: Amir Vadai <a...@vadai.me> --- Hi Dave, Please pull to -stable branches. Changes from V0: - Add a validation to the 'at'

Re: [PATCH net] net/sched: act_pedit: limit negative offset

2016-11-27 Thread Amir Vadai"
On Mon, Nov 28, 2016 at 12:49:36AM -0500, David Miller wrote: > From: Cong Wang <xiyou.wangc...@gmail.com> > Date: Sun, 27 Nov 2016 21:39:33 -0800 > > > On Sun, Nov 27, 2016 at 7:58 AM, Amir Vadai <a...@vadai.me> wrote: > >> Should not allow setting a negative

[PATCH net] net/sched: act_pedit: limit negative offset

2016-11-27 Thread Amir Vadai
Should not allow setting a negative offset that goes below the skb head. Signed-off-by: Amir Vadai <a...@vadai.me> --- Hi Dave, Please pull to -stable branches. Thanks, Amir net/sched/act_pedit.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/sched/act_ped

Re: [PATCH iproute2 0/2] tc/cls_flower: Support for ip tunnel metadata set/release/classify

2016-11-27 Thread Amir Vadai
On Thu, Nov 24, 2016 at 04:33:55PM +0100, Jiri Benc wrote: > On Thu, 24 Nov 2016 17:06:33 +0200, Amir Vadai wrote: > > So you mean to just unconditionally call skb_dst_drop() from > > act_mirred()? > > That's one option. Or just leave the dst there, it shouldn't matter? >

Re: [PATCH iproute2 0/2] tc/cls_flower: Support for ip tunnel metadata set/release/classify

2016-11-24 Thread Amir Vadai
On Thu, Nov 24, 2016 at 02:38:56PM +0100, Jiri Benc wrote: > On Mon, 21 Nov 2016 12:20:54 +0200, Amir Vadai wrote: > > $ tc filter add dev vxlan0 protocol ip parent : \ > > flower \ > > enc_src_ip 11.11.0.2 \ > > enc_dst_ip 11.11.0.1 \ > >

Re: [PATCH iproute2 2/2] tc/act_tunnel: Introduce ip tunnel action

2016-11-21 Thread Amir Vadai
On Mon, Nov 21, 2016 at 11:50:03PM +, Rosen, Rami wrote: > Hi, Amir, > > Following are three minor comments: > > Seems that TCA_TUNNEL_KEY_PAD used anywhere: I assume you ment that it is _NOT_ used anywhere: This attribute type is used in the kernel side only - for padding 64bit attributes.

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

2016-11-21 Thread Amir Vadai
\ dst_ip 11.11.11.1 \ action tunnel_key release \ action mirred egress redirect dev vnet0 The action tunnel_key, will be introduced in the next patch in this series. Signed-off-by: Amir Vadai <a...@vadai.me> --- man/man8/tc-flower.8 | 17 ++- tc/f_flower.c

[PATCH iproute2 2/2] tc/act_tunnel: Introduce ip tunnel action

2016-11-21 Thread Amir Vadai
\ ip_proto 1 \ dst_ip 11.11.11.2 \ action tunnel_key set \ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 Signed-off-by: Amir Vadai <a...@vadai.me> --- include/linux/tc_act/tc_tunnel_key.h | 42 ++ man/m

[PATCH iproute2 0/2] tc/cls_flower: Support for ip tunnel metadata set/release/classify

2016-11-21 Thread Amir Vadai
dst_ip 11.11.11.2 \ action tunnel_key set \ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 [1] - d1ba24feb466 ("Merge branch 'act_tunnel_key'") Thanks, Amir Amir Vadai (2): tc/cls_flower: Classify packet in ip tun

Re: [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified.

2016-10-19 Thread Amir Vadai
For stripped vlan, get vlan info from >> skb->vlan_tci") >> Signed-off-by: Eric Garver <e...@erig.me> > > Dave, > > Hadar is OOO and I have asked Amir to look on the fix, will appreciate > if we can have 24 hours to respond > > Or. Reviewed and tested. Acked-by: Amir Vadai <a...@vadai.me>

Re: [PATCH net-next] net/sched: cls_flower: Use a proper mask value for enc key id parameter

2016-09-27 Thread Amir Vadai"
> Signed-off-by: Hadar Hen Zion <had...@mellanox.com> > --- Acked-by: Amir Vadai <a...@vadai.me>

Re: [PATCH net-next V3 4/4] net/sched: Introduce act_tunnel_key

2016-08-30 Thread Amir Vadai
On Tue, Aug 30, 2016 at 08:05:03AM -0400, Jamal Hadi Salim wrote: > On 16-08-30 07:03 AM, Amir Vadai wrote: > > On Sun, Aug 28, 2016 at 10:04:21PM -0700, Cong Wang wrote: > > > On Fri, Aug 26, 2016 at 12:16 PM, Eric Dumazet <eric.duma...@gmail.com> > > > wrote: &g

Re: [PATCH net-next V3 4/4] net/sched: Introduce act_tunnel_key

2016-08-30 Thread Amir Vadai
On Tue, Aug 30, 2016 at 02:03:08PM +0300, Amir Vadai wrote: > On Sun, Aug 28, 2016 at 10:04:21PM -0700, Cong Wang wrote: > > On Fri, Aug 26, 2016 at 12:16 PM, Eric Dumazet <eric.duma...@gmail.com> > > wrote: > > > On Fri, 2016-08-26 at 11:26 -0700, Cong W

Re: [PATCH net-next V3 4/4] net/sched: Introduce act_tunnel_key

2016-08-30 Thread Amir Vadai
On Sun, Aug 28, 2016 at 10:04:21PM -0700, Cong Wang wrote: > On Fri, Aug 26, 2016 at 12:16 PM, Eric Dumazet wrote: > > On Fri, 2016-08-26 at 11:26 -0700, Cong Wang wrote: > >> 1) Currently there are only a few actions using lockless, and they are > >> questionable, as we

[PATCH net-next V2 3/4] net/sched: cls_flower: Classify packet in ip tunnels

2016-08-24 Thread Amir Vadai
11.11.11.1 \ action tunnel_key release \ action mirred egress redirect dev vnet0 The action tunnel_key, will be introduced in the next patch in this series. Signed-off-by: Amir Vadai <a...@vadai.me> --- include/uapi/linux/pkt_cls.h | 11 ++ net/sched/cls_flower.c

[PATCH net-next V2 2/4] net/dst: Utility functions to build dst_metadata without supplying an skb

2016-08-24 Thread Amir Vadai
Extract _ip_tun_rx_dst() and _ipv6_tun_rx_dst() out of ip_tun_rx_dst() and ipv6_tun_rx_dst(), to be used without supplying an skb. Signed-off-by: Amir Vadai <a...@vadai.me> --- include/net/dst_metadata.h | 45 - 1 file changed, 32 insertions(

[PATCH net-next V2 4/4] net/sched: Introduce act_tunnel_key

2016-08-24 Thread Amir Vadai
\ ip_proto 1 \ dst_ip 11.11.11.2 \ action tunnel_key set\ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 Signed-off-by: Amir Vadai <a...@vadai.me> --- include/net/tc_act/tc_tunnel_key.h| 25 +++ include/uapi

[PATCH net-next V2 0/4] net/sched: ip tunnel metadata set/release/classify by using TC

2016-08-24 Thread Amir Vadai
grep-ability of code - Reuse code from ip_tun_rx_dst() and ipv6_tun_rx_dst() Changes from RFC: - Add a new action instead of making mirred too complex - No need to specify UDP port in action - it is already in the tunnel device configuration - Added a decap operation to drop tunnel metadata

[PATCH net-next V2 1/4] net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id()

2016-08-24 Thread Amir Vadai
Add utility functions to convert a 32 bits key into a 64 bits tunnel and vice versa. These functions will be used instead of cloning code in GRE and VXLAN, and in tc act_iptunnel which will be introduced in a following patch in this patchset. Signed-off-by: Amir Vadai <a...@vadai.me> --- d

Re: [PATCH net-next 3/3] net/sched: Introduce act_iptunnel

2016-08-23 Thread Amir Vadai
On Tue, Aug 23, 2016 at 08:37:07AM -0400, Jamal Hadi Salim wrote: > On 16-08-22 10:38 AM, Amir Vadai wrote: > > This action could be used before redirecting packets to a shared tunnel > > device, or when redirecting packets arriving from a such a device > > > &

Re: [PATCH net-next 3/3] net/sched: Introduce act_iptunnel

2016-08-23 Thread Amir Vadai
On Tue, Aug 23, 2016 at 05:33:49PM +0200, Jiri Benc wrote: > On Tue, 23 Aug 2016 18:28:05 +0300, Amir Vadai wrote: > > On Mon, Aug 22, 2016 at 08:51:37PM +0200, Jiri Benc wrote: > > > 2. We may run into problems like tx path seeing the metadata_dst that > > >it

Re: [PATCH net-next 3/3] net/sched: Introduce act_iptunnel

2016-08-23 Thread Amir Vadai
On Mon, Aug 22, 2016 at 08:51:37PM +0200, Jiri Benc wrote: > On Mon, 22 Aug 2016 21:15:41 +0300, Or Gerlitz wrote: > > Jiri B > I understand the motivation for the decap action. However, what > > would > > Jiri B > happen if someone does not include it? > > > > The MD set by the (say) vxlan

Re: [PATCH net-next 0/3] net/sched: iptunnel encap/decap/classify using TC

2016-08-23 Thread Amir Vadai
On Mon, Aug 22, 2016 at 03:23:45PM -0700, Tom Herbert wrote: > On Mon, Aug 22, 2016 at 7:38 AM, Amir Vadai <a...@vadai.me> wrote: > > Hi, > > > > This patchset introduces iptunnel support using the TC subsystem. > > > > In the decap flow, it enables the

Re: [PATCH net-next 3/3] net/sched: Introduce act_iptunnel

2016-08-23 Thread Amir Vadai
On Mon, Aug 22, 2016 at 08:57:06PM +0300, Shmulik Ladkani wrote: > Hi, > > On Mon, 22 Aug 2016 17:38:34 +0300 Amir Vadai <a...@vadai.me> wrote: > > +static struct metadata_dst *iptunnel_alloc(struct tcf_iptunnel *t, > > +

Re: [PATCH net-next 1/3] net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id()

2016-08-23 Thread Amir Vadai
On Mon, Aug 22, 2016 at 07:00:27PM +0200, Jiri Benc wrote: > While cleaning this up, you may as well take the best of both > implementations. > > On Mon, 22 Aug 2016 17:38:32 +0300, Amir Vadai wrote: > > +static inline __be64 key32_to_tunnel_id(__be32 key) > > +{

[PATCH net-next 3/3] net/sched: Introduce act_iptunnel

2016-08-22 Thread Amir Vadai
\ ip_proto 1 \ dst_ip 11.11.11.2 \ action iptunnel encap \ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 Signed-off-by: Amir Vadai <a...@vadai.me> --- include/net/tc_act/tc_iptunnel.h| 24 +++ include/uapi/linux/

[PATCH net-next 0/3] net/sched: iptunnel encap/decap/classify using TC

2016-08-22 Thread Amir Vadai
on. Amir Changes from RFC: - Add a new action instead of making mirred too complex - No need to specify UDP port in action - it is already in the tunnel device configuration - Added a decap operation to drop tunnel metadata Amir Vadai (3): net/ip_tunnels: Introduce tunnel_id_to_key32

[PATCH net-next 1/3] net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id()

2016-08-22 Thread Amir Vadai
Add utility functions to convert a 32 bits key into a 64 bits tunnel and vice versa. These functions will be used instead of cloning code in GRE and VXLAN, and in tc act_iptunnel which will be introduced in a following patch in this patchset. Signed-off-by: Amir Vadai <a...@vadai.me> --- d

[PATCH net-next 2/3] net/sched: cls_flower: Classify packet in ip tunnels

2016-08-22 Thread Amir Vadai
11.11.11.1 \ action iptunnel decap \ action mirred egress redirect dev vnet0 The action iptunnel, will be introduced in the next patch in this series. Signed-off-by: Amir Vadai <a...@vadai.me> --- include/uapi/linux/pkt_cls.h | 11 + net/sched/cls_flower.c

Re: [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC

2016-08-15 Thread Amir Vadai
On Mon, Aug 15, 2016 at 02:34:00PM +0200, Jiri Pirko wrote: > Mon, Aug 15, 2016 at 12:08:10PM CEST, j...@mojatatu.com wrote: > >On 16-08-15 05:08 AM, Amir Vadai wrote: > >> On Mon, Aug 15, 2016 at 11:17:40AM +0300, Amir Vadai wrote: > >> > On Mon, Aug 15, 2016 at 09:1

Re: [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC

2016-08-15 Thread Amir Vadai
On Mon, Aug 15, 2016 at 06:41:14AM -0400, Jamal Hadi Salim wrote: > On 16-08-15 06:24 AM, Shmulik Ladkani wrote: > > On Mon, 15 Aug 2016 06:08:10 -0400, j...@mojatatu.com wrote: > > > > Assuming $VXLAN is actually not a linux netdev of type vxlan? > > > then the action does vxlan encap redirect

Re: [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC

2016-08-15 Thread Amir Vadai
On Mon, Aug 15, 2016 at 12:50:39PM +0300, Shmulik Ladkani wrote: > On Mon, 15 Aug 2016 12:08:04 +0300, a...@vadai.me wrote: > > > > Any objection to the following? > > > > # ENCAP rule > > tc filter add dev $ETH protocol ip parent : prio 10 \ > > flower ip_proto 1 \ > >

Re: [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC

2016-08-15 Thread Amir Vadai
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.wangc...@gmail.com wrote: > > >On Sun, Aug 14, 2016 at 7:06 AM, Amir Vadai <a...@vadai.me> wrote: >

Re: [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC

2016-08-15 Thread Amir Vadai
On Mon, Aug 15, 2016 at 09:11:22AM +0200, Jiri Pirko wrote: > Sun, Aug 14, 2016 at 07:53:30PM CEST, xiyou.wangc...@gmail.com wrote: > >On Sun, Aug 14, 2016 at 7:06 AM, Amir Vadai <a...@vadai.me> wrote: > >> tc qdisc add dev $ETH ingress > >> > >> # ENCA

[RFC net-next 2/2] net/sched: act_mirred: Introduce vxlan support

2016-08-14 Thread Amir Vadai
From: Amir Vadai <ami...@mellanox.com>> Signed-off-by: Amir Vadai <ami...@mellanox.com>> --- include/net/tc_act/tc_mirred.h| 5 +++ include/uapi/linux/tc_act/tc_mirred.h | 7 net/sched/act_mirred.c| 79 +++ 3

[RFC net-next 1/2] net/sched: cls_flower: Introduce classify by vxlan outer headers

2016-08-14 Thread Amir Vadai
From: Amir Vadai <ami...@mellanox.com>> Signed-off-by: Amir Vadai <ami...@mellanox.com>> --- include/uapi/linux/pkt_cls.h | 11 + net/sched/cls_flower.c | 53 2 files changed, 64 insertions(+) diff --git a/include/uapi

[RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC

2016-08-14 Thread Amir Vadai
From: Amir Vadai <ami...@mellanox.com>> Hi, I would like to make it possible to manage VXLAN encap/decap using the flower classifier, mirred action and vxlan device. In order to make the solution scaleable, I'm using a shared vxlan device, with encapsulation information packed in the

Re: [Patch net 5/5] net_sched: convert tcf_exts from list to flex_array

2016-08-09 Thread Amir Vadai
On Mon, Aug 8, 2016 at 11:46 PM, Cong Wang wrote: > As pointed out by Jamal, an action could be shared by > multiple filters, so we can't use list to chain them > any more after we get rid of the original tc_action. > Instead, we could just save pointers to these actions

Re: [Patch net 3/5] net_sched: fix a typo in tc_for_each_action()

2016-08-09 Thread Amir Vadai
On Mon, Aug 08, 2016 at 01:46:47PM -0700, Cong Wang wrote: > It is harmless because all users pass 'a' to this macro. > > Fixes: 00175aec941e ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef") > Cc: Amir Vadai <a...@vadai.me> > Signed-off-by: Cong

[PATCH iproute2] tc: flower: Add skip_{hw|sw} support

2016-07-04 Thread Amir Vadai
From: Amir Vadai <ami...@mellanox.com> On devices that support TC flower offloads, these flags enable a filter to be added only to HW or only to SW. skip_sw and skip_hw are mutually exclusive flags. By default without any flags, the filter is added to both HW and SW, but no error checks ar

[PATCH net-next] net/sched: flower: Return error when hw can't offload and skip_sw is set

2016-06-13 Thread Amir Vadai
From: Amir Vadai <ami...@mellanox.com> When skip_sw is set and hardware fails to apply filter, return error to user. This will make error propagation logic similar to the one currently used in u32 classifier. Also, changed code to use tc_skip_sw() utility function. Signed-off-by: Amir Vada

Re: [PATCH net-next] net/sched: cls_flower: Introduce support in SKIP SW flag

2016-06-13 Thread Amir Vadai
On Mon, Jun 13, 2016 at 11:58:12AM +0300, Amir Vadai wrote: > From: Amir Vadai <ami...@mellanox.com> > > In order to make a filter processed only by hardware, skip_sw flag > should be supplied. This is an addition to the already existing skip_hw > flag (filter will be proce

[PATCH net-next] net/sched: cls_flower: Introduce support in SKIP SW flag

2016-06-13 Thread Amir Vadai
From: Amir Vadai <ami...@mellanox.com> In order to make a filter processed only by hardware, skip_sw flag should be supplied. This is an addition to the already existing skip_hw flag (filter will be processed by software only). If no flag is specified, filter will be processed by both so

Re: [PATCH net-next] net/sched: cls_flower: Introduce support in SKIP SW flag

2016-06-08 Thread Amir Vadai
On Tue, Jun 07, 2016 at 08:37:40AM -0700, John Fastabend wrote: > On 16-06-05 07:11 AM, Amir Vadai wrote: > > From: Amir Vadai <ami...@mellanox.com> > > > > In order to make a filter processed only by hardware, skip_sw flag > > should be supplied. This is an

[PATCH net-next] net/sched: cls_flower: Introduce support in SKIP SW flag

2016-06-05 Thread Amir Vadai
From: Amir Vadai <ami...@mellanox.com> In order to make a filter processed only by hardware, skip_sw flag should be supplied. This is an addition to the already existing skip_hw flag (filter will be processed by software only). If no flag is specified, filter will be processed by both so

Re: [PATCH] mlx5: avoid unused variable warning

2016-05-18 Thread Amir Vadai"
e ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef") > --- Acked-By: Amir Vadai <a...@vadai.me> Thanks Arnd.

[PATCH net-next 5/8] net/mlx5_core: Firmware commands to support flow counters

2016-05-13 Thread Amir Vadai
From: Amir Vadai <ami...@mellanox.com> Getting packet/byte statistics on flows is done through flow counters. Implement the firmware commands to alloc, free and query flow counters. Signed-off-by: Amir Vadai <ami...@mellanox.com> --- drivers/net/ethernet/mellanox/mlx5/core/c

  1   2   3   >