Skip to content

Commit 7ba58ba

Browse files
Rabie LoulouSaeed Mahameed
authored andcommitted
net/mlx5e: Offload TC e-switch rules with egress LAG device
When parsing TC FDB actions, if the egress device is a bond/team net-device which enslaved the uplink representor of the e-switch, use the uplink representor as the destination in the HW rule. Signed-off-by: Rabie Loulou <[email protected]> Signed-off-by: Aviv Heller <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 491c37e commit 7ba58ba

File tree

1 file changed

+9
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+9
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2574,6 +2574,15 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
25742574
if (switchdev_port_same_parent_id(priv->netdev,
25752575
out_dev) ||
25762576
is_merged_eswitch_dev(priv, out_dev)) {
2577+
struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
2578+
struct net_device *uplink_dev = mlx5_eswitch_uplink_get_proto_dev(esw, REP_ETH);
2579+
struct net_device *uplink_upper = netdev_master_upper_dev_get(uplink_dev);
2580+
2581+
if (uplink_upper &&
2582+
netif_is_lag_master(uplink_upper) &&
2583+
uplink_upper == out_dev)
2584+
out_dev = uplink_dev;
2585+
25772586
out_priv = netdev_priv(out_dev);
25782587
rpriv = out_priv->ppriv;
25792588
attr->dests[attr->out_count].rep = rpriv->rep;

0 commit comments

Comments
 (0)