Skip to content

Commit a2d36b0

Browse files
BernardMetzlerjgunthorpe
authored andcommitted
RDMA/siw: Enable siw on tunnel devices
Enable siw to attach to tunnel devices, there is no reason not to, siw properly generates all packets already. Link: https://lore.kernel.org/r/20220510143917.23735-1-bmt@zurich.ibm.com Tested-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 4703b4f commit a2d36b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/infiniband/sw/siw/siw_main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ static int siw_dev_qualified(struct net_device *netdev)
119119
* <linux/if_arp.h> for type identifiers.
120120
*/
121121
if (netdev->type == ARPHRD_ETHER || netdev->type == ARPHRD_IEEE802 ||
122+
netdev->type == ARPHRD_NONE ||
122123
(netdev->type == ARPHRD_LOOPBACK && loopback_enabled))
123124
return 1;
124125

@@ -315,12 +316,12 @@ static struct siw_device *siw_device_create(struct net_device *netdev)
315316

316317
sdev->netdev = netdev;
317318

318-
if (netdev->type != ARPHRD_LOOPBACK) {
319+
if (netdev->type != ARPHRD_LOOPBACK && netdev->type != ARPHRD_NONE) {
319320
addrconf_addr_eui48((unsigned char *)&base_dev->node_guid,
320321
netdev->dev_addr);
321322
} else {
322323
/*
323-
* The loopback device does not have a HW address,
324+
* This device does not have a HW address,
324325
* but connection mangagement lib expects gid != 0
325326
*/
326327
size_t len = min_t(size_t, strlen(base_dev->name), 6);

0 commit comments

Comments
 (0)