1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2015 6WIND S.A.
3 * Copyright 2020 Mellanox Technologies, Ltd
6 #ifndef RTE_PMD_MLX5_OS_H_
7 #define RTE_PMD_MLX5_OS_H_
11 /* verb enumerations translations to local enums. */
13 MLX5_FS_NAME_MAX = IBV_SYSFS_NAME_MAX + 1,
14 MLX5_FS_PATH_MAX = IBV_SYSFS_PATH_MAX + 1
17 /* Maximal data of sendmsg message(in bytes). */
18 #define MLX5_SENDMSG_MAX 64
20 #define MLX5_NAMESIZE IF_NAMESIZE
22 int mlx5_auxiliary_get_ifindex(const char *sf_name);
25 enum mlx5_sw_parsing_offloads {
26 #ifdef HAVE_IBV_MLX5_MOD_SWP
27 MLX5_SW_PARSING_CAP = MLX5DV_SW_PARSING,
28 MLX5_SW_PARSING_CSUM_CAP = MLX5DV_SW_PARSING_CSUM,
29 MLX5_SW_PARSING_TSO_CAP = MLX5DV_SW_PARSING_LSO,
31 MLX5_SW_PARSING_CAP = 0,
32 MLX5_SW_PARSING_CSUM_CAP = 0,
33 MLX5_SW_PARSING_TSO_CAP = 0,
37 enum mlx5_tunnel_offloads {
38 #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
39 MLX5_TUNNELED_OFFLOADS_VXLAN_CAP =
40 MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN,
41 MLX5_TUNNELED_OFFLOADS_GRE_CAP =
42 MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE,
43 MLX5_TUNNELED_OFFLOADS_GENEVE_CAP =
44 MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GENEVE,
46 MLX5_TUNNELED_OFFLOADS_VXLAN_CAP = 0,
47 MLX5_TUNNELED_OFFLOADS_GRE_CAP = 0,
48 MLX5_TUNNELED_OFFLOADS_GENEVE_CAP = 0,
51 #endif /* RTE_PMD_MLX5_OS_H_ */