Use correct socket request type and ifreq for FreeBSD Signed-off-by: Srikanth Kaka <srikant...@oneconvergence.com> Signed-off-by: Vag Singh <vag.si...@oneconvergence.com> Signed-off-by: Anand Thulasiram <av...@juniper.net> --- drivers/net/mlx5/freebsd/mlx5_ethdev_os.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c index 5cf3eab65a..03ae2e4aa9 100644 --- a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c @@ -14,11 +14,11 @@ #include <errno.h> #include <dirent.h> #include <net/if.h> +#include <sys/sockio.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <netinet/in.h> #include <linux/ethtool.h> -#include <linux/sockios.h> #include <fcntl.h> #include <stdalign.h> #include <sys/un.h> @@ -1612,9 +1612,9 @@ mlx5_get_mac(struct rte_eth_dev *dev, uint8_t (*mac)[RTE_ETHER_ADDR_LEN]) struct ifreq request; int ret; - ret = mlx5_ifreq(dev, SIOCGIFHWADDR, &request); + ret = mlx5_ifreq(dev, SIOCGHWADDR, &request); if (ret) return ret; - memcpy(mac, request.ifr_hwaddr.sa_data, RTE_ETHER_ADDR_LEN); + memcpy(mac, request.ifr_addr.sa_data, RTE_ETHER_ADDR_LEN); return 0; } -- 2.30.2