aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5
diff options
context:
space:
mode:
authorHadar Hen Zion <hadarh@mellanox.com>2016-07-24 09:12:40 -0400
committerDavid S. Miller <davem@davemloft.net>2016-07-25 20:53:40 -0400
commitcff92d7c7ebd7ceddd4def6b39e0302585b1eb14 (patch)
treee1c5dede24617ba0df1ec6531f5f9124f1b4c688 /include/linux/mlx5
parentae76715d153e33c249b6850361e4d8d775388b5a (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 'include/linux/mlx5')
-rw-r--r--include/linux/mlx5/mlx5_ifc.h10
-rw-r--r--include/linux/mlx5/vport.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index d671e4e8e7db..21bc4557b67a 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -536,7 +536,8 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits {
536 u8 self_lb_en_modifiable[0x1]; 536 u8 self_lb_en_modifiable[0x1];
537 u8 reserved_at_9[0x2]; 537 u8 reserved_at_9[0x2];
538 u8 max_lso_cap[0x5]; 538 u8 max_lso_cap[0x5];
539 u8 reserved_at_10[0x4]; 539 u8 reserved_at_10[0x2];
540 u8 wqe_inline_mode[0x2];
540 u8 rss_ind_tbl_cap[0x4]; 541 u8 rss_ind_tbl_cap[0x4];
541 u8 reg_umr_sq[0x1]; 542 u8 reg_umr_sq[0x1];
542 u8 scatter_fcs[0x1]; 543 u8 scatter_fcs[0x1];
@@ -2270,7 +2271,8 @@ struct mlx5_ifc_sqc_bits {
2270 u8 cd_master[0x1]; 2271 u8 cd_master[0x1];
2271 u8 fre[0x1]; 2272 u8 fre[0x1];
2272 u8 flush_in_error_en[0x1]; 2273 u8 flush_in_error_en[0x1];
2273 u8 reserved_at_4[0x4]; 2274 u8 reserved_at_4[0x1];
2275 u8 min_wqe_inline_mode[0x3];
2274 u8 state[0x4]; 2276 u8 state[0x4];
2275 u8 reg_umr[0x1]; 2277 u8 reg_umr[0x1];
2276 u8 reserved_at_d[0x13]; 2278 u8 reserved_at_d[0x13];
@@ -2367,7 +2369,9 @@ struct mlx5_ifc_rmpc_bits {
2367}; 2369};
2368 2370
2369struct mlx5_ifc_nic_vport_context_bits { 2371struct mlx5_ifc_nic_vport_context_bits {
2370 u8 reserved_at_0[0x1f]; 2372 u8 reserved_at_0[0x5];
2373 u8 min_wqe_inline_mode[0x3];
2374 u8 reserved_at_8[0x17];
2371 u8 roce_en[0x1]; 2375 u8 roce_en[0x1];
2372 2376
2373 u8 arm_change_event[0x1]; 2377 u8 arm_change_event[0x1];
diff --git a/include/linux/mlx5/vport.h b/include/linux/mlx5/vport.h
index 6c16c198f680..e087b7d047ac 100644
--- a/include/linux/mlx5/vport.h
+++ b/include/linux/mlx5/vport.h
@@ -43,6 +43,8 @@ int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
43 u16 vport, u8 state); 43 u16 vport, u8 state);
44int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev, 44int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev,
45 u16 vport, u8 *addr); 45 u16 vport, u8 *addr);
46void mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev,
47 u8 *min_inline);
46int mlx5_modify_nic_vport_mac_address(struct mlx5_core_dev *dev, 48int mlx5_modify_nic_vport_mac_address(struct mlx5_core_dev *dev,
47 u16 vport, u8 *addr); 49 u16 vport, u8 *addr);
48int mlx5_query_nic_vport_mtu(struct mlx5_core_dev *mdev, u16 *mtu); 50int mlx5_query_nic_vport_mtu(struct mlx5_core_dev *mdev, u16 *mtu);