ibcore: Add support for RDMA/RoCE using VLAN(4) devices.

Classify VLAN devices as ethernet in rdma_copy_addr().
This fixes the following error message:

rdma_bind_addr: No such file or directory

Submitted by:	bartosz.sobczak@intel.com (Bartosz Sobczak)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36120
Sponsored by:	NVIDIA Networking
This commit is contained in:
Hans Petter Selasky 2022-08-22 10:03:24 +02:00
parent e7314192ce
commit 57af517ac4

View File

@ -153,7 +153,7 @@ int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct ifnet *dev,
return (0);
} else if (dev->if_type == IFT_INFINIBAND)
dev_addr->dev_type = ARPHRD_INFINIBAND;
else if (dev->if_type == IFT_ETHER)
else if (dev->if_type == IFT_ETHER || dev->if_type == IFT_L2VLAN)
dev_addr->dev_type = ARPHRD_ETHER;
else
dev_addr->dev_type = 0;