common/mlx5: move some getter functions from net driver
authorOphir Munk <ophirmu@mellanox.com>
Fri, 19 Jun 2020 07:30:08 +0000 (07:30 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 30 Jun 2020 12:52:30 +0000 (14:52 +0200)
commit391b8bcc81713d0da7e68eb39a64b00e69fc3543
tree7df380df77faa29f623bde6e44dc5f87c75642b3
parentac79183dc6f721814ba66b6cf3e7092cdc507eb2
common/mlx5: move some getter functions from net driver

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>
drivers/common/mlx5/linux/mlx5_common_os.h [new file with mode: 0644]
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/linux/mlx5_os.h
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_flow_dv.c
drivers/net/mlx5/mlx5_rxq.c