]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/mana_ib: set node_guid
authorKonstantin Taranov <kotaranov@microsoft.com>
Thu, 30 May 2024 11:55:16 +0000 (04:55 -0700)
committerLeon Romanovsky <leon@kernel.org>
Sun, 2 Jun 2024 08:50:15 +0000 (11:50 +0300)
Use the mac address for the node_guid of the IB device.

Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://lore.kernel.org/r/1717070117-1234-2-git-send-email-kotaranov@linux.microsoft.com
Reviewed-by: Long Li <longli@microsoft.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mana/device.c

index 7e09ceb3da537ff5d8d77fb35bfeb208af494efd..9a7da2ec9cdbb07c63c8e352f0424c56fdda3f10 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "mana_ib.h"
 #include <net/mana/mana_auxiliary.h>
+#include <net/addrconf.h>
 
 MODULE_DESCRIPTION("Microsoft Azure Network Adapter IB driver");
 MODULE_LICENSE("GPL");
@@ -92,6 +93,7 @@ static int mana_ib_probe(struct auxiliary_device *adev,
                goto free_ib_device;
        }
        ether_addr_copy(mac_addr, upper_ndev->dev_addr);
+       addrconf_addr_eui48((u8 *)&dev->ib_dev.node_guid, upper_ndev->dev_addr);
        ret = ib_device_set_netdev(&dev->ib_dev, upper_ndev, 1);
        rcu_read_unlock();
        if (ret) {