All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iw_cxgb4: use wildcard mapping for getting remote addr info
@ 2015-05-07 14:52 Steve Wise
       [not found] ` <20150507145224.28735.97977.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Wise @ 2015-05-07 14:52 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

For listening endpoints bound to the wildcard address, we need to pass
the wildcard address mapping to iwpm_get_remote_info() instead of the
mapped address of the new child connection.

Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/cm.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index bb95a6c..3ad8dc7 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -583,18 +583,18 @@ static void c4iw_record_pm_msg(struct c4iw_ep *ep,
 		sizeof(ep->com.mapped_remote_addr));
 }
 
-static int get_remote_addr(struct c4iw_ep *ep)
+static int get_remote_addr(struct c4iw_ep *parent_ep, struct c4iw_ep *child_ep)
 {
 	int ret;
 
-	print_addr(&ep->com, __func__, "get_remote_addr");
+	print_addr(&parent_ep->com, __func__, "get_remote_addr parent_ep ");
+	print_addr(&child_ep->com, __func__, "get_remote_addr child_ep ");
 
-	ret = iwpm_get_remote_info(&ep->com.mapped_local_addr,
-				   &ep->com.mapped_remote_addr,
-				   &ep->com.remote_addr, RDMA_NL_C4IW);
+	ret = iwpm_get_remote_info(&parent_ep->com.mapped_local_addr,
+				   &child_ep->com.mapped_remote_addr,
+				   &child_ep->com.remote_addr, RDMA_NL_C4IW);
 	if (ret)
-		pr_info(MOD "Unable to find remote peer addr info - err %d\n",
-			ret);
+		PDBG("Unable to find remote peer addr info - err %d\n", ret);
 
 	return ret;
 }
@@ -2420,7 +2420,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
 	}
 	memcpy(&child_ep->com.remote_addr, &child_ep->com.mapped_remote_addr,
 	       sizeof(child_ep->com.remote_addr));
-	get_remote_addr(child_ep);
+	get_remote_addr(parent_ep, child_ep);
 
 	c4iw_get_ep(&parent_ep->com);
 	child_ep->parent_ep = parent_ep;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] iw_cxgb4: use wildcard mapping for getting remote addr info
       [not found] ` <20150507145224.28735.97977.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
@ 2015-05-07 15:20   ` Doug Ledford
  2015-05-07 15:43   ` Nikolova, Tatyana E
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Doug Ledford @ 2015-05-07 15:20 UTC (permalink / raw)
  To: Steve Wise; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 2175 bytes --]

On Thu, 2015-05-07 at 09:52 -0500, Steve Wise wrote:
> For listening endpoints bound to the wildcard address, we need to pass
> the wildcard address mapping to iwpm_get_remote_info() instead of the
> mapped address of the new child connection.
> 
> Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> ---
>  drivers/infiniband/hw/cxgb4/cm.c |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
> index bb95a6c..3ad8dc7 100644
> --- a/drivers/infiniband/hw/cxgb4/cm.c
> +++ b/drivers/infiniband/hw/cxgb4/cm.c
> @@ -583,18 +583,18 @@ static void c4iw_record_pm_msg(struct c4iw_ep *ep,
>  		sizeof(ep->com.mapped_remote_addr));
>  }
>  
> -static int get_remote_addr(struct c4iw_ep *ep)
> +static int get_remote_addr(struct c4iw_ep *parent_ep, struct c4iw_ep *child_ep)
>  {
>  	int ret;
>  
> -	print_addr(&ep->com, __func__, "get_remote_addr");
> +	print_addr(&parent_ep->com, __func__, "get_remote_addr parent_ep ");
> +	print_addr(&child_ep->com, __func__, "get_remote_addr child_ep ");
>  
> -	ret = iwpm_get_remote_info(&ep->com.mapped_local_addr,
> -				   &ep->com.mapped_remote_addr,
> -				   &ep->com.remote_addr, RDMA_NL_C4IW);
> +	ret = iwpm_get_remote_info(&parent_ep->com.mapped_local_addr,
> +				   &child_ep->com.mapped_remote_addr,
> +				   &child_ep->com.remote_addr, RDMA_NL_C4IW);
>  	if (ret)
> -		pr_info(MOD "Unable to find remote peer addr info - err %d\n",
> -			ret);
> +		PDBG("Unable to find remote peer addr info - err %d\n", ret);
>  
>  	return ret;
>  }
> @@ -2420,7 +2420,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
>  	}
>  	memcpy(&child_ep->com.remote_addr, &child_ep->com.mapped_remote_addr,
>  	       sizeof(child_ep->com.remote_addr));
> -	get_remote_addr(child_ep);
> +	get_remote_addr(parent_ep, child_ep);
>  
>  	c4iw_get_ep(&parent_ep->com);
>  	child_ep->parent_ep = parent_ep;
> 

Seems sane.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* RE: [PATCH] iw_cxgb4: use wildcard mapping for getting remote addr info
       [not found] ` <20150507145224.28735.97977.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
  2015-05-07 15:20   ` Doug Ledford
@ 2015-05-07 15:43   ` Nikolova, Tatyana E
  2015-05-07 20:23   ` Tatyana Nikolova
  2015-05-07 20:45   ` Jason Gunthorpe
  3 siblings, 0 replies; 7+ messages in thread
From: Nikolova, Tatyana E @ 2015-05-07 15:43 UTC (permalink / raw)
  To: Steve Wise, dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2575 bytes --]

Reviewed-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> 

-----Original Message-----
From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-owner@vger.kernel.org] On Behalf Of Steve Wise
Sent: Thursday, May 07, 2015 9:52 AM
To: dledford@redhat.com
Cc: linux-rdma@vger.kernel.org
Subject: [PATCH] iw_cxgb4: use wildcard mapping for getting remote addr info

For listening endpoints bound to the wildcard address, we need to pass the wildcard address mapping to iwpm_get_remote_info() instead of the mapped address of the new child connection.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
---
 drivers/infiniband/hw/cxgb4/cm.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index bb95a6c..3ad8dc7 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -583,18 +583,18 @@ static void c4iw_record_pm_msg(struct c4iw_ep *ep,
 		sizeof(ep->com.mapped_remote_addr));
 }
 
-static int get_remote_addr(struct c4iw_ep *ep)
+static int get_remote_addr(struct c4iw_ep *parent_ep, struct c4iw_ep 
+*child_ep)
 {
 	int ret;
 
-	print_addr(&ep->com, __func__, "get_remote_addr");
+	print_addr(&parent_ep->com, __func__, "get_remote_addr parent_ep ");
+	print_addr(&child_ep->com, __func__, "get_remote_addr child_ep ");
 
-	ret = iwpm_get_remote_info(&ep->com.mapped_local_addr,
-				   &ep->com.mapped_remote_addr,
-				   &ep->com.remote_addr, RDMA_NL_C4IW);
+	ret = iwpm_get_remote_info(&parent_ep->com.mapped_local_addr,
+				   &child_ep->com.mapped_remote_addr,
+				   &child_ep->com.remote_addr, RDMA_NL_C4IW);
 	if (ret)
-		pr_info(MOD "Unable to find remote peer addr info - err %d\n",
-			ret);
+		PDBG("Unable to find remote peer addr info - err %d\n", ret);
 
 	return ret;
 }
@@ -2420,7 +2420,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
 	}
 	memcpy(&child_ep->com.remote_addr, &child_ep->com.mapped_remote_addr,
 	       sizeof(child_ep->com.remote_addr));
-	get_remote_addr(child_ep);
+	get_remote_addr(parent_ep, child_ep);
 
 	c4iw_get_ep(&parent_ep->com);
 	child_ep->parent_ep = parent_ep;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html
N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±­ÙšŠ{ayº\x1dʇڙë,j\a­¢f£¢·hš‹»öì\x17/oSc¾™Ú³9˜uÀ¦æå‰È&jw¨®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿïêäz¹Þ–Šàþf£¢·hšˆ§~ˆmš

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

* Re: [PATCH] iw_cxgb4: use wildcard mapping for getting remote addr info
       [not found] ` <20150507145224.28735.97977.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
  2015-05-07 15:20   ` Doug Ledford
  2015-05-07 15:43   ` Nikolova, Tatyana E
@ 2015-05-07 20:23   ` Tatyana Nikolova
  2015-05-07 20:45   ` Jason Gunthorpe
  3 siblings, 0 replies; 7+ messages in thread
From: Tatyana Nikolova @ 2015-05-07 20:23 UTC (permalink / raw)
  To: Steve Wise
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, linux-rdma-u79uwXL29TY76Z2rM5mHXA

Reviewed-by: Tatyana Nikolova <Tatyana.E.Nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

On Thu, May 07, 2015 at 09:52:24AM -0500, Steve Wise wrote:
> For listening endpoints bound to the wildcard address, we need to pass
> the wildcard address mapping to iwpm_get_remote_info() instead of the
> mapped address of the new child connection.
> 
> Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> ---
>  drivers/infiniband/hw/cxgb4/cm.c |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
> index bb95a6c..3ad8dc7 100644
> --- a/drivers/infiniband/hw/cxgb4/cm.c
> +++ b/drivers/infiniband/hw/cxgb4/cm.c
> @@ -583,18 +583,18 @@ static void c4iw_record_pm_msg(struct c4iw_ep *ep,
>  		sizeof(ep->com.mapped_remote_addr));
>  }
>  
> -static int get_remote_addr(struct c4iw_ep *ep)
> +static int get_remote_addr(struct c4iw_ep *parent_ep, struct c4iw_ep *child_ep)
>  {
>  	int ret;
>  
> -	print_addr(&ep->com, __func__, "get_remote_addr");
> +	print_addr(&parent_ep->com, __func__, "get_remote_addr parent_ep ");
> +	print_addr(&child_ep->com, __func__, "get_remote_addr child_ep ");
>  
> -	ret = iwpm_get_remote_info(&ep->com.mapped_local_addr,
> -				   &ep->com.mapped_remote_addr,
> -				   &ep->com.remote_addr, RDMA_NL_C4IW);
> +	ret = iwpm_get_remote_info(&parent_ep->com.mapped_local_addr,
> +				   &child_ep->com.mapped_remote_addr,
> +				   &child_ep->com.remote_addr, RDMA_NL_C4IW);
>  	if (ret)
> -		pr_info(MOD "Unable to find remote peer addr info - err %d\n",
> -			ret);
> +		PDBG("Unable to find remote peer addr info - err %d\n", ret);
>  
>  	return ret;
>  }
> @@ -2420,7 +2420,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
>  	}
>  	memcpy(&child_ep->com.remote_addr, &child_ep->com.mapped_remote_addr,
>  	       sizeof(child_ep->com.remote_addr));
> -	get_remote_addr(child_ep);
> +	get_remote_addr(parent_ep, child_ep);
>  
>  	c4iw_get_ep(&parent_ep->com);
>  	child_ep->parent_ep = parent_ep;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: iw_cxgb4: use wildcard mapping for getting remote addr info
       [not found] ` <20150507145224.28735.97977.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
                     ` (2 preceding siblings ...)
  2015-05-07 20:23   ` Tatyana Nikolova
@ 2015-05-07 20:45   ` Jason Gunthorpe
       [not found]     ` <20150507204508.GA1195-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  3 siblings, 1 reply; 7+ messages in thread
From: Jason Gunthorpe @ 2015-05-07 20:45 UTC (permalink / raw)
  To: Steve Wise
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Thu, May 07, 2015 at 09:52:24AM -0500, Steve Wise wrote:
> For listening endpoints bound to the wildcard address, we need to pass
> the wildcard address mapping to iwpm_get_remote_info() instead of the
> mapped address of the new child connection.

It would be nice to see a discussion about what bug this fixes in the
commit message...

So we can answer the question: Does this need to go to -stable?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: iw_cxgb4: use wildcard mapping for getting remote addr info
       [not found]     ` <20150507204508.GA1195-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2015-05-07 21:00       ` Steve Wise
       [not found]         ` <554BD282.7060800-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Wise @ 2015-05-07 21:00 UTC (permalink / raw)
  To: Jason Gunthorpe, dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On 5/7/2015 3:45 PM, Jason Gunthorpe wrote:
> On Thu, May 07, 2015 at 09:52:24AM -0500, Steve Wise wrote:
>> For listening endpoints bound to the wildcard address, we need to pass
>> the wildcard address mapping to iwpm_get_remote_info() instead of the
>> mapped address of the new child connection.
> It would be nice to see a discussion about what bug this fixes in the
> commit message...
>
> So we can answer the question: Does this need to go to -stable?
>

Without this fix, and with iwarp port mapping enabled, each iw_cxgb4 
connection that is spawned from a listening endpoint bound to the 
wildcard address, will generate an annoying dmesg entry about failing to 
find the remote address mapping info, and the connection state displayed 
in debugfs under /sys/kernel/debug/iw_cxgb4/<pci-slot-no>/eps  will not 
have the peer's address/port mapping info.  The connection still works 
though.

This does not need to hit stable because the remote_info logic was just 
added in 4.1 with:
---
commit 5b6b8fe64053b2649660ded2f3c5be25ebddbfdb
Author: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Date:   Tue Apr 21 16:28:41 2015 -0400

     RDMA/cxgb4: Report the actual address of the remote connecting peer
---


Doug, shall I resend the patch with an updated comment?

Steve.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: iw_cxgb4: use wildcard mapping for getting remote addr info
       [not found]         ` <554BD282.7060800-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
@ 2015-05-07 21:09           ` Jason Gunthorpe
  0 siblings, 0 replies; 7+ messages in thread
From: Jason Gunthorpe @ 2015-05-07 21:09 UTC (permalink / raw)
  To: Steve Wise
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Thu, May 07, 2015 at 04:00:50PM -0500, Steve Wise wrote:

> This does not need to hit stable because the remote_info logic was
> just added in 4.1 with:

> commit 5b6b8fe64053b2649660ded2f3c5be25ebddbfdb
> Author: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> Date:   Tue Apr 21 16:28:41 2015 -0400
> 
>     RDMA/cxgb4: Report the actual address of the remote connecting peer
> 
> 
> Doug, shall I resend the patch with an updated comment?

I would, you also need to supply a Fixes tag anyhow, and there should
have been a brief note after '--' that this is a bug fix for 4.1 so it
gets prioritized and doesn't wait for the next merge window.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-05-07 21:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07 14:52 [PATCH] iw_cxgb4: use wildcard mapping for getting remote addr info Steve Wise
     [not found] ` <20150507145224.28735.97977.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2015-05-07 15:20   ` Doug Ledford
2015-05-07 15:43   ` Nikolova, Tatyana E
2015-05-07 20:23   ` Tatyana Nikolova
2015-05-07 20:45   ` Jason Gunthorpe
     [not found]     ` <20150507204508.GA1195-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-07 21:00       ` Steve Wise
     [not found]         ` <554BD282.7060800-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2015-05-07 21:09           ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.