Skip to content

Commit 5085f86

Browse files
Jianbo Liukuba-moo
authored andcommitted
net/mlx5e: Remove workaround to avoid syndrome for internal port
Previously a workaround was added to avoid syndrome 0xcdb051. It is triggered when offload a rule with tunnel encapsulation, and forwarding to another table, but not matching on the internal port in firmware steering mode. The original workaround skips internal tunnel port logic, which is not correct as not all cases are considered. As an example, if vlan is configured on the uplink port, traffic can't pass because vlan header is not added with this workaround. Besides, there is no such issue for software steering. So, this patch removes that, and returns error directly if trying to offload such rule for firmware steering. Fixes: 06b4eac ("net/mlx5e: Don't offload internal port if filter device is out device") Signed-off-by: Jianbo Liu <[email protected]> Tested-by: Frode Nordahl <[email protected]> Reviewed-by: Chris Mi <[email protected]> Reviewed-by: Ariel Levkovich <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 31f114c commit 5085f86

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <net/nexthop.h>
66
#include <net/ip_tunnels.h>
77
#include "tc_tun_encap.h"
8+
#include "fs_core.h"
89
#include "en_tc.h"
910
#include "tc_tun.h"
1011
#include "rep/tc.h"
@@ -24,10 +25,18 @@ static int mlx5e_set_int_port_tunnel(struct mlx5e_priv *priv,
2425

2526
route_dev = dev_get_by_index(dev_net(e->out_dev), e->route_dev_ifindex);
2627

27-
if (!route_dev || !netif_is_ovs_master(route_dev) ||
28-
attr->parse_attr->filter_dev == e->out_dev)
28+
if (!route_dev || !netif_is_ovs_master(route_dev))
2929
goto out;
3030

31+
if (priv->mdev->priv.steering->mode == MLX5_FLOW_STEERING_MODE_DMFS &&
32+
mlx5e_eswitch_uplink_rep(attr->parse_attr->filter_dev) &&
33+
(attr->esw_attr->dests[out_index].flags & MLX5_ESW_DEST_ENCAP)) {
34+
mlx5_core_warn(priv->mdev,
35+
"Matching on external port with encap + fwd to table actions is not allowed for firmware steering\n");
36+
err = -EINVAL;
37+
goto out;
38+
}
39+
3140
err = mlx5e_set_fwd_to_int_port_actions(priv, attr, e->route_dev_ifindex,
3241
MLX5E_TC_INT_PORT_EGRESS,
3342
&attr->action, out_index);

0 commit comments

Comments
 (0)