Skip to content

Commit

Permalink
mlx5: Implement SyncE support using DPLL infrastructure
Browse files Browse the repository at this point in the history
This is unfinished. Will change according to DPLL kernel API changes.
DPLL infrastructure is not yet merged upstream, it is maintained
out-of-tree here: https://github.com/vvfedorenko/linux-dpll/commits/net-next-dpll

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
  • Loading branch information
Jiri Pirko committed Nov 3, 2022
1 parent fd931b1 commit 96a07ed
Show file tree
Hide file tree
Showing 6 changed files with 508 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/Kconfig
Expand Up @@ -188,3 +188,11 @@ config MLX5_SF_MANAGER
port is managed through devlink. A subfunction supports RDMA, netdevice
and vdpa device. It is similar to a SRIOV VF but it doesn't require
SRIOV support.

config MLX5_DPLL
tristate "Mellanox 5th generation network adapters (ConnectX series) DPLL support"
depends on NETDEVICES && ETHERNET && PCI && MLX5_CORE
select DPLL
help
DPLL support in Mellanox Technologies ConnectX NICs.

3 changes: 3 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/Makefile
Expand Up @@ -121,3 +121,6 @@ mlx5_core-$(CONFIG_MLX5_SF) += sf/vhca_event.o sf/dev/dev.o sf/dev/driver.o irq_
# SF manager
#
mlx5_core-$(CONFIG_MLX5_SF_MANAGER) += sf/cmd.o sf/hw_table.o sf/devlink.o

obj-$(CONFIG_MLX5_DPLL) += mlx5_dpll.o
mlx5_dpll-y := dpll.o
12 changes: 12 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/dev.c
Expand Up @@ -221,6 +221,14 @@ static bool is_ib_enabled(struct mlx5_core_dev *dev)
return err ? false : val.vbool;
}

static bool is_dpll_supported(struct mlx5_core_dev *dev)
{
if (!IS_ENABLED(CONFIG_MLX5_DPLL))
return false;

return true;
}

enum {
MLX5_INTERFACE_PROTOCOL_ETH,
MLX5_INTERFACE_PROTOCOL_ETH_REP,
Expand All @@ -230,6 +238,8 @@ enum {
MLX5_INTERFACE_PROTOCOL_MPIB,

MLX5_INTERFACE_PROTOCOL_VNET,

MLX5_INTERFACE_PROTOCOL_DPLL,
};

static const struct mlx5_adev_device {
Expand All @@ -252,6 +262,8 @@ static const struct mlx5_adev_device {
.is_supported = &is_ib_rep_supported },
[MLX5_INTERFACE_PROTOCOL_MPIB] = { .suffix = "multiport",
.is_supported = &is_mp_supported },
[MLX5_INTERFACE_PROTOCOL_DPLL] = { .suffix = "dpll",
.is_supported = &is_dpll_supported },
};

int mlx5_adev_idx_alloc(void)
Expand Down

0 comments on commit 96a07ed

Please sign in to comment.