Re: [PATCH net-next iproute2 v2 0/3] net/sched: Introduce tc connection tracking

2019-07-18 Thread Paul Blakey
Hey guys, any more comments? thanks, Paul.

RE: [PATCH] net/mlx5e: Fix zero table prio set by user.

2019-07-28 Thread Paul Blakey
On 7/26/2019 5:01 PM, Marcelo Ricardo Leitner wrote: > On Fri, Jul 26, 2019 at 08:39:43PM +0800, wenxu wrote: >> >> 在 2019/7/26 20:19, Or Gerlitz 写道: >>> On Fri, Jul 26, 2019 at 12:24 AM Saeed Mahameed wrote: On Thu, 2019-07-25 at 19:24 +0800, we...@ucloud.cn wrote: > From: wenxu >

[PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-07 Thread Paul Blakey
ng tc chain to ovs recirc_id to handle these miss cases. Last tc chain index will be set by tc goto chain action and read by OvS datapath. Signed-off-by: Paul Blakey Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- include/linux/skbuff.h| 13 + include/net/sch_generic.h

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-07 Thread Paul Blakey
On 8/7/2019 6:00 PM, Marcelo Ricardo Leitner wrote: > On Wed, Aug 07, 2019 at 03:08:42PM +0300, Paul Blakey wrote: >> Offloaded OvS datapath rules are translated one to one to tc rules, >> for example the following simplified OvS rule: >> >> recirc_id(0),in_port(dev1

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-11 Thread Paul Blakey
On 8/8/2019 11:53 PM, Pravin Shelar wrote: > On Wed, Aug 7, 2019 at 5:08 AM Paul Blakey wrote: >> Offloaded OvS datapath rules are translated one to one to tc rules, >> for example the following simplified OvS rule: >> >> recirc_id(0),in_port(dev1),eth_type(0x0800),ct

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-11 Thread Paul Blakey
On 8/8/2019 11:53 PM, Pravin Shelar wrote: > On Wed, Aug 7, 2019 at 5:08 AM Paul Blakey wrote: >> Offloaded OvS datapath rules are translated one to one to tc rules, >> for example the following simplified OvS rule: >> >> recirc_id(0),in_port(dev1),eth_type(0x0800),ct

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-13 Thread Paul Blakey
On 8/12/2019 7:18 PM, Pravin Shelar wrote: > On Sun, Aug 11, 2019 at 3:46 AM Paul Blakey wrote: >> >> On 8/8/2019 11:53 PM, Pravin Shelar wrote: >>> On Wed, Aug 7, 2019 at 5:08 AM Paul Blakey wrote: >>>> Offloaded OvS datapath rules are translated one to o

[PATCH net-next 0/3] net/sched: cls_flower: Add support for matching on ct_state reply flag

2021-01-27 Thread Paul Blakey
patch does offload of this new ct_state by using the supplied connection's direction. Paul Blakey (3): net/sched: cls_flower: Add match on the ct_state reply flag net: flow_offload: Add original direction flag to ct_metadata net/mlx5: CT: Add support for matching on ct_state reply

[PATCH net-next 3/3] net/mlx5: CT: Add support for matching on ct_state reply flag

2021-01-27 Thread Paul Blakey
\ action mirred egress redirect dev ens1f0_0 Signed-off-by: Paul Blakey Acked-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c b/drivers

[PATCH net-next 2/3] net: flow_offload: Add original direction flag to ct_metadata

2021-01-27 Thread Paul Blakey
Give offloading drivers the direction of the offloaded ct flow, this will be used for matches on direction (ct_state +/-rpl). Signed-off-by: Paul Blakey Reviewed-by: Jiri Pirko --- include/net/flow_offload.h | 1 + net/sched/act_ct.c | 1 + 2 files changed, 2 insertions(+) diff --git

[PATCH net-next 1/3] net/sched: cls_flower: Add match on the ct_state reply flag

2021-01-27 Thread Paul Blakey
mirred egress redirect dev ens1f0_0 Signed-off-by: Paul Blakey Reviewed-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 1 + net/sched/cls_flower.c | 6 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h index

[PATCH iproute2/net-next] tc: flower: Add support for ct_state reply flag

2021-02-02 Thread Paul Blakey
egress redirect dev ens1f0_0 Signed-off-by: Paul Blakey --- man/man8/tc-flower.8 | 2 ++ tc/f_flower.c| 1 + 2 files changed, 3 insertions(+) diff --git a/man/man8/tc-flower.8 b/man/man8/tc-flower.8 index 226d1cc..f7336b6 100644 --- a/man/man8/tc-flower.8 +++ b/man/man8/tc-flower.8

Re: [PATCH iproute2/net-next] tc: flower: Add support for ct_state reply flag

2021-02-02 Thread Paul Blakey
On Tue, 2 Feb 2021, Marcelo Ricardo Leitner wrote: > On Tue, Feb 02, 2021 at 02:24:42PM +0200, Paul Blakey wrote: > > Matches on conntrack rpl ct_state. > > > > Example: > > $ tc filter add dev ens1f0_0 ingress prio 1 chain 1 proto ip flower \ > > ct_state +

Re: [PATCH net-next 3/3] net/mlx5: CT: Add support for matching on ct_state reply flag

2021-02-03 Thread Paul Blakey
On Tue, 2 Feb 2021, Marcelo Ricardo Leitner wrote: > On Wed, Jan 27, 2021 at 04:32:47PM +0200, Paul Blakey wrote: > > Add support for matching on ct_state reply flag. > > Sorry for the late reply, missed the patchset here. (just noticed > because of the iproute2 patch, th

[PATCH net-next 0/3] net/sched: Introduce tc connection tracking

2019-06-11 Thread Paul Blakey
_port(ens1f0_0),ct_state(+est+trk),ct_mark(0xbb),... actions:ct(zone=2,nat),ens1f0_1 recirc_id(1),in_port(ens1f0_1),ct_state(-trk),... actions:ct(zone=2),recirc(1) recirc_id(1),in_port(ens1f0_1),ct_state(+est+trk),... actions:ct(zone=2,nat),ens1f0_0 Paul Blakey (3): net/sched: Introduce acti

[PATCH net-next 2/3] net/flow_dissector: add connection tracking dissection

2019-06-11 Thread Paul Blakey
Retreives connection tracking zone, mark, label, and state from a SKB. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Acked-by: Jiri Pirko --- include/linux/skbuff.h | 10 ++ include/net/flow_dissector.h | 15 +++ net/core/flow_dissector.c| 44

[PATCH net-next 3/3] net/sched: cls_flower: Add matching on conntrack info

2019-06-11 Thread Paul Blakey
New matches for conntrack mark, label, zone, and state. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 16 ++ net/sched/cls_flower.c | 127

[PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Paul Blakey
Allow sending a packet to conntrack and set conntrack zone, mark, labels and nat parameters. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/net/flow_offload.h| 5 + include/net/tc_act/tc_ct.h

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Paul Blakey
On 6/11/2019 4:59 PM, Toke Høiland-Jørgensen wrote: > Paul Blakey writes: > >> Allow sending a packet to conntrack and set conntrack zone, mark, >> labels and nat parameters. > How is this different from the newly merged ctinfo action? > > -Toke Hi, ctinfo does one

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-13 Thread Paul Blakey
On 6/12/2019 10:55 PM, Florian Westphal wrote: > Paul Blakey wrote: >> +/* The conntrack module expects to be working at L3. */ > It also expects that IP stack has validated ip(v6) > headers and has pulled the ip header into linear area. > > What are your plans wrt.

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-13 Thread Paul Blakey
On 6/12/2019 9:04 PM, Marcelo Ricardo Leitner wrote: > On Tue, Jun 11, 2019 at 04:28:31PM +0300, Paul Blakey wrote: >> Allow sending a packet to conntrack and set conntrack zone, mark, >> labels and nat parameters. >> >> Signed-off-by: Paul Blakey >> Signe

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-13 Thread Paul Blakey
On 6/13/2019 1:49 PM, Davide Caratti wrote: > On Thu, 2019-06-13 at 12:16 +0200, Davide Caratti wrote: >> hello Paul! >> >> On Tue, 2019-06-11 at 16:28 +0300, Paul Blakey wrote: >> >>> +#endif /* __NET_TC_CT_H */ >>> diff --git a/include/uapi/l

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-13 Thread Paul Blakey
On 6/11/2019 11:23 PM, Toke Høiland-Jørgensen wrote: > Marcelo Ricardo Leitner writes: > >> On Tue, Jun 11, 2019 at 05:34:50PM +0200, Toke Høiland-Jørgensen wrote: >>> Paul Blakey writes: >>> >>>> On 6/11/2019 4:59 PM, Toke Høiland-Jørgensen wrote: >

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-16 Thread Paul Blakey
On 6/14/2019 9:02 PM, Cong Wang wrote: > On Tue, Jun 11, 2019 at 7:05 AM Paul Blakey wrote: >> Allow sending a packet to conntrack and set conntrack zone, mark, >> labels and nat parameters. >> > This is too short to justify why you want to play with L3 stuff in L2. &g

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-20 Thread Paul Blakey
On 6/19/2019 9:33 PM, Marcelo Ricardo Leitner wrote: > On Tue, Jun 11, 2019 at 04:28:31PM +0300, Paul Blakey wrote: > ... >> +static int tcf_ct_fill_params_nat(struct tcf_ct_params *p, >> + struct tc_ct *parm, >> +

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-20 Thread Paul Blakey
On 6/18/2019 7:03 PM, Cong Wang wrote: > On Fri, Jun 14, 2019 at 12:24 PM Marcelo Ricardo Leitner > wrote: >> On Fri, Jun 14, 2019 at 11:07:37AM -0700, Cong Wang wrote: >>> On Tue, Jun 11, 2019 at 9:44 AM Marcelo Ricardo Leitner >>> wrote: I had suggested to let act_ct handle the above as w

[PATCH net-next v2 2/4] net/flow_dissector: add connection tracking dissection

2019-06-20 Thread Paul Blakey
Retreives connection tracking zone, mark, label, and state from a SKB. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Acked-by: Jiri Pirko --- include/linux/skbuff.h | 10 ++ include/net/flow_dissector.h | 15 +++ net/core/flow_dissector.c| 44

[PATCH net-next v2 1/4] net/sched: Introduce action ct

2019-06-20 Thread Paul Blakey
proto tcp ct_state -trk \ action ct zone 2 pipe \ action goto chain 1 $ tc filter add dev ens1f0_1 ingress \ prio 1 chain 1 proto ip \ flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \ action ct nat pipe \ action mirred egress redirect dev ens1f0_0 Signed-off-by: Paul Blakey Signed-o

[PATCH net-next v2 3/4] net/sched: cls_flower: Add matching on conntrack info

2019-06-20 Thread Paul Blakey
New matches for conntrack mark, label, zone, and state. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 16 ++ net/sched/cls_flower.c | 127

[PATCH net-next v2 0/4] net/sched: Introduce tc connection tracking

2019-06-20 Thread Paul Blakey
tches. Paul Blakey (4): net/sched: Introduce action ct net/flow_dissector: add connection tracking dissection net/sched: cls_flower: Add matching on conntrack info tc-tests: Add tc action ct tests include/linux/skbuff.h | 10 + include/net/flow_dissec

[PATCH net-next v2 4/4] tc-tests: Add tc action ct tests

2019-06-20 Thread Paul Blakey
Add 13 tests ensuring the command line is doing what is supposed to do. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Marcelo Ricardo Leitner --- .../selftests/tc-testing/tc-tests/actions/ct.json | 314 + 1 file changed, 314 insertions(+) create mode 100644 tools/t

[PATCH net-next] cls_flower: Support multiple masks per priority

2018-04-30 Thread Paul Blakey
The user is left with the responsibilty of ensuring non overlapping flows, otherwise precedence is not guaranteed. Signed-off-by: Paul Blakey --- net/sched/cls_flower.c | 279 +++-- 1 file changed, 179 insertions(+), 100 deletions(-) diff --git a

[PATCH net-next V2] cls_flower: Support multiple masks per priority

2018-04-30 Thread Paul Blakey
The user is left with the responsibility of ensuring non overlapping flows, otherwise precedence is not guaranteed. Signed-off-by: Paul Blakey Signed-off-by: Jiri Pirko --- Changes: V1 -> V2: in fl_init, removed unnessecry err variable, just return direct result instead. in

Re: [PATCH net-next v2 1/4] net/sched: Introduce action ct

2019-06-30 Thread Paul Blakey
On 6/27/2019 10:53 PM, David Miller wrote: > From: Paul Blakey > Date: Thu, 20 Jun 2019 16:42:18 +0300 > >> +struct tcf_ct_params { > ... >> +struct rcu_head rcu; >> + >> +}; > Please get ride of that empty line after the 'rcu' member. >

Re: [PATCH net-next v2 0/4] net/sched: Introduce tc connection tracking

2019-06-30 Thread Paul Blakey
On 6/24/2019 8:59 PM, Cong Wang wrote: > On Thu, Jun 20, 2019 at 6:43 AM Paul Blakey wrote: >> Hi, >> >> This patch series add connection tracking capabilities in tc sw datapath. >> It does so via a new tc action, called act_ct, and new tc flower classifier >&g

[PATCH net-next v3 1/4] net/sched: Introduce action ct

2019-07-04 Thread Paul Blakey
proto tcp ct_state -trk \ action ct zone 2 pipe \ action goto chain 1 $ tc filter add dev ens1f0_1 ingress \ prio 1 chain 1 proto ip \ flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \ action ct nat pipe \ action mirred egress redirect dev ens1f0_0 Signed-off-by: Paul Blakey Signed-o

[PATCH net-next v3 2/4] net/flow_dissector: add connection tracking dissection

2019-07-04 Thread Paul Blakey
Retreives connection tracking zone, mark, label, and state from a SKB. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Acked-by: Jiri Pirko --- include/linux/skbuff.h | 10 ++ include/net/flow_dissector.h | 15 +++ net/core/flow_dissector.c| 44

[PATCH net-next v3 4/4] tc-tests: Add tc action ct tests

2019-07-04 Thread Paul Blakey
Add 13 tests ensuring the command line is doing what is supposed to do. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Marcelo Ricardo Leitner --- .../selftests/tc-testing/tc-tests/actions/ct.json | 314 + 1 file changed, 314 insertions(+) create mode 100644 tools/t

[PATCH net-next v3 0/4] net/sched: Introduce tc connection tracking

2019-07-04 Thread Paul Blakey
tches. Paul Blakey (4): net/sched: Introduce action ct net/flow_dissector: add connection tracking dissection net/sched: cls_flower: Add matching on conntrack info tc-tests: Add tc action ct tests include/linux/skbuff.h | 10 + include/net/flow_dissec

[PATCH net-next v3 3/4] net/sched: cls_flower: Add matching on conntrack info

2019-07-04 Thread Paul Blakey
New matches for conntrack mark, label, zone, and state. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 16 ++ net/sched/cls_flower.c | 127

Re: [PATCH net-next v3 1/4] net/sched: Introduce action ct

2019-07-06 Thread Paul Blakey
On 7/5/2019 12:55 AM, Jakub Kicinski wrote: > On Thu, 4 Jul 2019 14:53:50 +0300, Paul Blakey wrote: >> +static const struct nla_policy ct_policy[TCA_CT_MAX + 1] = { >> +[TCA_CT_ACTION] = { .type = NLA_U16 }, > Please use strict checking in all new policies. &g

[PATCH net-next v4 0/4] net/sched: Introduce tc connection tracking

2019-07-07 Thread Paul Blakey
tches. Paul Blakey (4): net/sched: Introduce action ct net/flow_dissector: add connection tracking dissection net/sched: cls_flower: Add matching on conntrack info tc-tests: Add tc action ct tests include/linux/skbuff.h | 10 + include/net/flow_dissec

[PATCH net-next v4 3/4] net/sched: cls_flower: Add matching on conntrack info

2019-07-07 Thread Paul Blakey
New matches for conntrack mark, label, zone, and state. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 16 ++ net/sched/cls_flower.c | 127

[PATCH net-next v4 2/4] net/flow_dissector: add connection tracking dissection

2019-07-07 Thread Paul Blakey
Retreives connection tracking zone, mark, label, and state from a SKB. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Acked-by: Jiri Pirko --- include/linux/skbuff.h | 10 ++ include/net/flow_dissector.h | 15 +++ net/core/flow_dissector.c| 44

[PATCH net-next v4 1/4] net/sched: Introduce action ct

2019-07-07 Thread Paul Blakey
proto tcp ct_state -trk \ action ct zone 2 pipe \ action goto chain 1 $ tc filter add dev ens1f0_1 ingress \ prio 1 chain 1 proto ip \ flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \ action ct nat pipe \ action mirred egress redirect dev ens1f0_0 Signed-off-by: Paul Blakey Signed-o

[PATCH net-next v4 4/4] tc-tests: Add tc action ct tests

2019-07-07 Thread Paul Blakey
Add 13 tests ensuring the command line is doing what is supposed to do. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Marcelo Ricardo Leitner --- .../selftests/tc-testing/tc-tests/actions/ct.json | 314 + 1 file changed, 314 insertions(+) create mode 100644 tools/t

[PATCH net-next iproute2 1/3] tc: add NLA_F_NESTED flag to all actions options nested block

2019-07-07 Thread Paul Blakey
Strict netlink validation now requires this flag on all nested attributes, add it for action options. Signed-off-by: Paul Blakey --- tc/m_action.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/m_action.c b/tc/m_action.c index ab6bc0a..2d36a69 100644 --- a/tc

[PATCH net-next iproute2 3/3] tc: flower: Add matching on conntrack info

2019-07-07 Thread Paul Blakey
Matches on conntrack state, zone, mark, and label. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko Acked-by: Roi Dayan --- include/uapi/linux/pkt_cls.h | 17 +++ man/man8/tc-flower.8 | 35 ++ tc/f_flower.c

[PATCH net-next iproute2 2/3] tc: Introduce tc ct action

2019-07-07 Thread Paul Blakey
onnection tracking action + * + * Authors: Paul Blakey + *Yossi Kuperman + *Marcelo Ricardo Leitner + */ + +#include +#include +#include +#include +#include "utils.h" +#include "tc_util.h" +#include + +static void +usage(void)

[PATCH net-next iproute2 0/3] net/sched: Introduce tc connection tracking

2019-07-07 Thread Paul Blakey
redirect dev ens1f0_0 Paul Blakey (3): tc: add NLA_F_NESTED flag to all actions options nested block tc: Introduce tc ct action tc: flower: Add matching on conntrack info include/uapi/linux/pkt_cls.h | 17 ++ include/uapi/linux/tc_act/tc_ct.h | 41 man/man8/tc-flower.8

Re: [PATCH net-next v4 1/4] net/sched: Introduce action ct

2019-07-08 Thread Paul Blakey
On 7/7/2019 3:04 PM, Florian Westphal wrote: > Paul Blakey wrote: >> +/* Determine whether skb->_nfct is equal to the result of conntrack lookup. >> */ >> +static bool tcf_ct_skb_nfct_cached(struct net *net, struct sk_buff *skb, >> +

[PATCH net-next v5 0/4] net/sched: Introduce tc connection tracking

2019-07-08 Thread Paul Blakey
tches. Paul Blakey (4): net/sched: Introduce action ct net/flow_dissector: add connection tracking dissection net/sched: cls_flower: Add matching on conntrack info tc-tests: Add tc action ct tests include/linux/skbuff.h | 10 + include/net/flow_dissec

[PATCH net-next v5 4/4] tc-tests: Add tc action ct tests

2019-07-08 Thread Paul Blakey
Add 13 tests ensuring the command line is doing what is supposed to do. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Marcelo Ricardo Leitner --- .../selftests/tc-testing/tc-tests/actions/ct.json | 314 + 1 file changed, 314 insertions(+) create mode 100644 tools/t

[PATCH net-next v5 3/4] net/sched: cls_flower: Add matching on conntrack info

2019-07-08 Thread Paul Blakey
New matches for conntrack mark, label, zone, and state. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 16 ++ net/sched/cls_flower.c | 127

[PATCH net-next v5 1/4] net/sched: Introduce action ct

2019-07-08 Thread Paul Blakey
proto tcp ct_state -trk \ action ct zone 2 pipe \ action goto chain 1 $ tc filter add dev ens1f0_1 ingress \ prio 1 chain 1 proto ip \ flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \ action ct nat pipe \ action mirred egress redirect dev ens1f0_0 Signed-off-by: Paul Blakey Signed-o

[PATCH net-next v5 2/4] net/flow_dissector: add connection tracking dissection

2019-07-08 Thread Paul Blakey
Retreives connection tracking zone, mark, label, and state from a SKB. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Acked-by: Jiri Pirko --- include/linux/skbuff.h | 10 ++ include/net/flow_dissector.h | 15 +++ net/core/flow_dissector.c| 44

Re: [PATCH net-next v5 1/4] net/sched: Introduce action ct

2019-07-09 Thread Paul Blakey
On 7/8/2019 6:28 PM, Florian Westphal wrote: > Marcelo Ricardo Leitner wrote: >>> + } else { /* NFPROTO_IPV6 */ >>> + enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone; >>> + >>> + memset(IP6CB(skb), 0, sizeof(struct inet6_skb_parm)); >>> + err = nf_ct_fr

Re: [PATCH net-next iproute2 2/3] tc: Introduce tc ct action

2019-07-09 Thread Paul Blakey
On 7/8/2019 8:54 PM, Marcelo Ricardo Leitner wrote: > On Sun, Jul 07, 2019 at 11:53:47AM +0300, Paul Blakey wrote: >> New tc action to send packets to conntrack module, commit >> them, and set a zone, labels, mark, and nat on the connection. >> >> It can also clear the

[PATCH net-next v6 1/4] net/sched: Introduce action ct

2019-07-09 Thread Paul Blakey
proto tcp ct_state -trk \ action ct zone 2 pipe \ action goto chain 1 $ tc filter add dev ens1f0_1 ingress \ prio 1 chain 1 proto ip \ flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \ action ct nat pipe \ action mirred egress redirect dev ens1f0_0 Signed-off-by: Paul Blakey Signed-o

[PATCH net-next v6 2/4] net/flow_dissector: add connection tracking dissection

2019-07-09 Thread Paul Blakey
Retreives connection tracking zone, mark, label, and state from a SKB. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Acked-by: Jiri Pirko --- include/linux/skbuff.h | 10 ++ include/net/flow_dissector.h | 15 +++ net/core/flow_dissector.c| 44

[PATCH net-next v6 3/4] net/sched: cls_flower: Add matching on conntrack info

2019-07-09 Thread Paul Blakey
New matches for conntrack mark, label, zone, and state. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 16 ++ net/sched/cls_flower.c | 127

[PATCH net-next v6 0/4] net/sched: Introduce tc connection tracking

2019-07-09 Thread Paul Blakey
tches. Paul Blakey (4): net/sched: Introduce action ct net/flow_dissector: add connection tracking dissection net/sched: cls_flower: Add matching on conntrack info tc-tests: Add tc action ct tests include/linux/skbuff.h | 10 + include/net/flow_dissec

[PATCH net-next v6 4/4] tc-tests: Add tc action ct tests

2019-07-09 Thread Paul Blakey
Add 13 tests ensuring the command line is doing what is supposed to do. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Marcelo Ricardo Leitner --- .../selftests/tc-testing/tc-tests/actions/ct.json | 314 + 1 file changed, 314 insertions(+) create mode 100644 tools/t

Re: [PATCH net-next v6 0/4] net/sched: Introduce tc connection tracking

2019-07-11 Thread Paul Blakey
On 7/9/2019 10:14 PM, David Miller wrote: > From: Paul Blakey > Date: Tue, 9 Jul 2019 10:30:47 +0300 > >> This patch series add connection tracking capabilities in tc sw datapath. >> It does so via a new tc action, called act_ct, and new tc flower classifier >> mat

Re: [PATCH net-next iproute2 2/3] tc: Introduce tc ct action

2019-07-11 Thread Paul Blakey
On 7/9/2019 6:36 PM, Marcelo Ricardo Leitner wrote: > On Tue, Jul 09, 2019 at 06:58:36AM +0000, Paul Blakey wrote: >> On 7/8/2019 8:54 PM, Marcelo Ricardo Leitner wrote: >>> On Sun, Jul 07, 2019 at 11:53:47AM +0300, Paul Blakey wrote: >>>> New tc action to send packe

[PATCH net-next iproute2 v2 0/3] net/sched: Introduce tc connection tracking

2019-07-11 Thread Paul Blakey
redirect dev ens1f0_0 Changelog: V1->V2: Removed pkt_cls changes (as it was merged already) Paul Blakey (3): tc: add NLA_F_NESTED flag to all actions options nested block tc: Introduce tc ct action tc: flower: Add matching on conntrack info include/uapi/linux/tc_act/tc_ct.h |

[PATCH net-next iproute2 v2 2/3] tc: Introduce tc ct action

2019-07-11 Thread Paul Blakey
onnection tracking action + * + * Authors: Paul Blakey + *Yossi Kuperman + *Marcelo Ricardo Leitner + */ + +#include +#include +#include +#include +#include "utils.h" +#include "tc_util.h" +#include + +static void +usage(void)

[PATCH net-next iproute2 v2 3/3] tc: flower: Add matching on conntrack info

2019-07-11 Thread Paul Blakey
Matches on conntrack state, zone, mark, and label. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko Acked-by: Roi Dayan --- man/man8/tc-flower.8 | 35 +++ tc/f_flower.c| 276

[PATCH net-next iproute2 v2 1/3] tc: add NLA_F_NESTED flag to all actions options nested block

2019-07-11 Thread Paul Blakey
Strict netlink validation now requires this flag on all nested attributes, add it for action options. Signed-off-by: Paul Blakey --- tc/m_action.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/m_action.c b/tc/m_action.c index ab6bc0a..2d36a69 100644 --- a/tc

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain

2019-08-18 Thread Paul Blakey
What do you guys say about the following diff on top of the last one? Use static key, and also have OVS_DP_CMD_SET command probe/enable the feature. This will allow userspace to probe the feature, and selectivly enable it via the OVS_DP_CMD_SET command. Thansk, Paul. --- include/uapi/linux/ope

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain

2019-08-18 Thread Paul Blakey
On 8/18/2019 7:00 PM, Paul Blakey wrote: > What do you guys say about the following diff on top of the last one? > Use static key, and also have OVS_DP_CMD_SET command probe/enable the feature. > > This will allow userspace to probe the feature, and selectivly enable i

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain

2019-08-20 Thread Paul Blakey
On 8/20/2019 8:50 AM, Pravin Shelar wrote: > On Mon, Aug 19, 2019 at 10:42 AM Marcelo Ricardo Leitner > wrote: >> On Sun, Aug 18, 2019 at 07:00:59PM +0300, Paul Blakey wrote: >>> What do you guys say about the following diff on top of the last one? >>>

[PATCH net-next v2] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-20 Thread Paul Blakey
ng tc chain to ovs recirc_id to handle these miss cases. Last tc chain index will be set by tc goto chain action and read by OvS datapath. Signed-off-by: Paul Blakey Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- V2: Changed user_features to return not supported for requ

Re: [PATCH net-next v2] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-20 Thread Paul Blakey
aring feature on first recirc_id rule Signed-off-by: Paul Blakey --- datapath/linux/compat/include/linux/openvswitch.h | 3 ++ lib/dpif-netdev.c | 1 + lib/dpif-netlink.c| 61 +++ lib/dpif-provi

Re: [PATCH net-next v2] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-20 Thread Paul Blakey
aring feature on first recirc_id rule Signed-off-by: Paul Blakey --- datapath/linux/compat/include/linux/openvswitch.h | 3 ++ lib/dpif-netdev.c | 1 + lib/dpif-netlink.c| 61 +++ lib/dpif-provi

Re: [PATCH net-next v2] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-20 Thread Paul Blakey
Hey guys, sorry for spam, I used the --in-reply-to  this time so it gets to the original thread ("[PATCH net-next v2] net: openvswitch: Set OvS recirc_id from tc chain index") , Ignore this thread and respond there if needed. Thanks. On 8/20/2019 3:40 PM, Paul Blakey wrote: >

Re: [PATCH net-next v2] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-25 Thread Paul Blakey
On 8/22/2019 6:57 AM, David Miller wrote: > From: Paul Blakey > Date: Tue, 20 Aug 2019 15:30:51 +0300 > >> @@ -4050,6 +4060,9 @@ enum skb_ext_id { >> #ifdef CONFIG_XFRM >> SKB_EXT_SEC_PATH, >> #endif >> +#if IS_ENABLED(CONFIG_NET_TC_

[PATCH net-next v3] net: openvswitch: Set OvS recirc_id from tc chain index

2019-09-03 Thread Paul Blakey
ng tc chain to ovs recirc_id to handle these miss cases. Last tc chain index will be set by tc goto chain action and read by OvS datapath. Signed-off-by: Paul Blakey Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- include/linux/skbuff.h | 13 + include/net/sch_gene

[PATCH net-next v3] tc SKB extension for tc Chains/Conntrack hardware offload

2019-09-03 Thread Paul Blakey
or example, the napi API which we use, uses the control block and comes right after our driver layer. This will overwrite any usage of CB by us. Thanks, Paul B. Paul Blakey (1): net: openvswitch: Set OvS recirc_id from tc chain index include/linux/skbuff.h | 13 + include

Re: [PATCH net v4 0/2] rhashtable: Fix rhltable duplicates insertion

2018-03-08 Thread Paul Blakey
On 07/03/2018 18:23, David Miller wrote: From: Paul Blakey Date: Wed, 7 Mar 2018 16:00:11 +0200 On our mlx5 driver fs_core.c, we use the rhltable interface to store flow groups. We noticed that sometimes we get a warning that flow group isn't found at removal. This rare case was c

[PATCH net] test_rhashtable: Add missing rcu_read_lock()

2018-03-08 Thread Paul Blakey
Suppress "suspicious rcu_dereference_protected() usage!" on duplicate insertion test. Fixes: 499ac3b60f65 ('test_rhashtable: add test case for rhl_table with duplicate objects') Signed-off-by: Paul Blakey --- lib/test_rhashtable.c | 14 +- 1 file changed

Re: [PATCH net] test_rhashtable: Add missing rcu_read_lock()

2018-03-08 Thread Paul Blakey
On 08/03/2018 17:58, Herbert Xu wrote: On Thu, Mar 08, 2018 at 01:54:57PM +0200, Paul Blakey wrote: Suppress "suspicious rcu_dereference_protected() usage!" on duplicate insertion test. Fixes: 499ac3b60f65 ('test_rhashtable: add test case for rhl_table with duplicate objects&

[PATCH net 1/2] rhashtable: Fix rhltable duplicates insertion

2018-03-04 Thread Paul Blakey
pprev pointer to point to the correct rhash_head next pointer. Fixes: ca26893f05e8 ('rhashtable: Add rhlist interface') Signed-off-by: Paul Blakey --- include/linux/rhashtable.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/rhashtable.h b/inc

[PATCH net 0/2] rhashtable: Fix rhltable duplicates insertion

2018-03-04 Thread Paul Blakey
, but only where the flow group rhash_head was second (or not first) on the relevant rhashtable bucket list. The first patch fixes it, and the second one adds a test that show it is now working. Paul Blakey (2): rhashtable: Fix rhltable duplicates insertion test_rhashtable: add test cas

[PATCH net 2/2] test_rhashtable: add test case for rhl_table with duplicate objects

2018-03-04 Thread Paul Blakey
Tries to insert duplicates in the middle of bucket's chain: bucket 1: [[val 21 (tid=1)]] -> [[ val 1 (tid=2), val 1 (tid=0) ]] Reuses tid to distinguish the elements insertion order. Signed-off-by: Paul Blakey --- lib/test_rhashtable

[PATCH net v2 1/2] rhashtable: Fix rhlist duplicates insertion

2018-03-04 Thread Paul Blakey
pointer to point to the correct rhash_head next pointer. Fixes: ca26893f05e8 ('rhashtable: Add rhlist interface') Signed-off-by: Paul Blakey --- include/linux/rhashtable.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/rhashtable.h b/inc

[PATCH net v2 2/2] test_rhashtable: add test case for rhltable with duplicate objects

2018-03-04 Thread Paul Blakey
Tries to insert duplicates in the middle of bucket's chain: bucket 1: [[val 21 (tid=1)]] -> [[ val 1 (tid=2), val 1 (tid=0) ]] Reuses tid to distinguish the elements insertion order. Signed-off-by: Paul Blakey --- lib/test_rhashtable

[PATCH net v2 0/2] rhlist: Fix rhltable duplicates insertion

2018-03-04 Thread Paul Blakey
icate), but only where the flow group rhash_head was second (or not first) on the relevant rhashtable bucket list. The first patch fixes it, and the second one adds a test that show it is now working. Paul. v1 --> v2 changes: * Changed commit messages to better reflect the change Paul B

Re: [PATCH net 1/2] rhashtable: Fix rhltable duplicates insertion

2018-03-04 Thread Paul Blakey
On 04/03/2018 14:57, Herbert Xu wrote: On Sun, Mar 04, 2018 at 02:34:26PM +0200, Paul Blakey wrote: When inserting duplicate objects (those with the same key), current rhashtable implementation messes up the chain pointers by updating the bucket pointer instead of prev next pointer to the

[PATCH net v3 2/2] test_rhashtable: add test case for rhltable with duplicate objects

2018-03-04 Thread Paul Blakey
Tries to insert duplicates in the middle of bucket's chain: bucket 1: [[val 21 (tid=1)]] -> [[ val 1 (tid=2), val 1 (tid=0) ]] Reuses tid to distinguish the elements insertion order. Signed-off-by: Paul Blakey --- lib/test_rhashtable

[PATCH net v3 1/2] rhashtable: Fix rhlist duplicates insertion

2018-03-04 Thread Paul Blakey
pointer to point to the correct rhash_head next pointer. Issue: 1241076 Change-Id: I86b2c140bcb4aeb10b70a72a267ff590bb2b17e7 Fixes: ca26893f05e8 ('rhashtable: Add rhlist interface') Signed-off-by: Paul Blakey --- include/linux/rhashtable.h | 4 +++- lib/rhashtable.c | 4 +++

[PATCH net v3 0/2] rhashtable: Fix rhltable duplicates insertion

2018-03-04 Thread Paul Blakey
1 --> v2 changes: * Changed commit messages to better reflect the change Paul Blakey (2): rhashtable: Fix rhlist duplicates insertion test_rhashtable: add test case for rhltable with duplicate objects include/linux/rhashtable.h | 4 +- lib/rhashtable.c | 4 +- lib/test_r

Re: [PATCH net v2 1/2] rhashtable: Fix rhlist duplicates insertion

2018-03-04 Thread Paul Blakey
On 04/03/2018 17:13, Mark Bloch wrote: On 04/03/2018 15:26, Paul Blakey wrote: When inserting duplicate objects (those with the same key), current rhlist implementation messes up the chain pointers by updating the bucket pointer instead of prev next pointer to the newly inserted node. This

[PATCH net v4 0/2] rhashtable: Fix rhltable duplicates insertion

2018-03-07 Thread Paul Blakey
ags v3 --> v2 changes: * Added missing fix in rhashtable_lookup_one code path as well. v2 --> v1 changes: * Changed commit messages to better reflect the change Paul Blakey (2): rhashtable: Fix rhlist duplicates insertion test_rhashtable: add test case for rhltable with duplicat

[PATCH net v4 2/2] test_rhashtable: add test case for rhltable with duplicate objects

2018-03-07 Thread Paul Blakey
Tries to insert duplicates in the middle of bucket's chain: bucket 1: [[val 21 (tid=1)]] -> [[ val 1 (tid=2), val 1 (tid=0) ]] Reuses tid to distinguish the elements insertion order. Signed-off-by: Paul Blakey --- lib/test_rhashtable

[PATCH net v4 1/2] rhashtable: Fix rhlist duplicates insertion

2018-03-07 Thread Paul Blakey
pointer to point to the correct rhash_head next pointer. Fixes: ca26893f05e8 ('rhashtable: Add rhlist interface') Signed-off-by: Paul Blakey --- include/linux/rhashtable.h | 4 +++- lib/rhashtable.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/inc

[PATCH net-next 1/2] cls_flower: Fix missing free of rhashtable

2018-05-30 Thread Paul Blakey
When destroying the instance, destroy the head rhashtable. Fixes: 05cd271fd61a ("cls_flower: Support multiple masks per priority") Reported-by: Vlad Buslov Reviewed-by: Roi Dayan Reviewed-by: Jiri Pirko Signed-off-by: Paul Blakey --- net/sched/cls_flower.c | 2 ++ 1 file

[PATCH net-next 0/2] cls_flower: Various fixes

2018-05-30 Thread Paul Blakey
Two of the fixes are for my multiple mask patch Paul Blakey (2): cls_flower: Fix missing free of rhashtable cls_flower: Fix comparing of old filter mask with new filter net/sched/cls_flower.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.7.4

[PATCH net-next 2/2] cls_flower: Fix comparing of old filter mask with new filter

2018-05-30 Thread Paul Blakey
We incorrectly compare the mask and the result is that we can't modify an already existing rule. Fix that by comparing correctly. Fixes: 05cd271fd61a ("cls_flower: Support multiple masks per priority") Reported-by: Vlad Buslov Reviewed-by: Roi Dayan Reviewed-by: Jiri Pirko Sign

[PATCH net] cls_flower: Fix incorrect idr release when failing to modify rule

2018-05-30 Thread Paul Blakey
Signed-off-by: Paul Blakey --- net/sched/cls_flower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index d964e60..c79f6e7 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -977,7 +977,7 @@ static int fl_change(

  1   2   >