Skip to content

Commit 823b23d

Browse files
paravmellanoxjgunthorpe
authored andcommitted
IB/core: Allow vlan link local address based RoCE GIDs
IPv6 link local address for a VLAN netdevice has nothing to do with its resemblance with the default GID, because VLAN link local GID is in different layer 2 domain. Now that RoCE MAD packet processing and route resolution consider the right GID index, there is no need for an unnecessary check which prevents the addition of vlan based IPv6 link local GIDs. Signed-off-by: Parav Pandit <[email protected]> Reviewed-by: Daniel Jurgens <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 5fb58c9 commit 823b23d

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

drivers/infiniband/core/cache.c

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -543,30 +543,11 @@ static int __ib_cache_gid_add(struct ib_device *ib_dev, u8 port,
543543
int ib_cache_gid_add(struct ib_device *ib_dev, u8 port,
544544
union ib_gid *gid, struct ib_gid_attr *attr)
545545
{
546-
struct net_device *idev;
547-
unsigned long mask;
548-
int ret;
549-
550-
idev = ib_device_get_netdev(ib_dev, port);
551-
if (idev && attr->ndev != idev) {
552-
union ib_gid default_gid;
553-
554-
/* Adding default GIDs is not permitted */
555-
make_default_gid(idev, &default_gid);
556-
if (!memcmp(gid, &default_gid, sizeof(*gid))) {
557-
dev_put(idev);
558-
return -EPERM;
559-
}
560-
}
561-
if (idev)
562-
dev_put(idev);
563-
564-
mask = GID_ATTR_FIND_MASK_GID |
565-
GID_ATTR_FIND_MASK_GID_TYPE |
566-
GID_ATTR_FIND_MASK_NETDEV;
546+
unsigned long mask = GID_ATTR_FIND_MASK_GID |
547+
GID_ATTR_FIND_MASK_GID_TYPE |
548+
GID_ATTR_FIND_MASK_NETDEV;
567549

568-
ret = __ib_cache_gid_add(ib_dev, port, gid, attr, mask, false);
569-
return ret;
550+
return __ib_cache_gid_add(ib_dev, port, gid, attr, mask, false);
570551
}
571552

572553
static int

0 commit comments

Comments
 (0)