linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RDMA/siw: Enable siw on tunnel devices
@ 2022-04-28 17:49 Chuck Lever
  0 siblings, 0 replies; 6+ messages in thread
From: Chuck Lever @ 2022-04-28 17:49 UTC (permalink / raw)
  To: bmt; +Cc: linux-rdma

From: Bernard Metzler <bmt@zurich.ibm.com>

Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
---
 drivers/infiniband/sw/siw/siw_main.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


Hi Bernard!

How come this change isn't in the upstream siw driver yet?


diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c
index e5c586913d0b..dacc174604bf 100644
--- a/drivers/infiniband/sw/siw/siw_main.c
+++ b/drivers/infiniband/sw/siw/siw_main.c
@@ -119,6 +119,7 @@ static int siw_dev_qualified(struct net_device *netdev)
 	 * <linux/if_arp.h> for type identifiers.
 	 */
 	if (netdev->type == ARPHRD_ETHER || netdev->type == ARPHRD_IEEE802 ||
+	    netdev->type == ARPHRD_NONE ||
 	    (netdev->type == ARPHRD_LOOPBACK && loopback_enabled))
 		return 1;
 
@@ -315,12 +316,12 @@ static struct siw_device *siw_device_create(struct net_device *netdev)
 
 	sdev->netdev = netdev;
 
-	if (netdev->type != ARPHRD_LOOPBACK) {
+	if (netdev->type != ARPHRD_LOOPBACK && netdev->type != ARPHRD_NONE) {
 		addrconf_addr_eui48((unsigned char *)&base_dev->node_guid,
 				    netdev->dev_addr);
 	} else {
 		/*
-		 * The loopback device does not have a HW address,
+		 * This device does not have a HW address,
 		 * but connection mangagement lib expects gid != 0
 		 */
 		size_t len = min_t(size_t, strlen(base_dev->name), 6);



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] RDMA/siw: Enable siw on tunnel devices.
  2022-05-10 14:39 Bernard Metzler
@ 2022-05-11 18:54 ` Jason Gunthorpe
  0 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2022-05-11 18:54 UTC (permalink / raw)
  To: Bernard Metzler; +Cc: linux-rdma, chuck.lever, leonro

On Tue, May 10, 2022 at 04:39:17PM +0200, Bernard Metzler wrote:
> Enable siw to attach to tunnel devices,
> 
> Tested-by: Chuck Lever <chuck.lever@oracle.com>
> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
> ---
>  drivers/infiniband/sw/siw/siw_main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] RDMA/siw: Enable siw on tunnel devices.
@ 2022-05-10 14:39 Bernard Metzler
  2022-05-11 18:54 ` Jason Gunthorpe
  0 siblings, 1 reply; 6+ messages in thread
From: Bernard Metzler @ 2022-05-10 14:39 UTC (permalink / raw)
  To: linux-rdma; +Cc: chuck.lever, jgg, leonro, Bernard Metzler

Enable siw to attach to tunnel devices,

Tested-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
---
 drivers/infiniband/sw/siw/siw_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c
index e5c586913d0b..dacc174604bf 100644
--- a/drivers/infiniband/sw/siw/siw_main.c
+++ b/drivers/infiniband/sw/siw/siw_main.c
@@ -119,6 +119,7 @@ static int siw_dev_qualified(struct net_device *netdev)
 	 * <linux/if_arp.h> for type identifiers.
 	 */
 	if (netdev->type == ARPHRD_ETHER || netdev->type == ARPHRD_IEEE802 ||
+	    netdev->type == ARPHRD_NONE ||
 	    (netdev->type == ARPHRD_LOOPBACK && loopback_enabled))
 		return 1;
 
@@ -315,12 +316,12 @@ static struct siw_device *siw_device_create(struct net_device *netdev)
 
 	sdev->netdev = netdev;
 
-	if (netdev->type != ARPHRD_LOOPBACK) {
+	if (netdev->type != ARPHRD_LOOPBACK && netdev->type != ARPHRD_NONE) {
 		addrconf_addr_eui48((unsigned char *)&base_dev->node_guid,
 				    netdev->dev_addr);
 	} else {
 		/*
-		 * The loopback device does not have a HW address,
+		 * This device does not have a HW address,
 		 * but connection mangagement lib expects gid != 0
 		 */
 		size_t len = min_t(size_t, strlen(base_dev->name), 6);
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] RDMA/siw: Enable siw on tunnel devices
  2022-05-02 21:36 ` Chuck Lever III
@ 2022-05-09 13:41   ` Chuck Lever III
  0 siblings, 0 replies; 6+ messages in thread
From: Chuck Lever III @ 2022-05-09 13:41 UTC (permalink / raw)
  To: Bernard Metzler; +Cc: linux-rdma



> On May 2, 2022, at 5:36 PM, Chuck Lever III <chuck.lever@oracle.com> wrote:
> 
> 
> 
>> On May 1, 2022, at 10:18 AM, Bernard Metzler <bmt@zurich.ibm.com> wrote:
>> 
>> 
>> 
>>> -----Original Message-----
>>> From: Chuck Lever <chuck.lever@oracle.com>
>>> Sent: Thursday, 28 April 2022 19:49
>>> To: Bernard Metzler <BMT@zurich.ibm.com>
>>> Cc: linux-rdma@vger.kernel.org
>>> Subject: [EXTERNAL] [PATCH] RDMA/siw: Enable siw on tunnel devices
>>> 
>>> From: Bernard Metzler <bmt@zurich.ibm.com>
>>> 
>>> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
>>> ---
>>> drivers/infiniband/sw/siw/siw_main.c |    5 +++--
>>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>> 
>>> 
>>> Hi Bernard!
>>> 
>>> How come this change isn't in the upstream siw driver yet?
>>> 
>>> 
>> 
>> Hi Chuck,
>> Good question! Did I ever send the patch to linux-rdma, or was
>> that conversation off-list? Sorry for asking, I can't find it in my
>> or linux-rdma history...
> 
> I don't recall seeing this patch on the public mailing list.
> The conversation was between Ben Coddington, you, and me, as
> I recall.

Would a Tested-by help? ;-)

Tested-by: Chuck Lever <chuck.lever@oracle.com>


>> Thank you!
>> Bernard
>> 
>> 
>>> diff --git a/drivers/infiniband/sw/siw/siw_main.c
>>> b/drivers/infiniband/sw/siw/siw_main.c
>>> index e5c586913d0b..dacc174604bf 100644
>>> --- a/drivers/infiniband/sw/siw/siw_main.c
>>> +++ b/drivers/infiniband/sw/siw/siw_main.c
>>> @@ -119,6 +119,7 @@ static int siw_dev_qualified(struct net_device
>>> *netdev)
>>> 	 * <linux/if_arp.h> for type identifiers.
>>> 	 */
>>> 	if (netdev->type == ARPHRD_ETHER || netdev->type ==
>>> ARPHRD_IEEE802 ||
>>> +	    netdev->type == ARPHRD_NONE ||
>>> 	    (netdev->type == ARPHRD_LOOPBACK && loopback_enabled))
>>> 		return 1;
>>> 
>>> @@ -315,12 +316,12 @@ static struct siw_device *siw_device_create(struct
>>> net_device *netdev)
>>> 
>>> 	sdev->netdev = netdev;
>>> 
>>> -	if (netdev->type != ARPHRD_LOOPBACK) {
>>> +	if (netdev->type != ARPHRD_LOOPBACK && netdev->type !=
>>> ARPHRD_NONE) {
>>> 		addrconf_addr_eui48((unsigned char *)&base_dev-
>>>> node_guid,
>>> 				    netdev->dev_addr);
>>> 	} else {
>>> 		/*
>>> -		 * The loopback device does not have a HW address,
>>> +		 * This device does not have a HW address,
>>> 		 * but connection mangagement lib expects gid != 0
>>> 		 */
>>> 		size_t len = min_t(size_t, strlen(base_dev->name), 6);
> 
> --
> Chuck Lever

--
Chuck Lever




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RDMA/siw: Enable siw on tunnel devices
  2022-05-01 14:18 Bernard Metzler
@ 2022-05-02 21:36 ` Chuck Lever III
  2022-05-09 13:41   ` Chuck Lever III
  0 siblings, 1 reply; 6+ messages in thread
From: Chuck Lever III @ 2022-05-02 21:36 UTC (permalink / raw)
  To: Bernard Metzler; +Cc: linux-rdma



> On May 1, 2022, at 10:18 AM, Bernard Metzler <bmt@zurich.ibm.com> wrote:
> 
> 
> 
>> -----Original Message-----
>> From: Chuck Lever <chuck.lever@oracle.com>
>> Sent: Thursday, 28 April 2022 19:49
>> To: Bernard Metzler <BMT@zurich.ibm.com>
>> Cc: linux-rdma@vger.kernel.org
>> Subject: [EXTERNAL] [PATCH] RDMA/siw: Enable siw on tunnel devices
>> 
>> From: Bernard Metzler <bmt@zurich.ibm.com>
>> 
>> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
>> ---
>> drivers/infiniband/sw/siw/siw_main.c |    5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>> 
>> 
>> Hi Bernard!
>> 
>> How come this change isn't in the upstream siw driver yet?
>> 
>> 
> 
> Hi Chuck,
> Good question! Did I ever send the patch to linux-rdma, or was
> that conversation off-list? Sorry for asking, I can't find it in my
> or linux-rdma history...

I don't recall seeing this patch on the public mailing list.
The conversation was between Ben Coddington, you, and me, as
I recall.


> Thank you!
> Bernard
> 
> 
>> diff --git a/drivers/infiniband/sw/siw/siw_main.c
>> b/drivers/infiniband/sw/siw/siw_main.c
>> index e5c586913d0b..dacc174604bf 100644
>> --- a/drivers/infiniband/sw/siw/siw_main.c
>> +++ b/drivers/infiniband/sw/siw/siw_main.c
>> @@ -119,6 +119,7 @@ static int siw_dev_qualified(struct net_device
>> *netdev)
>> 	 * <linux/if_arp.h> for type identifiers.
>> 	 */
>> 	if (netdev->type == ARPHRD_ETHER || netdev->type ==
>> ARPHRD_IEEE802 ||
>> +	    netdev->type == ARPHRD_NONE ||
>> 	    (netdev->type == ARPHRD_LOOPBACK && loopback_enabled))
>> 		return 1;
>> 
>> @@ -315,12 +316,12 @@ static struct siw_device *siw_device_create(struct
>> net_device *netdev)
>> 
>> 	sdev->netdev = netdev;
>> 
>> -	if (netdev->type != ARPHRD_LOOPBACK) {
>> +	if (netdev->type != ARPHRD_LOOPBACK && netdev->type !=
>> ARPHRD_NONE) {
>> 		addrconf_addr_eui48((unsigned char *)&base_dev-
>>> node_guid,
>> 				    netdev->dev_addr);
>> 	} else {
>> 		/*
>> -		 * The loopback device does not have a HW address,
>> +		 * This device does not have a HW address,
>> 		 * but connection mangagement lib expects gid != 0
>> 		 */
>> 		size_t len = min_t(size_t, strlen(base_dev->name), 6);

--
Chuck Lever




^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] RDMA/siw: Enable siw on tunnel devices
@ 2022-05-01 14:18 Bernard Metzler
  2022-05-02 21:36 ` Chuck Lever III
  0 siblings, 1 reply; 6+ messages in thread
From: Bernard Metzler @ 2022-05-01 14:18 UTC (permalink / raw)
  To: Chuck Lever; +Cc: linux-rdma



> -----Original Message-----
> From: Chuck Lever <chuck.lever@oracle.com>
> Sent: Thursday, 28 April 2022 19:49
> To: Bernard Metzler <BMT@zurich.ibm.com>
> Cc: linux-rdma@vger.kernel.org
> Subject: [EXTERNAL] [PATCH] RDMA/siw: Enable siw on tunnel devices
> 
> From: Bernard Metzler <bmt@zurich.ibm.com>
> 
> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
> ---
>  drivers/infiniband/sw/siw/siw_main.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> 
> Hi Bernard!
> 
> How come this change isn't in the upstream siw driver yet?
> 
> 

Hi Chuck,
Good question! Did I ever send the patch to linux-rdma, or was
that conversation off-list? Sorry for asking, I can't find it in my
or linux-rdma history...

Thank you!
Bernard


> diff --git a/drivers/infiniband/sw/siw/siw_main.c
> b/drivers/infiniband/sw/siw/siw_main.c
> index e5c586913d0b..dacc174604bf 100644
> --- a/drivers/infiniband/sw/siw/siw_main.c
> +++ b/drivers/infiniband/sw/siw/siw_main.c
> @@ -119,6 +119,7 @@ static int siw_dev_qualified(struct net_device
> *netdev)
>  	 * <linux/if_arp.h> for type identifiers.
>  	 */
>  	if (netdev->type == ARPHRD_ETHER || netdev->type ==
> ARPHRD_IEEE802 ||
> +	    netdev->type == ARPHRD_NONE ||
>  	    (netdev->type == ARPHRD_LOOPBACK && loopback_enabled))
>  		return 1;
> 
> @@ -315,12 +316,12 @@ static struct siw_device *siw_device_create(struct
> net_device *netdev)
> 
>  	sdev->netdev = netdev;
> 
> -	if (netdev->type != ARPHRD_LOOPBACK) {
> +	if (netdev->type != ARPHRD_LOOPBACK && netdev->type !=
> ARPHRD_NONE) {
>  		addrconf_addr_eui48((unsigned char *)&base_dev-
> >node_guid,
>  				    netdev->dev_addr);
>  	} else {
>  		/*
> -		 * The loopback device does not have a HW address,
> +		 * This device does not have a HW address,
>  		 * but connection mangagement lib expects gid != 0
>  		 */
>  		size_t len = min_t(size_t, strlen(base_dev->name), 6);
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-11 18:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 17:49 [PATCH] RDMA/siw: Enable siw on tunnel devices Chuck Lever
2022-05-01 14:18 Bernard Metzler
2022-05-02 21:36 ` Chuck Lever III
2022-05-09 13:41   ` Chuck Lever III
2022-05-10 14:39 Bernard Metzler
2022-05-11 18:54 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).