diff mbox series

[rdma-next,1/2] RDMA/mana_ib: set node_guid

Message ID 1716469137-16844-2-git-send-email-kotaranov@linux.microsoft.com (mailing list archive)
State Superseded
Headers show
Series Fill in capabilities and guid | expand

Commit Message

Konstantin Taranov May 23, 2024, 12:58 p.m. UTC
From: Konstantin Taranov <kotaranov@microsoft.com>

Use the mac address for the node_guid of the IB device.

Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
---
 drivers/infiniband/hw/mana/device.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Long Li May 28, 2024, 8:07 p.m. UTC | #1
> Subject: [PATCH rdma-next 1/2] RDMA/mana_ib: set node_guid
> 
> From: Konstantin Taranov <kotaranov@microsoft.com>
> 
> Use the mac address for the node_guid of the IB device.
> 
> Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>

Reviewed-by: Long Li <longli@microsoft.com>
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/mana/device.c b/drivers/infiniband/hw/mana/device.c
index 7e09ceb..9a7da2e 100644
--- a/drivers/infiniband/hw/mana/device.c
+++ b/drivers/infiniband/hw/mana/device.c
@@ -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) {