Commit 197c0002 authored by Roi Dayan's avatar Roi Dayan Committed by Saeed Mahameed

net/mlx5e: Use a simpler comparison for uplink rep

get_route_and_out_devs()  is uses the following condition
mlx5e_eswitch_rep() && mlx5e_is_uplink_rep() to check if a given netdev is the
uplink rep.

Alternatively we can just use the straight forward version
mlx5e_eswitch_uplink_rep() that only checks if a given netdev is uplink rep.
Signed-off-by: default avatarRoi Dayan <roid@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 27f9e0cc
...@@ -93,8 +93,7 @@ static int get_route_and_out_devs(struct mlx5e_priv *priv, ...@@ -93,8 +93,7 @@ static int get_route_and_out_devs(struct mlx5e_priv *priv,
else else
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (!(mlx5e_eswitch_rep(*out_dev) && if (!mlx5e_eswitch_uplink_rep(*out_dev))
mlx5e_is_uplink_rep(netdev_priv(*out_dev))))
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (mlx5e_eswitch_uplink_rep(priv->netdev) && *out_dev != priv->netdev && if (mlx5e_eswitch_uplink_rep(priv->netdev) && *out_dev != priv->netdev &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment