common/mlx5: share kernel interface name getter
authorMatan Azrad <matan@mellanox.com>
Thu, 18 Jun 2020 19:06:02 +0000 (19:06 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 30 Jun 2020 12:52:29 +0000 (14:52 +0200)
commitaec086c9f1c81b583ca8b9f7b50f32452d27840e
tree65f95cca665b06122d1eb5256039ca7c1b293eb1
parent04e7beeb120a1a7e20b9f390e56519f2158cf9e8
common/mlx5: share kernel interface name getter

Some configuration of the mlx5 port are done by the kernel net device
associated to the IB device represents the PCI device.

The DPDK mlx5 driver uses Linux system calls, for example ioctl, in
order to configure per port configurations requested by the DPDK user.

One of the basic knowledges required to access the correct kernel net
device is its name.

Move function to get interface name from IB device path to the common
library.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/common/mlx5/linux/mlx5_common_os.c
drivers/common/mlx5/mlx5_common.h
drivers/common/mlx5/rte_common_mlx5_version.map
drivers/net/mlx5/linux/mlx5_ethdev_os.c
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.h