diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2016-11-30 21:23:51 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2017-01-24 22:14:05 +0300 |
commit | 8c7245a60ef8f8c4a427349690c5a141cfed6217 (patch) | |
tree | cb4ebe93b482ba4ba884c85a6cf9804360606459 /drivers/net/ethernet/mellanox/mlx5/core/vport.c | |
parent | c9497c98901c689bf6c357f812bf864ed8f50ace (diff) | |
download | linux-8c7245a60ef8f8c4a427349690c5a141cfed6217.tar.xz |
net/mlx5: Push min-inline mode resolution helper into the core
So we can use that from the IB driver too in downstream patches.
This patch doesn't change any functionality.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/vport.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/vport.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c index 269e4401c342..b49cfc895c10 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c @@ -127,6 +127,23 @@ int mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev, } EXPORT_SYMBOL_GPL(mlx5_query_nic_vport_min_inline); +void mlx5_query_min_inline(struct mlx5_core_dev *mdev, + u8 *min_inline_mode) +{ + switch (MLX5_CAP_ETH(mdev, wqe_inline_mode)) { + case MLX5_CAP_INLINE_MODE_L2: + *min_inline_mode = MLX5_INLINE_MODE_L2; + break; + case MLX5_CAP_INLINE_MODE_VPORT_CONTEXT: + mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode); + break; + case MLX5_CAP_INLINE_MODE_NOT_REQUIRED: + *min_inline_mode = MLX5_INLINE_MODE_NONE; + break; + } +} +EXPORT_SYMBOL_GPL(mlx5_query_min_inline); + int mlx5_modify_nic_vport_min_inline(struct mlx5_core_dev *mdev, u16 vport, u8 min_inline) { |