Skip to contentSkip to conversation

rdma: Document IB device renaming option

PATCH Applied Leon Romanovsky 4 participants 5 messages Nov 4, 2018 – Nov 21, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 rdma: Document IB device renaming option

From: Leon Romanovsky <[email protected]>

[leonro@server /]$ lspci |grep -i Ether
00:08.0 Ethernet controller: Red Hat, Inc. Virtio network device 00:09.0 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4] [leonro@server /]$ sudo rdma dev
1: mlx5_0: node_type ca fw 3.8.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455
[leonro@server /]$ sudo rdma dev set mlx5_0 name hfi1_0 [leonro@server /]$ sudo rdma dev
1: hfi1_0: node_type ca fw 3.8.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455

---
Changelog:
v2->v3:
* Dropped "to be named" words from example section of man

---
 man/man8/rdma-dev.8 | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
man/man8/rdma-dev.8 +14 -1
index 461681b6..7c275180 100644
@@ -1,6 +1,6 @@
 .TH RDMA\-DEV 8 "06 Jul 2017" "iproute2" "Linux"
 .SH NAME
-rdmak-dev \- RDMA device configuration
+rdma-dev \- RDMA device configuration
 .SH SYNOPSIS
 .sp
 .ad l
@@ -22,10 +22,18 @@ rdmak-dev \- RDMA device configuration
 .B rdma dev show
 .RI "[ " DEV " ]"
 
+.ti -8
+.B rdma dev set
+.RI "[ " DEV " ]"
+.BR name
+.BR NEWNAME
+
 .ti -8
 .B rdma dev help
 
 .SH "DESCRIPTION"
+.SS rdma dev set - rename rdma device
+
 .SS rdma dev show - display rdma device attributes
 
 .PP
@@ -45,6 +53,11 @@ rdma dev show mlx5_3
 Shows the state of specified RDMA device.
 .RE
 .PP
+rdma dev set mlx5_3 name rdma_0
+.RS 4
+Renames the mlx5_3 device to rdma_0.
+.RE
+.PP
 
 .SH SEE ALSO
 .BR rdma (8),
Applied
#1 lore raw
Quoted 13 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

[leonro@server /]$ lspci |grep -i Ether
00:08.0 Ethernet controller: Red Hat, Inc. Virtio network device 00:09.0 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4] [leonro@server /]$ sudo rdma dev
1: mlx5_0: node_type ca fw 3.8.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455
[leonro@server /]$ sudo rdma dev set mlx5_0 name hfi1_0 [leonro@server /]$ sudo rdma dev
1: hfi1_0: node_type ca fw 3.8.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455

Quoted 8 lines

---
Changelog:
v2->v3:
* Dropped "to be named" words from example section of man

---
 man/man8/rdma-dev.8 | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

applied to iproute2-next. Thanks

#2 lore raw
In reply to Leon Romanovsky
Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:linux-rdma- [email protected]] On Behalf Of Leon Romanovsky
Sent: Sunday, November 4, 2018 2:11 PM
To: David Ahern <[email protected]>
Cc: Leon Romanovsky <[email protected]>; netdev <[email protected]>; RDMA mailing list <[email protected]>; Stephen Hemminger <[email protected]>
Subject: [PATCH iproute2-next v3] rdma: Document IB device renaming option

Quoted 1 line

From: Leon Romanovsky <[email protected]>

Hi Leon,

After looking at this and Steve Wise's changes for the ADDLINK/DELLINK, it occurred to me that the driver that handed the name to ib_register_device() might be interested in knowing that this name change occurred.

Are there plans to include a some kind of notify mechanism so drivers can find out when things like this occur?

Is this something that should be done?

Thanks,

Mike

Quoted 66 lines

[leonro@server /]$ lspci |grep -i Ether
00:08.0 Ethernet controller: Red Hat, Inc. Virtio network device 00:09.0 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4]
[leonro@server /]$ sudo rdma dev
1: mlx5_0: node_type ca fw 3.8.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455
[leonro@server /]$ sudo rdma dev set mlx5_0 name hfi1_0 [leonro@server /]$ sudo rdma dev
1: hfi1_0: node_type ca fw 3.8.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455

---
Changelog:
v2->v3:
* Dropped "to be named" words from example section of man
---
man/man8/rdma-dev.8 | 15 ++++++++++++++-

1 file changed, 14 insertions(+), 1 deletion(-)
man/man8/rdma-dev.8 +0 -0
index 461681b6..7c275180 100644
@@ -1,6 +1,6 @@

.TH RDMA\-DEV 8 "06 Jul 2017" "iproute2" "Linux"
.SH NAME

man/man8/rdma-dev.8 +1 -1
-rdmak-dev \- RDMA device configuration
+rdma-dev \- RDMA device configuration

.SH SYNOPSIS
.sp
.ad l

man/man8/rdma-dev.8 +0 -0
@@ -22,10 +22,18 @@ rdmak-dev \- RDMA device configuration

.B rdma dev show
.RI "[ " DEV " ]"

+.ti -8
+.B rdma dev set
+.RI "[ " DEV " ]"
+.BR name
+.BR NEWNAME
+
.ti -8
.B rdma dev help

.SH "DESCRIPTION"
+.SS rdma dev set - rename rdma device
+
.SS rdma dev show - display rdma device attributes

.PP

man/man8/rdma-dev.8 +0 -0
@@ -45,6 +53,11 @@ rdma dev show mlx5_3

Shows the state of specified RDMA device.
.RE
.PP

man/man8/rdma-dev.8 +5 -0
+rdma dev set mlx5_3 name rdma_0
+.RS 4
+Renames the mlx5_3 device to rdma_0.
+.RE
+.PP

.SH SEE ALSO
.BR rdma (8),
--
2.19.1

#3 lore raw
Quoted 13 lines · Michael J
Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:linux-rdma- [email protected]] On Behalf Of Leon Romanovsky
Sent: Sunday, November 4, 2018 2:11 PM
To: David Ahern <[email protected]>
Cc: Leon Romanovsky <[email protected]>; netdev <[email protected]>; RDMA mailing list <[email protected]>; Stephen Hemminger <[email protected]>
Subject: [PATCH iproute2-next v3] rdma: Document IB device renaming option

Quoted 1 line

From: Leon Romanovsky <[email protected]>

Quoted 8 lines

Hi Leon,

After looking at this and Steve Wise's changes for the ADDLINK/DELLINK, it occurred to me that the driver that handed the name to ib_register_device() might be interested in knowing that this name change occurred.

Are there plans to include a some kind of notify mechanism so drivers can find out when things like this occur?

At least for device rename, I don't see any real need for such event, because drivers are not supposed to rely on names.

I would say that it is probably driver bug to rely on device name during its execution.

Quoted 2 lines

Is this something that should be done?

I think yes, we can extend ib_event to support more events than now, but should we?

Quoted 72 lines

Thanks,

Mike

Quoted 66 lines

[leonro@server /]$ lspci |grep -i Ether
00:08.0 Ethernet controller: Red Hat, Inc. Virtio network device 00:09.0 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4]
[leonro@server /]$ sudo rdma dev
1: mlx5_0: node_type ca fw 3.8.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455
[leonro@server /]$ sudo rdma dev set mlx5_0 name hfi1_0 [leonro@server /]$ sudo rdma dev
1: hfi1_0: node_type ca fw 3.8.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455

---
Changelog:
v2->v3:
* Dropped "to be named" words from example section of man
---
man/man8/rdma-dev.8 | 15 ++++++++++++++-

1 file changed, 14 insertions(+), 1 deletion(-)
man/man8/rdma-dev.8 +0 -0
index 461681b6..7c275180 100644
@@ -1,6 +1,6 @@

.TH RDMA\-DEV 8 "06 Jul 2017" "iproute2" "Linux"
.SH NAME

man/man8/rdma-dev.8 +1 -1
-rdmak-dev \- RDMA device configuration
+rdma-dev \- RDMA device configuration

.SH SYNOPSIS
.sp
.ad l

man/man8/rdma-dev.8 +0 -0
@@ -22,10 +22,18 @@ rdmak-dev \- RDMA device configuration

.B rdma dev show
.RI "[ " DEV " ]"

+.ti -8
+.B rdma dev set
+.RI "[ " DEV " ]"
+.BR name
+.BR NEWNAME
+
.ti -8
.B rdma dev help

.SH "DESCRIPTION"
+.SS rdma dev set - rename rdma device
+
.SS rdma dev show - display rdma device attributes

.PP

man/man8/rdma-dev.8 +0 -0
@@ -45,6 +53,11 @@ rdma dev show mlx5_3

Shows the state of specified RDMA device.
.RE
.PP

man/man8/rdma-dev.8 +5 -0
+rdma dev set mlx5_3 name rdma_0
+.RS 4
+Renames the mlx5_3 device to rdma_0.
+.RE
+.PP

.SH SEE ALSO
.BR rdma (8),
--
2.19.1

#4 lore raw
Quoted 20 lines · Leon Romanovsky
Quoted 19 lines · Michael J
Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:linux-rdma- [email protected]] On Behalf Of Leon Romanovsky
Sent: Sunday, November 4, 2018 2:11 PM
To: David Ahern <[email protected]>
Cc: Leon Romanovsky <[email protected]>; netdev <[email protected]>; RDMA mailing list <[email protected]>; Stephen Hemminger <[email protected]>
Subject: [PATCH iproute2-next v3] rdma: Document IB device renaming option

Quoted 1 line

From: Leon Romanovsky <[email protected]>

Hi Leon,

After looking at this and Steve Wise's changes for the ADDLINK/DELLINK, it occurred to me that the driver that handed the name to ib_register_device() might be interested in knowing that this name change occurred.

Quoted 5 lines
Quoted 2 lines

Are there plans to include a some kind of notify mechanism so drivers can find out when things like this occur?

At least for device rename, I don't see any real need for such event, because drivers are not supposed to rely on names.

It just seems like something they want to know. But agree driver should not rely on a name.

Quoted 8 lines

I would say that it is probably driver bug to rely on device name during its execution.

Quoted 2 lines

Is this something that should be done?

I think yes, we can extend ib_event to support more events than now, but should we?

On one hand it make sense to have an event. In case the driver had something it wanted to do with the name but I can't really think of a compelling reason it does. So I'd say we don't worry about it now but if someone finds a use for it then adding it later should be an option that is on the table.

-Denny