git: 4149598b7a92 - stable/12 - ibcore: Add support for RDMA/RoCE using VLAN(4) devices.

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Mon, 29 Aug 2022 12:08:54 UTC
The branch stable/12 has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=4149598b7a9296d0efbbc52b758d8d2d52b12e48

commit 4149598b7a9296d0efbbc52b758d8d2d52b12e48
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-29 12:06:38 +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:   Piotr Kubaj <pkubaj@FreeBSD.org>
    Differential Revision:  https://reviews.freebsd.org/D36120
    Sponsored by:   NVIDIA Networking
    
    (cherry picked from commit 57af517ac4e8f88339ad1ff778d3b7ac32827430)
---
 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 a56219ae48a0..787ff7c0a00c 100644
--- a/sys/ofed/drivers/infiniband/core/ib_addr.c
+++ b/sys/ofed/drivers/infiniband/core/ib_addr.c
@@ -150,7 +150,7 @@ int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *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;