Getter functions such as: 'mlx5_os_get_ctx_device_name', 'mlx5_os_get_ctx_device_path', 'mlx5_os_get_dev_device_name', 'mlx5_os_get_umem_id' are implemented under net directory. To enable additional devices (e.g. regex, vdpa) to access these getter functions they are moved under common directory. As part of this commit string sizes DEV_SYSFS_NAME_MAX and DEV_SYSFS_PATH_MAX are increased by 1 to make sure that the destination string size in strncpy() function is bigger than the source string size. This update will avoid GCC version 8 error -Werror=stringop-truncation. Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
19 lines
467 B
C
19 lines
467 B
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright 2015 6WIND S.A.
|
|
* Copyright 2020 Mellanox Technologies, Ltd
|
|
*/
|
|
|
|
#ifndef RTE_PMD_MLX5_OS_H_
|
|
#define RTE_PMD_MLX5_OS_H_
|
|
|
|
/* verb enumerations translations to local enums. */
|
|
enum {
|
|
DEV_SYSFS_NAME_MAX = IBV_SYSFS_NAME_MAX + 1,
|
|
DEV_SYSFS_PATH_MAX = IBV_SYSFS_PATH_MAX + 1
|
|
};
|
|
|
|
#define PCI_DRV_FLAGS (RTE_PCI_DRV_INTR_LSC | \
|
|
RTE_PCI_DRV_INTR_RMV | \
|
|
RTE_PCI_DRV_PROBE_AGAIN)
|
|
#endif /* RTE_PMD_MLX5_OS_H_ */
|