The device can support receive Stateless Offloads for the inner packet's fields only when the packet is processed by TIR which is enabled to support tunneling. Otherwise, the device treats the packet as an ordinary non-tunneling packet and receive offloads can be done only for the outer packet's field. In order to enable receive Stateless Offloading support for incoming tunneling traffic the TIR should be created with tunneled_offload_en. Tunneling offloads is supported only be raw ethernet QP. This patch includes: * New QP creation flag for tunneling offloads. * Reports device capabilities.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -39,6 +39,7 @@ · 38 unmodified lines | |||
| 39 | enum { | 39 | enum { |
| 40 | MLX5_QP_FLAG_SIGNATURE = 1 << 0, | 40 | MLX5_QP_FLAG_SIGNATURE = 1 << 0, |
| 41 | MLX5_QP_FLAG_SCATTER_CQE = 1 << 1, | 41 | MLX5_QP_FLAG_SCATTER_CQE = 1 << 1, |
| 42 | MLX5_QP_FLAG_TUNNEL_OFFLOADS = 1 << 2, | ||
| 42 | }; | 43 | }; |
| 43 | 44 | ||
| 44 | enum { | 45 | enum { |
| @@ -209,6 +210,12 @@ enum mlx5_ib_query_dev_resp_flags { · 164 unmodified lines | |||
| 209 | MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD = 1 << 1, | 210 | MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD = 1 << 1, |
| 210 | }; | 211 | }; |
| 211 | 212 | ||
| 213 | enum mlx5_ib_tunnel_offloads { | ||
| 214 | MLX5_IB_TUNNELED_OFFLOADS_VXLAN = 1 << 0, | ||
| 215 | MLX5_IB_TUNNELED_OFFLOADS_GRE = 1 << 1, | ||
| 216 | MLX5_IB_TUNNELED_OFFLOADS_GENEVE = 1 << 2 | ||
| 217 | }; | ||
| 218 | |||
| 212 | struct mlx5_ib_query_device_resp { | 219 | struct mlx5_ib_query_device_resp { |
| 213 | __u32 comp_mask; | 220 | __u32 comp_mask; |
| 214 | __u32 response_length; | 221 | __u32 response_length; |
| @@ -220,6 +227,8 @@ struct mlx5_ib_query_device_resp { · 5 unmodified lines | |||
| 220 | __u32 flags; /* Use enum mlx5_ib_query_dev_resp_flags */ | 227 | __u32 flags; /* Use enum mlx5_ib_query_dev_resp_flags */ |
| 221 | struct mlx5_ib_sw_parsing_caps sw_parsing_caps; | 228 | struct mlx5_ib_sw_parsing_caps sw_parsing_caps; |
| 222 | struct mlx5_ib_striding_rq_caps striding_rq_caps; | 229 | struct mlx5_ib_striding_rq_caps striding_rq_caps; |
| 230 | __u32 tunnel_offloads_caps; /* enum mlx5_ib_tunnel_offloads */ | ||
| 231 | __u32 reserved; | ||
| 223 | }; | 232 | }; |
| 224 | 233 | ||
| 225 | enum mlx5_ib_create_cq_flags { | 234 | enum mlx5_ib_create_cq_flags { |
| @@ -304,7 +313,7 @@ struct mlx5_ib_create_qp_rss { · 78 unmodified lines | |||
| 304 | __u8 reserved[6]; | 313 | __u8 reserved[6]; |
| 305 | __u8 rx_hash_key[128]; /* valid only for Toeplitz */ | 314 | __u8 rx_hash_key[128]; /* valid only for Toeplitz */ |
| 306 | __u32 comp_mask; | 315 | __u32 comp_mask; |
| 307 | __u32 reserved1; | 316 | __u32 flags; |
| 308 | }; | 317 | }; |
| 309 | 318 | ||
| 310 | struct mlx5_ib_create_qp_resp { | 319 | struct mlx5_ib_create_qp_resp { |