path: root/drivers/net/ethernet/mellanox/mlx5/core/vport.c
diff options
authorHadar Hen Zion <hadarh@mellanox.com>2016-07-24 16:12:40 +0300
committerDavid S. Miller <davem@davemloft.net>2016-07-25 17:53:40 -0700
commitcff92d7c7ebd7ceddd4def6b39e0302585b1eb14 (patch)
treee1c5dede24617ba0df1ec6531f5f9124f1b4c688 /drivers/net/ethernet/mellanox/mlx5/core/vport.c
parentnet/mlx5e: Check the minimum inline header mode before xmit (diff)
net/mlx5e: Query minimum required header copy during xmit
Add support for query the minimum inline mode from the Firmware. It is required for correct TX steering according to L3/L4 packet headers. Each send queue (SQ) has inline mode that defines the minimal required headers that needs to be copied into the SQ WQE. The driver asks the Firmware for the wqe_inline_mode device capability value. In case the device capability defined as "vport context" the driver must check the reported min inline mode from the vport context before creating its SQs. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
index 91846dfcbe9c..21365d06982b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
@@ -135,6 +135,18 @@ static int mlx5_modify_nic_vport_context(struct mlx5_core_dev *mdev, void *in,
return mlx5_cmd_exec_check_status(mdev, in, inlen, out, sizeof(out));
+void mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev,
+ u8 *min_inline_mode)
+ u32 out[MLX5_ST_SZ_DW(query_nic_vport_context_out)] = {0};
+ mlx5_query_nic_vport_context(mdev, 0, out, sizeof(out));
+ *min_inline_mode = MLX5_GET(query_nic_vport_context_out, out,
+ nic_vport_context.min_wqe_inline_mode);
int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev,
u16 vport, u8 *addr)