diff options
author | 2020-02-17 22:08:50 +0800 | |
---|---|---|
committer | 2020-02-27 16:39:59 -0800 | |
commit | ffec97020f841fefa508db038bad58bc6def9431 (patch) | |
tree | bdb67d22eade0202929cb4c9e6b9bfc32ef4c3d5 /drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | |
parent | WAN: Replace zero-length array with flexible-array member (diff) | |
download | wireguard-linux-ffec97020f841fefa508db038bad58bc6def9431.tar.xz wireguard-linux-ffec97020f841fefa508db038bad58bc6def9431.zip |
net/mlx5e: Don't allow forwarding between uplink
We can install forwarding packets rule between uplink
in switchdev mode, as show below. But the hardware does
not do that as expected (mlnx_perf -i $PF1, we can't get
the counter of the PF1). By the way, if we add the uplink
PF0, PF1 to Open vSwitch and enable hw-offload, the rules
can be offloaded but not work fine too. This patch add a
check and if so return -EOPNOTSUPP.
$ tc filter add dev $PF0 protocol all parent ffff: prio 1 handle 1 \
flower skip_sw action mirred egress redirect dev $PF1
$ tc -d -s filter show dev $PF0 ingress
skip_sw
in_hw in_hw_count 1
action order 1: mirred (Egress Redirect to device enp130s0f1) stolen
...
Sent hardware 408954 bytes 4173 pkt
...
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_rep.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h index 3f756d51435f..8336301476a9 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h @@ -200,6 +200,7 @@ void mlx5e_rep_encap_entry_detach(struct mlx5e_priv *priv, void mlx5e_rep_queue_neigh_stats_work(struct mlx5e_priv *priv); bool mlx5e_eswitch_rep(struct net_device *netdev); +bool mlx5e_eswitch_uplink_rep(struct net_device *netdev); #else /* CONFIG_MLX5_ESWITCH */ static inline bool mlx5e_is_uplink_rep(struct mlx5e_priv *priv) { return false; } |