* ct_act can't offload in hardware
@ 2020-03-16 8:23 wenxu
2020-03-16 9:18 ` Paul Blakey
2020-03-16 9:29 ` Paul Blakey
0 siblings, 2 replies; 3+ messages in thread
From: wenxu @ 2020-03-16 8:23 UTC (permalink / raw)
To: Paul Blakey; +Cc: Linux Kernel Network Developers
Hi paul,
I test the ct offload with tc in net-next branch and meet some problem
gre_sys is a getap device.
# tc filter add dev gre_sys ingress prio 2 chain 0 proto ip flower enc_dst_ip 172.168.152.75 enc_src_ip 172.168.152.208 enc_key_id 1000 enc_tos 0x0/ff dst_ip 1.1.1.7 ct_state -trk action ct zone 1 nat pipe action goto chain 1
The rule show is not_in_hw
# tc filter ls dev gre_sys ingress
filter protocol ip pref 2 flower chain 0
filter protocol ip pref 2 flower chain 0 handle 0x1
eth_type ipv4
dst_ip 1.1.1.7
enc_dst_ip 172.168.152.75
enc_src_ip 172.168.152.208
enc_key_id 1000
enc_tos 0x0/ff
ct_state -trk
not_in_hw
action order 1: ct zone 1 nat pipe
index 1 ref 1 bind 1
action order 2: gact action goto chain 1
random type none pass val 0
index 1 ref 1 bind 1
# dmesg
mlx5_core 0000:81:00.0 net2: Chains on tunnel devices isn't supported without register metadata support
I update the fw to 16.27.1016 and also the problem is exist.
# ethtool -i net2
driver: mlx5e_rep
version: 5.6.0-rc5+
firmware-version: 16.27.1016 (MT_0000000080)
expansion-rom-version:
bus-info: 0000:81:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
Are there aome method to enable the register metadata support?
BR
wenxu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ct_act can't offload in hardware
2020-03-16 8:23 ct_act can't offload in hardware wenxu
@ 2020-03-16 9:18 ` Paul Blakey
2020-03-16 9:29 ` Paul Blakey
1 sibling, 0 replies; 3+ messages in thread
From: Paul Blakey @ 2020-03-16 9:18 UTC (permalink / raw)
To: wenxu; +Cc: Linux Kernel Network Developers
On 3/16/2020 10:23 AM, wenxu wrote:
> Hi paul,
>
>
> I test the ct offload with tc in net-next branch and meet some problem
>
>
> gre_sys is a getap device.
>
> # tc filter add dev gre_sys ingress prio 2 chain 0 proto ip flower enc_dst_ip 172.168.152.75 enc_src_ip 172.168.152.208 enc_key_id 1000 enc_tos 0x0/ff dst_ip 1.1.1.7 ct_state -trk action ct zone 1 nat pipe action goto chain 1
>
> The rule show is not_in_hw
>
> # tc filter ls dev gre_sys ingress
>
> filter protocol ip pref 2 flower chain 0
> filter protocol ip pref 2 flower chain 0 handle 0x1
> eth_type ipv4
> dst_ip 1.1.1.7
> enc_dst_ip 172.168.152.75
> enc_src_ip 172.168.152.208
> enc_key_id 1000
> enc_tos 0x0/ff
> ct_state -trk
> not_in_hw
> action order 1: ct zone 1 nat pipe
> index 1 ref 1 bind 1
>
> action order 2: gact action goto chain 1
> random type none pass val 0
> index 1 ref 1 bind 1
>
>
> # dmesg
>
> mlx5_core 0000:81:00.0 net2: Chains on tunnel devices isn't supported without register metadata support
>
> I update the fw to 16.27.1016 and also the problem is exist.
>
> # ethtool -i net2
>
> driver: mlx5e_rep
> version: 5.6.0-rc5+
> firmware-version: 16.27.1016 (MT_0000000080)
> expansion-rom-version:
> bus-info: 0000:81:00.0
> supports-statistics: yes
> supports-test: no
> supports-eeprom-access: no
> supports-register-dump: no
> supports-priv-flags: no
>
> Are there aome method to enable the register metadata support?
>
>
> BR
>
> wenxu
Hi
Originally we needed metadata support just because it was enabled by default and
it enabled the loopback feature which is what actually
needed for the above type of rules (tunnel + chain).
But after patch 1e62e222db2e0dc7af0a89c225311d319c5d1c4f - "net/mlx5: E-Switch,
Use vport metadata matching only when mandatory"
metadata is not enabled by default, and it's needed for the above.
My upstream patch
5b7cb74 "net/mlx5: E-Switch, Enable reg c1 loopback when possible"
Enabled the needed loopback feature by default as it was also needed for
connection tracking.
Instead of relying on mlx5_eswitch_vport_match_metadata_enabled(esw) in
parse_tunnel_attr(), we
need to relay on mlx5_eswitch_reg_c1_loopback_enabled(esw). I have a patch under
internal review that does this.
For now, you can either disable this
mlx5_eswitch_vport_match_metadata_enabled(esw) check in parse_tunnel_attr() or more
correctly replace it with the mlx5_eswitch_reg_c1_loopback_enabled(esw) check.
Thanks,
Paul.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ct_act can't offload in hardware
2020-03-16 8:23 ct_act can't offload in hardware wenxu
2020-03-16 9:18 ` Paul Blakey
@ 2020-03-16 9:29 ` Paul Blakey
1 sibling, 0 replies; 3+ messages in thread
From: Paul Blakey @ 2020-03-16 9:29 UTC (permalink / raw)
To: Paul Blakey, Oz Shlomo, wenxu; +Cc: Linux Kernel Network Developers
Commit: net/mlx5: en_tc: Rely just on register loopback for tunnel restoration
Register loopback which is needed for tunnel restoration, is now always
enabled if supported and not just with metadata enabled, check for
that instead.
Change-Id: If020894baa41ee6ad7f455cf457a8639a9326efb
Signed-off-by: Paul Blakey <paulb@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 044891a..a2ff7df 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -1985,11 +1985,11 @@ static int parse_tunnel_attr(struct mlx5e_priv *priv,
*match_inner = !needs_mapping;
if ((needs_mapping || sets_mapping) &&
- !mlx5_eswitch_vport_match_metadata_enabled(esw)) {
+ !mlx5_eswitch_reg_c1_loopback_enabled(esw)) {
NL_SET_ERR_MSG(extack,
- "Chains on tunnel devices isn't supported without register metadata support");
+ "Chains on tunnel devices isn't supported without register loopback support");
netdev_warn(priv->netdev,
- "Chains on tunnel devices isn't supported without register metadata support");
+ "Chains on tunnel devices isn't supported without register loopback support");
return -EOPNOTSUPP;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-16 9:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 8:23 ct_act can't offload in hardware wenxu
2020-03-16 9:18 ` Paul Blakey
2020-03-16 9:29 ` Paul Blakey
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.