[PATCH net-next v2 1/1] netfilter: flowtable: Add FLOW_OFFLOAD_XMIT_UNSPEC xmit type

2021-04-13 Thread Roi Dayan
ned-off-by: Roi Dayan --- Notes: v2 - add FLOW_OFFLOAD_XMIT_UNSPEC instead of still using neigh as default and checking dst for null include/net/netfilter/nf_flow_table.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net/netfilter/nf_flow_table.h b/i

Re: [PATCH net-next 1/1] netfilter: flowtable: Make sure dst_cache is valid before using it

2021-04-13 Thread Roi Dayan
On 2021-04-12 2:42 PM, Pablo Neira Ayuso wrote: On Mon, Apr 12, 2021 at 11:26:35AM +0300, Roi Dayan wrote: On 2021-04-11 1:58 PM, Pablo Neira Ayuso wrote: Hi Roi, On Sun, Apr 11, 2021 at 11:13:34AM +0300, Roi Dayan wrote: It could be dst_cache was not set so check it's not null b

Re: [PATCH net-next 1/1] netfilter: flowtable: Make sure dst_cache is valid before using it

2021-04-12 Thread Roi Dayan
On 2021-04-11 1:58 PM, Pablo Neira Ayuso wrote: Hi Roi, On Sun, Apr 11, 2021 at 11:13:34AM +0300, Roi Dayan wrote: It could be dst_cache was not set so check it's not null before using it. Could you give a try to this fix? net/sched/act_ct.c leaves the xmit_ty

[PATCH net-next 1/1] netfilter: flowtable: Make sure dst_cache is valid before using it

2021-04-11 Thread Roi Dayan
It could be dst_cache was not set so check it's not null before using it. Fixes: 8b9229d15877 ("netfilter: flowtable: dst_check() from garbage collector path") Signed-off-by: Roi Dayan --- net/netfilter/nf_flow_table_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH] net: mellanox: mlx5: fix error return code of mlx5e_stats_flower()

2021-03-14 Thread Roi Dayan
On 2021-03-12 12:47 AM, Saeed Mahameed wrote: On Tue, 2021-03-09 at 11:44 +0200, Roi Dayan wrote: On 2021-03-09 10:32 AM, Jia-Ju Bai wrote: On 2021/3/9 16:24, Roi Dayan wrote: On 2021-03-09 10:20 AM, Roi Dayan wrote: On 2021-03-06 3:47 PM, Jia-Ju Bai wrote: When

Re: [PATCH] net: bonding: fix error return code of bond_neigh_init()

2021-03-10 Thread Roi Dayan
On 2021-03-08 5:11 AM, Jia-Ju Bai wrote: When slave is NULL or slave_ops->ndo_neigh_setup is NULL, no error return code of bond_neigh_init() is assigned. To fix this bug, ret is assigned with -EINVAL in these cases. Fixes: 9e99bfefdbce ("bonding: fix bond_neigh_init()") Reported-by: TOTE Robo

Re: [PATCH] net: mellanox: mlx5: fix error return code of mlx5e_stats_flower()

2021-03-09 Thread Roi Dayan
On 2021-03-09 10:32 AM, Jia-Ju Bai wrote: On 2021/3/9 16:24, Roi Dayan wrote: On 2021-03-09 10:20 AM, Roi Dayan wrote: On 2021-03-06 3:47 PM, Jia-Ju Bai wrote: When mlx5e_tc_get_counter() returns NULL to counter or mlx5_devcom_get_peer_data() returns NULL to peer_esw, no error return

Re: [PATCH] net: mellanox: mlx5: fix error return code of mlx5e_stats_flower()

2021-03-09 Thread Roi Dayan
On 2021-03-09 10:20 AM, Roi Dayan wrote: On 2021-03-06 3:47 PM, Jia-Ju Bai wrote: When mlx5e_tc_get_counter() returns NULL to counter or mlx5_devcom_get_peer_data() returns NULL to peer_esw, no error return code of mlx5e_stats_flower() is assigned. To fix this bug, err is assigned with

Re: [PATCH] net: mellanox: mlx5: fix error return code of mlx5e_stats_flower()

2021-03-09 Thread Roi Dayan
On 2021-03-06 3:47 PM, Jia-Ju Bai wrote: When mlx5e_tc_get_counter() returns NULL to counter or mlx5_devcom_get_peer_data() returns NULL to peer_esw, no error return code of mlx5e_stats_flower() is assigned. To fix this bug, err is assigned with -EINVAL in these cases. Reported-by: TOTE Robot

Re: [PATCH] net/mlx5e: include net/nexthop.h where needed

2021-03-08 Thread Roi Dayan
On 2021-03-08 5:31 PM, Arnd Bergmann wrote: From: Arnd Bergmann drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12: error: implicit declaration of function 'fib_info_nh' [-Werror,-Wimplicit-function-declaration] fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;

Re: [PATCH] net/mlx5: use kvfree() for memory allocated with kvzalloc()

2021-03-03 Thread Roi Dayan
(in); + kvfree(spec); + kvfree(in); return err; } thanks! Reviewed-by: Roi Dayan

Re: [PATCH iproute2] dcb: Fix compilation warning about reallocarray

2021-02-22 Thread Roi Dayan
On 2021-02-22 2:09 PM, Roi Dayan wrote: To use reallocarray we need to add bsd/stdlib.h. dcb_app.c: In function ‘dcb_app_table_push’: dcb_app.c:68:25: warning: implicit declaration of function ‘reallocarray’; did you mean ‘realloc’? Fixes: 8e9bed1493f5 ("dcb: Add a subtool for the DC

[PATCH iproute2] dcb: Fix compilation warning about reallocarray

2021-02-22 Thread Roi Dayan
To use reallocarray we need to add bsd/stdlib.h. dcb_app.c: In function ‘dcb_app_table_push’: dcb_app.c:68:25: warning: implicit declaration of function ‘reallocarray’; did you mean ‘realloc’? Fixes: 8e9bed1493f5 ("dcb: Add a subtool for the DCB APP object") Signed-off-by: Roi Dayan

[PATCH iproute2-next v2] dcb: Fix compilation warning about reallocarray

2021-02-22 Thread Roi Dayan
pp.c:68:25: warning: implicit declaration of function ‘reallocarray’; did you mean ‘realloc’? Fixes: 8e9bed1493f5 ("dcb: Add a subtool for the DCB APP object") Signed-off-by: Roi Dayan --- Notes: v2 - tag for iproute next - replace reallocarray with realloc instead of messi

Re: [PATCH iproute2] dcb: Fix compilation warning about reallocarray

2021-02-22 Thread Roi Dayan
On 2021-02-22 12:51 PM, Roi Dayan wrote: To use reallocarray we need to add bsd/stdlib.h. dcb_app.c: In function ‘dcb_app_table_push’: dcb_app.c:68:25: warning: implicit declaration of function ‘reallocarray’; did you mean ‘realloc’? Fixes: 8e9bed1493f5 ("dcb: Add a subtool for the DC

[PATCH iproute2] dcb: Fix compilation warning about reallocarray

2021-02-22 Thread Roi Dayan
To use reallocarray we need to add bsd/stdlib.h. dcb_app.c: In function ‘dcb_app_table_push’: dcb_app.c:68:25: warning: implicit declaration of function ‘reallocarray’; did you mean ‘realloc’? Fixes: 8e9bed1493f5 ("dcb: Add a subtool for the DCB APP object") Signed-off-by: Roi Dayan

Re: [PATCH iproute2 v4 1/1] build: Fix link errors on some systems

2021-02-22 Thread Roi Dayan
On 2021-01-12 2:21 PM, Petr Machata wrote: Roi Dayan writes: Since moving get_rate() and get_size() from tc to lib, on some systems we fail to link because of missing math lib. Move the functions that require math lib to their own c file and add -lm to dcb that now use those functions

Re: [PATCH iproute2 v4 1/1] build: Fix link errors on some systems

2021-02-22 Thread Roi Dayan
On 2021-02-22 12:36 PM, Roi Dayan wrote: On 2021-01-12 2:21 PM, Petr Machata wrote: Roi Dayan writes: Since moving get_rate() and get_size() from tc to lib, on some systems we fail to link because of missing math lib. Move the functions that require math lib to their own c file and add

Re: [PATCH net 1/1] netfilter: conntrack: Check offload bit on table dump

2021-02-07 Thread Roi Dayan
On 2021-02-03 2:50 PM, Florian Westphal wrote: Roi Dayan wrote: Do you think rhashtable_insert_fast() in flow_offload_add() blocks for dozens of seconds? I'm not sure. but its not only that but also the time to be in established state as only then we offload. That makes it even

Re: [PATCH net 1/1] netfilter: conntrack: Check offload bit on table dump

2021-02-02 Thread Roi Dayan
On 2021-02-01 5:25 PM, Florian Westphal wrote: Roi Dayan wrote: TCP initial timeout is one minute, UDP 30 seconds. That should surely be enough to do flow_offload_add (which extends the timeout)? Yes, flow_offload_add() extends the timeout. but it needs to finish. Maybe something is

Re: [PATCH net 1/1] netfilter: conntrack: Check offload bit on table dump

2021-02-01 Thread Roi Dayan
On 2021-02-01 1:50 PM, Florian Westphal wrote: Roi Dayan wrote: There is a 3rd caller nf_ct_gc_expired() which being called by 3 other callers: nf_conntrack_find() nf_conntrack_tuple_taken() early_drop_list() Hm. I'm not sure yet what path is triggering this bug. Florian came up

Re: [PATCH net 1/1] netfilter: conntrack: Check offload bit on table dump

2021-01-31 Thread Roi Dayan
On 2021-02-01 5:08 AM, Pablo Neira Ayuso wrote: Hi Roi, On Sun, Jan 31, 2021 at 03:18:34PM +0200, Roi Dayan wrote: [...] Hi Pablo, We did more tests with just updating the timeout in the 2 callers and it's not enough. We reproduce the issue of rules being timed out just now frim diff

Re: [PATCH net 1/1] netfilter: conntrack: Check offload bit on table dump

2021-01-31 Thread Roi Dayan
On 2021-01-31 12:01 PM, Roi Dayan wrote: On 2021-01-30 2:01 PM, Pablo Neira Ayuso wrote: Hi Roi, On Thu, Jan 28, 2021 at 09:40:52AM +0200, Roi Dayan wrote: Currently, offloaded flows might be deleted when executing conntrack -L or cat /proc/net/nf_conntrack while rules being offloaded

[PATCH net 1/1] netfilter: conntrack: Check offload bit on table dump

2021-01-27 Thread Roi Dayan
n for offloaded flows when dumping the entries. Fixes: 90964016e5d3 ("netfilter: nf_conntrack: add IPS_OFFLOAD status bit") Signed-off-by: Roi Dayan Reviewed-by: Oz Shlomo --- include/net/netfilter/nf_conntrack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includ

[PATCH iproute2 v4 1/1] build: Fix link errors on some systems

2021-01-12 Thread Roi Dayan
: Move sprint_size() from tc here, add print_size()") Signed-off-by: Roi Dayan --- Notes: v4 - Use SPDX license excerpt v3 - Modify _IS_JSON_CONTEXT comparison order. v2 - As suggested by Petr. Instead of adding -lm to all utils move the functions t

Re: [PATCH iproute2 v3 1/1] build: Fix link errors on some systems

2021-01-12 Thread Roi Dayan
On 2021-01-11 6:51 PM, Petr Machata wrote: Roi Dayan writes: diff --git a/lib/json_print_math.c b/lib/json_print_math.c new file mode 100644 index ..3d560defcd3e --- /dev/null +++ b/lib/json_print_math.c @@ -0,0 +1,46 @@ +/* + * json_print_math.c "print regul

Re: [net-next 09/15] net/mlx5e: CT: Support offload of +trk+new ct rules

2021-01-09 Thread Roi Dayan
On 2021-01-08 11:59 PM, Marcelo Ricardo Leitner wrote: Hi, On Thu, Jan 07, 2021 at 09:30:48PM -0800, Saeed Mahameed wrote: @@ -1429,6 +1600,14 @@ mlx5_tc_ct_add_ft_cb(struct mlx5_tc_ct_priv *ct_priv, u16 zone, if (err) goto err_insert; + nf_ct_zone_init(&ctzone, z

Re: [net-next 08/15] net/mlx5e: CT: Preparation for offloading +trk+new ct rules

2021-01-09 Thread Roi Dayan
On 2021-01-10 9:45 AM, Roi Dayan wrote: On 2021-01-08 11:48 PM, Marcelo Ricardo Leitner wrote: Hi, On Thu, Jan 07, 2021 at 09:30:47PM -0800, Saeed Mahameed wrote: From: Roi Dayan Connection tracking associates the connection state per packet. The first packet of a connection is

Re: [net-next 08/15] net/mlx5e: CT: Preparation for offloading +trk+new ct rules

2021-01-09 Thread Roi Dayan
On 2021-01-08 11:48 PM, Marcelo Ricardo Leitner wrote: Hi, On Thu, Jan 07, 2021 at 09:30:47PM -0800, Saeed Mahameed wrote: From: Roi Dayan Connection tracking associates the connection state per packet. The first packet of a connection is assigned with the +trk+new state. The connection

[PATCH iproute2 v3 1/1] build: Fix link errors on some systems

2021-01-09 Thread Roi Dayan
: Move sprint_size() from tc here, add print_size()") Signed-off-by: Roi Dayan --- Notes: v3 - Modify _IS_JSON_CONTEXT comparison order. v2 - As suggested by Petr. Instead of adding -lm to all utils move the functions that require math lib to seperate c f

[PATCH iproute2 v2 1/1] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
: Move sprint_size() from tc here, add print_size()") Signed-off-by: Roi Dayan --- Notes: v2 - As suggested by Petr. Instead of adding -lm to all utils move the functions that require math lib to seperate c files and add -lm to dcb that use those functions. dcb/

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
On 2021-01-06 4:24 PM, Petr Machata wrote: Roi Dayan writes: On 2021-01-06 3:16 PM, Petr Machata wrote: Regarding the publishing, the _jw reference can be changed to a call to is_json_context(), which does the same thing. Then _jw can stay private in json_print.c. Exposing an

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
On 2021-01-06 3:16 PM, Petr Machata wrote: Roi Dayan writes: On 2021-01-06 10:42 AM, Roi Dayan wrote: On 2021-01-04 6:07 PM, Petr Machata wrote: I think that just adding an unnecessary -lm is more of a tidiness issue than anything else. One way to avoid it is to split the -lm deps out

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
On 2021-01-06 10:42 AM, Roi Dayan wrote: On 2021-01-04 6:07 PM, Petr Machata wrote: Roi Dayan writes: Since moving get_rate() and get_size() from tc to lib, on some systems we fail to link because of missing the math lib. Move the link flag from tc makefile to the main makefile. Hmm

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
On 2021-01-04 6:07 PM, Petr Machata wrote: Roi Dayan writes: Since moving get_rate() and get_size() from tc to lib, on some systems we fail to link because of missing the math lib. Move the link flag from tc makefile to the main makefile. Hmm, yeah, it gets optimized out on x86-64. The

[PATCH iproute2] build: Fix link errors on some systems

2020-12-30 Thread Roi Dayan
nt' json_print.c:(.text+0x157c): undefined reference to `rint' Fixes: f3be0e6366ac ("lib: Move get_rate(), get_rate64() from tc here") Fixes: 44396bdfcc0a ("lib: Move get_size() from tc here") Fixes: adbe5de96662 ("lib: Move sprint_size() from tc here, add print_size(

Re: [PATCH iproute2 1/1] tc flower: fix parsing vlan_id and vlan_prio

2020-11-24 Thread Roi Dayan
On 2020-11-24 2:26 PM, Roi Dayan wrote: When protocol is vlan then eth_type is set to the vlan eth type. So when parsing vlan_id and vlan_prio need to check tc_proto is vlan and not eth_type. Fixes: 4c551369e083 ("tc flower: use right ethertype in icmp/arp parsing") Signed-off-by:

[PATCH iproute2 1/1] tc flower: fix parsing vlan_id and vlan_prio

2020-11-24 Thread Roi Dayan
When protocol is vlan then eth_type is set to the vlan eth type. So when parsing vlan_id and vlan_prio need to check tc_proto is vlan and not eth_type. Fixes: 4c551369e083 ("tc flower: use right ethertype in icmp/arp parsing") Signed-off-by: Roi Dayan --- tc/f_flower.c | 4 ++-- 1 fi

[PATCH iproute2-next 1/1] tc flower: fix parsing vlan_id and vlan_prio

2020-11-24 Thread Roi Dayan
When protocol is vlan then eth_type is set to the vlan eth type. So when parsing vlan_id and vlan_prio need to check tc_proto is vlan and not eth_type. Fixes: 4c551369e083 ("tc flower: use right ethertype in icmp/arp parsing") Signed-off-by: Roi Dayan --- tc/f_flower.c | 4 ++-- 1 fi

Re: [PATCH iproute2-next v2] tc flower: use right ethertype in icmp/arp parsing

2020-11-24 Thread Roi Dayan
On 2020-11-24 11:39 AM, Roi Dayan wrote: On 2020-11-14 5:12 AM, David Ahern wrote: On 11/10/20 12:53 AM, Zahari Doychev wrote: Currently the icmp and arp parsing functions are called with incorrect ethtype in case of vlan or cvlan filter options. In this case either cvlan_ethtype or

Re: [PATCH iproute2-next v2] tc flower: use right ethertype in icmp/arp parsing

2020-11-24 Thread Roi Dayan
On 2020-11-14 5:12 AM, David Ahern wrote: On 11/10/20 12:53 AM, Zahari Doychev wrote: Currently the icmp and arp parsing functions are called with incorrect ethtype in case of vlan or cvlan filter options. In this case either cvlan_ethtype or vlan_ethtype has to be used. The ethtype is now up

Re: [PATCH mlx5-next v1 11/11] RDMA/mlx5: Remove IB representors dead code

2020-11-02 Thread Roi Dayan
struct mlx5_ib_dev *mlx5_ib_rep_to_dev(struct mlx5_eswitch_rep *rep) -{ - return rep->rep_data[REP_IB].priv; -} #endif /* __MLX5_IB_REP_H__ */ -- 2.28.0 Reviewed-by: Roi Dayan

Re: [PATCH mlx5-next v1 10/11] net/mlx5: Simplify eswitch mode check

2020-11-02 Thread Roi Dayan
tic inline bool is_mdev_switchdev_mode(struct mlx5_core_dev *dev) +{ + return mlx5_eswitch_mode(dev) == MLX5_ESWITCH_OFFLOADS; +} #endif -- 2.28.0 Reviewed-by: Roi Dayan

Re: [PATCH mlx5-next v1 02/11] net/mlx5: Properly convey driver version to firmware

2020-11-02 Thread Roi Dayan
g_size, "%u.%u.%u", +(u8)(LINUX_VERSION_CODE >> 16), (u8)(LINUX_VERSION_CODE >> 8), +(u16)(LINUX_VERSION_CODE & 0xff)); /*Send the command*/ MLX5_SET(set_driver_version_in, in, opcode, -- 2.28.0 Reviewed-by: Roi Dayan

[PATCH net] net/sched: act_ct: Fix adding udp port mangle operation

2020-10-19 Thread Roi Dayan
Need to use the udp header type and not tcp. Fixes: 9c26ba9b1f45 ("net/sched: act_ct: Instantiate flow table entry actions") Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey --- net/sched/act_ct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/act_

[PATCH ethtool] ethtool.spec: Add bash completion script

2020-08-03 Thread Roi Dayan
After the additon of the bash completion script, packaging using the default spec file fails for installed but not packaged error. so package it. Fixes: 9b802643d7bd ("ethtool: Add bash-completion script") Signed-off-by: Roi Dayan --- ethtool.spec.in | 1 + 1 file changed, 1 insertio

Re: [PATCH net v2 1/2] netfilter: conntrack: Move nf_ct_offload_timeout to header file

2020-08-03 Thread Roi Dayan
On 2020-08-03 2:03 PM, Pablo Neira Ayuso wrote: > On Mon, Aug 03, 2020 at 10:33:04AM +0300, Roi Dayan wrote: >> To be used by callers from other modules. >> >> Signed-off-by: Roi Dayan >> Reviewed-by: Oz Shlomo >> --- >> include/net/netfilter/n

[PATCH net v2 0/2] netfilter: conntrack: Fix CT offload timeout on heavily loaded systems

2020-08-03 Thread Roi Dayan
counting on GC to finish first iteration over all conns before the initial timeout. First commit is to expose the function that updates the timeout. Second commit is to use it from flow_offload_add(). Roi Dayan (2): netfilter: conntrack: Move nf_ct_offload_timeout to header file netfilter

[PATCH net v2 2/2] netfilter: flowtable: Set offload timeout when adding flow

2020-08-03 Thread Roi Dayan
counting on GC to finish first iteration over all conns before the initial timeout. Fixes: 90964016e5d3 ("netfilter: nf_conntrack: add IPS_OFFLOAD status bit") Signed-off-by: Roi Dayan --- Notes: v2 - timeout fix from flow_offload_add() instead of act_ct net

[PATCH net v2 1/2] netfilter: conntrack: Move nf_ct_offload_timeout to header file

2020-08-03 Thread Roi Dayan
To be used by callers from other modules. Signed-off-by: Roi Dayan Reviewed-by: Oz Shlomo --- include/net/netfilter/nf_conntrack.h | 12 net/netfilter/nf_conntrack_core.c| 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/net/netfilter

Re: [PATCH net 2/2] net/sched: act_ct: Set offload timeout when setting the offload bit

2020-08-03 Thread Roi Dayan
On 2020-07-29 8:10 PM, Marcelo Ricardo Leitner wrote: > On Wed, Jul 29, 2020 at 03:55:53PM +0300, Roi Dayan wrote: >> >> >> On 2020-07-28 5:42 PM, Marcelo Ricardo Leitner wrote: >>> On Tue, Jul 28, 2020 at 02:57:59PM +0300, Roi Dayan wrote: >>>> On heav

Re: [PATCH net 2/2] net/sched: act_ct: Set offload timeout when setting the offload bit

2020-07-29 Thread Roi Dayan
On 2020-07-28 5:42 PM, Marcelo Ricardo Leitner wrote: > On Tue, Jul 28, 2020 at 02:57:59PM +0300, Roi Dayan wrote: >> On heavily loaded systems the GC can take time to go over all existing >> conns and reset their timeout. At that time other calls like from >> nf_connt

[PATCH net 1/2] netfilter: conntrack: Move nf_ct_offload_timeout to header file

2020-07-28 Thread Roi Dayan
To be used by callers from other modules. Signed-off-by: Roi Dayan Reviewed-by: Oz Shlomo --- include/net/netfilter/nf_conntrack.h | 12 net/netfilter/nf_conntrack_core.c| 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/net/netfilter

[PATCH net 0/2] netfilter: conntrack: Fix CT offload timeout on heavily loaded systems

2020-07-28 Thread Roi Dayan
counting on GC to finish first iteration over all conns before the initial timeout. First commit is to expose the function that updates the timeout. Second commit is to use it from act_ct. Roi Dayan (2): netfilter: conntrack: Move nf_ct_offload_timeout to header file net/sched: act_ct: Set

[PATCH net 2/2] net/sched: act_ct: Set offload timeout when setting the offload bit

2020-07-28 Thread Roi Dayan
counting on GC to finish first iteration over all conns before the initial timeout. Fixes: 64ff70b80fd4 ("net/sched: act_ct: Offload established connections to flow table") Signed-off-by: Roi Dayan Reviewed-by: Oz Shlomo --- net/sched/act_ct.c | 2 ++ 1 file changed, 2 insertion

Re: [PATCH net-next v3 1/3] net/mlx5e: Implicitly decap the tunnel packet when necessary

2020-06-21 Thread Roi Dayan
On 2020-06-18 11:36 AM, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > The commit 0a7fcb78cc21 ("net/mlx5e: Support inner header rewrite with > goto action"), will decapsulate the tunnel packets if there is a goto > action in chain 0. But in some case, we don't want do that, for exa

[PATCH net 0/2] remove dependency between mlx5, act_ct, nf_flow_table

2020-06-14 Thread Roi Dayan
Hi, Some exported functions from act_ct and nf_flow_table being used in mlx5_core. This leads that mlx5 module always require act_ct and nf_flow_table modules. Those small exported functions can be moved to the header files to avoid this module dependency. Thanks, Roi Alaa Hleihel (2): net/sch

[PATCH net 2/2] netfilter: flowtable: Make nf_flow_table_offload_add/del_cb inline

2020-06-14 Thread Roi Dayan
. To relax the hard-dependency between the modules, we unexport these functions and make them static inline. Fixes: 978703f42549 ("netfilter: flowtable: Add API for registering to flow table events") Signed-off-by: Alaa Hleihel Reviewed-by: Roi Dayan --- include/net/netfilter/nf_flow_ta

[PATCH net 1/2] net/sched: act_ct: Make tcf_ct_flow_table_restore_skb inline

2020-06-14 Thread Roi Dayan
action (ct_metadata action) in the first place. To relax the hard-dependency between the modules, we unexport this function and make it a static inline one. Fixes: 30b0cf90c6dd ("net/sched: act_ct: Support restoring conntrack info on skbs") Signed-off-by: Alaa Hleihel Reviewed-by:

[PATCH iproute2] ip address: Fix loop initial declarations are only allowed in C99

2020-06-11 Thread Roi Dayan
ote: use option -std=c99 or -std=gnu99 to compile your code This commit fixes the single place needed for compilation to pass. Fixes: 9d59c86e575b ("iproute2: ip addr: Organize flag properties structurally") Signed-off-by: Roi Dayan --- ip/ipaddress.c | 4 +++- 1 file changed, 3 ins

Re: [PATCH net] netfilter: flowtable: Add pending bit for offload work

2020-05-11 Thread Roi Dayan
On 2020-05-11 2:59 PM, Pablo Neira Ayuso wrote: > On Mon, May 11, 2020 at 11:32:36AM +0300, Paul Blakey wrote: >> On 5/11/2020 1:14 AM, Pablo Neira Ayuso wrote: > [...] @@ -831,9 +832,14 @@ static void flow_offload_queue_work(struct flow_offload_work *offload) { struct f

Re: [PATCH net] netfilter: flowtable: Add pending bit for offload work

2020-05-11 Thread Roi Dayan
On 2020-05-11 2:59 PM, Pablo Neira Ayuso wrote: > On Mon, May 11, 2020 at 11:32:36AM +0300, Paul Blakey wrote: >> On 5/11/2020 1:14 AM, Pablo Neira Ayuso wrote: > [...] @@ -831,9 +832,14 @@ static void flow_offload_queue_work(struct flow_offload_work *offload) { struct f

[PATCH net] netfilter: nf_flow_table_offload: Remove WQ_MEM_RECLAIM from workqueue

2020-05-10 Thread Roi Dayan
[ 485.681699] invalid_op+0x28/0x30 Fixes: 7da182a998d6 ("netfilter: flowtable: Use work entry per offload command") Reported-by: Marcelo Ricardo Leitner Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey --- net/netfilter/nf_flow_table_offload.c | 2 +- 1 file changed, 1 inser

Re: mlx5: Panic with conntrack offload

2020-05-10 Thread Roi Dayan
On 2020-04-24 7:10 AM, Marcelo Ricardo Leitner wrote: > Hi Paul, > > I'm triggering this panic out of 1802136023c01075, net-next today > (disregard the hash at the end of the kernel version). > I have a dual-port CX5 with VF LAG, with 1 guest and 2 VFs on it, with > different subnets. Ovs OF fl

Re: [PATCH net-next 1/3] net/mlx5e: Implicitly decap the tunnel packet when necessary

2020-04-30 Thread Roi Dayan
On 2020-04-28 8:24 AM, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > The commit 0a7fcb78cc21 ("net/mlx5e: Support inner header rewrite with > goto action"), will decapitate the tunnel packets if there is a goto > action in chain 0. But in some case, we don't want do that, for examp

Re: [PATCH net-next 3/3] net/mlx5e: Fix the code style

2020-04-30 Thread Roi Dayan
ffload_stats(const struct > net_device *dev, int attr_i > { > switch (attr_id) { > case IFLA_OFFLOAD_XSTATS_CPU_HIT: > - return true; > + return true; > } > > return false; > Reviewed-by: Roi Dayan

Re: [PATCH net-next 2/3] net/mlx5e: Introduce mlx5e_eswitch_rep_uplink_priv helper

2020-04-30 Thread Roi Dayan
On 2020-04-28 8:24 AM, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > Introduce the mlx5e_eswitch_rep_uplink_priv helper > to make the codes readable. > > Signed-off-by: Tonghao Zhang > --- > drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 4 +-- > drivers/net/ethernet/mell

Re: [patch net-next v2] mlx5: Add missing init_net check in FIB notifier

2019-09-01 Thread Roi Dayan
if (!net_eq(info->net, &init_net)) > + return NOTIFY_DONE; > + > if (info->family != AF_INET) > return NOTIFY_DONE; > > thanks Acked-by: Roi Dayan

Re: [PATCH net-next] net/mlx5e: Allow dropping specific tunnel packets

2019-08-01 Thread Roi Dayan
ON_DROP))) > return false; > > if (actions & MLX5_FLOW_CONTEXT_ACTION_MOD_HDR) > thanks! Reviewed-by: Roi Dayan

Re: Bug or mis configuration for mlx5e lag and multipath

2019-05-28 Thread Roi Dayan
esw0 and esw1 both have the rule. > > The test case is based on the master branch of the net git tree. ok thanks for reporting. we'll have to check it. > > 在 2019/5/23 23:15, Roi Dayan 写道: >> >> On 20/05/2019 04:53, wenxu wrote: >>> Hi Roi & Saeed, >&g

Re: Bug or mis configuration for mlx5e lag and multipath

2019-05-23 Thread Roi Dayan
On 20/05/2019 04:53, wenxu wrote: > Hi Roi & Saeed, > > I just test the mlx5e lag and mutipath feature. There are some suituation the > outgoing can't be offloaded. > > ovs configureation as following. > > # ovs-vsctl show > dfd71dfb-6e22-423e-b088-d2022103af6b >     Bridge "br0" >     Po

Re: [PATCH] net/mlx5e: Add bonding device for indr block to offload the packet received from bonding device

2019-05-19 Thread Roi Dayan
On 17/05/2019 11:21, we...@ucloud.cn wrote: > From: wenxu > > The mlx5e support the lag mode. When add mlx_p0 and mlx_p1 to bond0. > packet received from mlx_p0 or mlx_p1 and in the ingress tc flower > forward to vf0. The tc rule can't be offloaded for the non indr > rejistor block for the bond

Re: [PATCH] net/mlx5e: restrict the real_dev of vlan device is the same as uplink device

2019-05-19 Thread Roi Dayan
ffload(priv, netdev) && >>> - !is_vlan_dev(netdev)) >>> + !(is_vlan_dev(netdev) && vlan_dev_real_dev(netdev) == >>> rpriv->netdev)) >>> return NOTIFY_OK; >>> >>> switch (event) { thanks! you should add a fixes line Fixes: 35a605db168c ("net/mlx5e: Offload TC e-switch rules with ingress VLAN device") beside that all good. Reviewed-by: Roi Dayan

Re: [PATCH] net/mlx5e: Allow matching only enc_key_id/enc_dst_port for decapsulation action

2019-05-12 Thread Roi Dayan
ISSECTOR_KEY_ENC_IPV4_ADDRS) || > + flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS) || > + flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_KEYID) || > + flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_PORTS)) { > + if (parse_tunnel_attr(priv, spec, f, filter_dev, > tunnel_match_level)) > return -EOPNOTSUPP; > - } > > /* In decap flow, header pointers should point to the inner >* headers, outer header were already set by parse_tunnel_attr > Reviewed-by: Roi Dayan

Re: [PATCH net v2 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-04 Thread Roi Dayan
(!LEGAL_VPORT(esw, vport) || is_multicast_ether_addr(mac)) > return -EINVAL; > @@ -1945,7 +1945,7 @@ int mlx5_eswitch_get_vport_config(struct mlx5_eswitch > *esw, > { > struct mlx5_vport *evport; > > - if (!MLX5_CAP_GEN(esw->dev, vport_group_manager)) > + if (!esw || !MLX5_CAP_GEN(esw->dev, vport_group_manager)) > return -EPERM; > if (!LEGAL_VPORT(esw, vport)) > return -EINVAL; > Reviewed-by: Roi Dayan

Re: [PATCH net v2 2/2] net/mlx5: Avoid panic when setting vport rate

2019-03-04 Thread Roi Dayan
; + fw_max_bw_share >= MLX5_MIN_BW_SHARE; > + max_rate_supported = MLX5_CAP_QOS(esw->dev, esw_rate_limit); > + > if ((min_rate && !min_rate_supported) || (max_rate && > !max_rate_supported)) > return -EOPNOTSUPP; > > Reviewed-by: Roi Dayan

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread Roi Dayan
On 04/03/2019 03:26, Tonghao Zhang wrote: > On Sun, Mar 3, 2019 at 8:42 PM Roi Dayan wrote: >> >> >> >> On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: >>> From: Tonghao Zhang >>> >>> If we try to set VFs mac address on a VF (not PF)

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread Roi Dayan
On 04/03/2019 03:04, Tonghao Zhang wrote: > On Sun, Mar 3, 2019 at 8:42 PM Roi Dayan wrote: >> >> >> >> On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: >>> From: Tonghao Zhang >>> >>> If we try to set VFs mac address on a VF (not PF)

Re: [PATCH][next] net/mlx5e: Remove redundant assignment

2019-03-03 Thread Roi Dayan
commit doesn't fix any real issue but is more of a cleanup. so I'm not sure if fixes line is relevant or not. beside that looks ok. Reviewed-by: Roi Dayan > Signed-off-by: Gustavo A. R. Silva > --- > drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6 ++ >

Re: [PATCH net 2/2] net/mlx5: Avoid panic when setting VF rate

2019-03-03 Thread Roi Dayan
On 03/03/2019 16:12, Roi Dayan wrote: > > > On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: >> From: Tonghao Zhang >> >> If we try to set VFs rate on a VF (not PF) net device, the kernel >> will be crash. The commands are show as below: >> >&

Re: [PATCH net 2/2] net/mlx5: Avoid panic when setting VF rate

2019-03-03 Thread Roi Dayan
On 03/03/2019 16:12, Roi Dayan wrote: > > > On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: >> From: Tonghao Zhang >> >> If we try to set VFs rate on a VF (not PF) net device, the kernel >> will be crash. The commands are show as below: >> >&

Re: [PATCH net 2/2] net/mlx5: Avoid panic when setting VF rate

2019-03-03 Thread Roi Dayan
On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > If we try to set VFs rate on a VF (not PF) net device, the kernel > will be crash. The commands are show as below: > > $ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs > $ ip link set $MLX_VF0 vf 0 rate 100 a

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread Roi Dayan
On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > If we try to set VFs mac address on a VF (not PF) net device, > the kernel will be crash. The commands are show as below: > > $ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs > $ ip link set $MLX_VF0 vf 0 mac

Re: [PATCH net-next v4 4/4] net/mlx5e: Return -EOPNOTSUPP when attempting to offload an unsupported action

2019-02-28 Thread Roi Dayan
; + NL_SET_ERR_MSG_MOD(extack, "The offload action is not > supported"); > + return -EOPNOTSUPP; > } > } > > @@ -2616,7 +2628,8 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, > break; > } > default: > - return -EINVAL; > + NL_SET_ERR_MSG_MOD(extack, "The offload action is not > supported"); > + return -EOPNOTSUPP; > } > } > > Reviewed-by: Roi Dayan

Re: [PATCH net v1] net/mlx5e: Correctly use the namespace type when allocating pedit action

2019-02-27 Thread Roi Dayan
parse_attr, hdrs, extack); > if (err) > return err; > Reviewed-by: Roi Dayan

Re: [PATCH net-next v3 4/4] net/mlx5e: Return -EOPNOTSUPP when attempting to offload an unsupported action

2019-02-27 Thread Roi Dayan
On 26/02/2019 14:27, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > * Now the encapsulation is not supported for mlx5 VFs. When we try to > offload that action, the -EINVAL is returned, but not -EOPNOTSUPP. > This patch changes the returned value and ignore to confuse user. > The com

Re: [PATCH net-next v2] net: sched: act_tunnel_key: fix metadata handling

2019-02-27 Thread Roi Dayan
dst_cache_destroy(&info->dst_cache); > +#endif > dst_release(&p->tcft_enc_metadata->dst); > + } > kfree_rcu(p, rcu); > } > > @@ -384,7 +390,8 @@ static int tunnel_key_init(struct net *net, struct nlattr > *nla, > > release_dst_cache: > #ifdef CONFIG_DST_CACHE > - dst_cache_destroy(&metadata->u.tun_info.dst_cache); > + if (metadata) > + dst_cache_destroy(&metadata->u.tun_info.dst_cache); > #endif > release_tun_meta: > dst_release(&metadata->dst); > @@ -401,15 +408,8 @@ static void tunnel_key_release(struct tc_action *a) > { > struct tcf_tunnel_key *t = to_tunnel_key(a); > struct tcf_tunnel_key_params *params; > -#ifdef CONFIG_DST_CACHE > - struct ip_tunnel_info *info; > -#endif > > params = rcu_dereference_protected(t->params, 1); > -#ifdef CONFIG_DST_CACHE > - info = ¶ms->tcft_enc_metadata->u.tun_info; > - dst_cache_destroy(&info->dst_cache); > -#endif > tunnel_key_release_params(params); > } > > Reviewed-by: Roi Dayan

Re: [PATCH net-next v2 1/5] net/mlx5e: Return -EOPNOTSUPP when modify header action zero

2019-02-26 Thread Roi Dayan
On 25/02/2019 12:40, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > When max modify header action is zero, we return -EOPNOTSUPP > directly. In this way, we can ignore wrong message info (e.g. > "mlx5: parsed 0 pedit actions, can't do more"). > > This happens when offloading pedit a

Re: [PATCH net-next v2 2/5] net/mlx5e: Make the log friendly when decapsulation offload not supported

2019-02-26 Thread Roi Dayan
"decapsulation offload is not supported for %s net > device (%d)\n", > - mlx5e_netdev_kind(filter_dev), tunnel_type); > + "decapsulation offload is not supported for %s > (kind: \"%s\")\n", > + netdev_name(filter_dev), > + mlx5e_netdev_kind(filter_dev)); > + > return -EOPNOTSUPP; > } > return err; > Reviewed-by: Roi Dayan

Re: [PATCH net-next v2 5/5] net/mlx5e: Return -EOPNOTSUPP when attempting to offload an unsupported action

2019-02-26 Thread Roi Dayan
default: > - return -EINVAL; > + NL_SET_ERR_MSG_MOD(extack, "The offload action is not > supported"); > + return -EOPNOTSUPP; > } > } > > Reviewed-by: Roi Dayan

Re: [PATCH net-next v2 4/5] net/mlx5e: Deletes unnecessary setting of esw_attr->parse_attr

2019-02-26 Thread Roi Dayan
parse_attr->tun_info[attr->out_count] = *info; > encap = false; > - attr->parse_attr = parse_attr; > attr->dests[attr->out_count].flags |= > MLX5_ESW_DEST_ENCAP; > attr->out_count++; > Reviewed-by: Roi Dayan

Re: [PATCH net-next v2 3/5] net/mlx5e: Remove 'parse_attr' argument in parse_tc_fdb_actions()

2019-02-26 Thread Roi Dayan
t; > @@ -2796,7 +2796,7 @@ static bool is_peer_flow_needed(struct mlx5e_tc_flow > *flow) > if (err) > goto err_free; > > - err = parse_tc_fdb_actions(priv, &rule->action, parse_attr, flow, > extack); > + err = parse_tc_fdb_actions(priv, &rule->action, flow, extack); > if (err) > goto err_free; > > Reviewed-by: Roi Dayan

[PATCH net] net/sched: cls_flower: Remove old entries from rhashtable

2018-12-19 Thread Roi Dayan
When replacing a rule we add the new rule to the rhashtable but only remove the old if not in skip_sw. This commit fix this and remove the old rule anyway. Fixes: 35cc3cefc4de ("net/sched: cls_flower: Reject duplicated rules also under skip_sw") Signed-off-by: Roi Dayan Reviewed-by: V

[PATCH iproute2] tc: Fix output of ip attributes

2018-07-03 Thread Roi Dayan
Example output is of tos and ttl. Befoe this fix the format used %x caused output of the pointer instead of the intended string created in the out variable. Fixes: e28b88a464c4 ("tc: jsonify flower filter") Signed-off-by: Roi Dayan --- tc/f_flower.c | 2 +- 1 file changed, 1 inser

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

2018-06-04 Thread Roi Dayan
On 03/06/2018 22:39, Jiri Pirko wrote: Sun, Jun 03, 2018 at 08:33:25PM CEST, xiyou.wangc...@gmail.com wrote: On Wed, May 30, 2018 at 1:17 AM, Paul Blakey wrote: Two of the fixes are for my multiple mask patch Paul Blakey (2): cls_flower: Fix missing free of rhashtable cls_flower: Fix

[PATCH iproute2-next] tc: Fix compilation error with old iptables

2018-03-27 Thread Roi Dayan
The compat_rev field does not exists in old versions of iptables. e.g. iptables 1.4. Fixes: dd29621578d2 ("tc: add em_ipt ematch for calling xtables matches from tc matching context") Signed-off-by: Roi Dayan --- tc/em_ipt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tc/

[PATCH net] net/sched: Fix update of lastuse in act modules implementing stats_update

2017-12-25 Thread Roi Dayan
assed lastuse argument") Fixes: 9fea47d93bcc ("net/sched: act_gact: Update statistics when offloaded to hardware") Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Acked-by: Jiri Pirko --- net/sched/act_gact.c | 2 +- net/sched/act_mirred.c | 2 +- 2 files changed, 2 insert

Re: [net] vxlan: fix use-after-free on deletion

2017-06-01 Thread Roi Dayan
vxlan interface before deleting it. We add vxlan_vs_del_dev() to match vxlan_vs_add_dev() and call it from vxlan_stop() to match the call from vxlan_open(). Signed-off-by: Mark Bloch Acked-by: Jiri Benc Hi, I did some tests and didn't reproduce the original kasan issue reported. Tested-by: Roi Dayan

[PATCH iproute2] devlink: Add option to set and show eswitch encapsulation support

2017-05-20 Thread Roi Dayan
tunnel key action. Possible values are enable/disable. Signed-off-by: Roi Dayan Reviewed-by: Jiri Pirko --- devlink/devlink.c | 48 +++- man/man8/devlink-dev.8 | 13 + 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/devlink

[PATCH iproute2 net-next] devlink: Add json and pretty options to help and man

2017-03-06 Thread Roi Dayan
While at it also fixed missing double dash for long opts. Signed-off-by: Roi Dayan --- devlink/devlink.c | 2 +- man/man8/devlink.8 | 14 -- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index c357580..e90226e 100644 --- a

  1   2   >