-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In order to offload ecmp-on-host scheme where next-hop routes are used, we will make use of HW LAG. Add accessor function to let upper layers in the driver to realize if the lag acts in multi-path mode. Signed-off-by: Roi Dayan <roid@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
- Loading branch information
Roi Dayan
authored and
Saeed Mahameed
committed
Mar 1, 2019
1 parent
e6ee5e7
commit 724b509
Showing
4 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB | ||
/* Copyright (c) 2019 Mellanox Technologies. */ | ||
|
||
#include <linux/netdevice.h> | ||
#include "lag.h" | ||
#include "mlx5_core.h" | ||
#include "eswitch.h" | ||
|
||
static bool __mlx5_lag_is_multipath(struct mlx5_lag *ldev) | ||
{ | ||
return !!(ldev->flags & MLX5_LAG_FLAG_MULTIPATH); | ||
} | ||
|
||
bool mlx5_lag_is_multipath(struct mlx5_core_dev *dev) | ||
{ | ||
struct mlx5_lag *ldev; | ||
bool res; | ||
|
||
ldev = mlx5_lag_dev_get(dev); | ||
res = ldev && __mlx5_lag_is_multipath(ldev); | ||
|
||
return res; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters