git: 57af517ac4e8 - main - ibcore: Add support for RDMA/RoCE using VLAN(4) devices.

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Mon, 22 Aug 2022 08:05:09 UTC
The branch main has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=57af517ac4e8f88339ad1ff778d3b7ac32827430

commit 57af517ac4e8f88339ad1ff778d3b7ac32827430
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-08-22 08:03:24 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-08-22 08:04:26 +0000

    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
---
 sys/ofed/drivers/infiniband/core/ib_addr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/ofed/drivers/infiniband/core/ib_addr.c b/sys/ofed/drivers/infiniband/core/ib_addr.c
index ce1f270527b4..974860b77caf 100644
--- a/sys/ofed/drivers/infiniband/core/ib_addr.c
+++ b/sys/ofed/drivers/infiniband/core/ib_addr.c
@@ -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;