linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] rdma/core: Don't dereference device->get_link_layer directly
@ 2017-09-20 11:54 Sagi Grimberg
       [not found] ` <1505908483-29641-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Sagi Grimberg @ 2017-09-20 11:54 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

We have rdma_port_get_link_layer that checks the callout
is actually implemented.

Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
---
Changes from v1:
- fixed typo

 drivers/infiniband/core/verbs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index ee9e27dc799b..de57d6c11a25 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1646,7 +1646,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid)
 	 */
 	if (!ib_query_qp(qp, &attr, IB_QP_STATE | IB_QP_PORT, &init_attr)) {
 		if (attr.qp_state >= IB_QPS_INIT) {
-			if (qp->device->get_link_layer(qp->device, attr.port_num) !=
+			if (rdma_port_get_link_layer(qp->device, attr.port_num) !=
 			    IB_LINK_LAYER_INFINIBAND)
 				return true;
 			goto lid_check;
@@ -1655,7 +1655,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid)
 
 	/* Can't get a quick answer, iterate over all ports */
 	for (port = 0; port < qp->device->phys_port_cnt; port++)
-		if (qp->device->get_link_layer(qp->device, port) !=
+		if (rdma_port_get_link_layer(qp->device, port) !=
 		    IB_LINK_LAYER_INFINIBAND)
 			num_eth_ports++;
 
-- 
2.7.4

--
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] 5+ messages in thread

* RE: [PATCH v2] rdma/core: Don't dereference device->get_link_layer directly
       [not found] ` <1505908483-29641-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
@ 2017-09-20 12:33   ` Estrin, Alex
       [not found]     ` <F3529576D8E232409F431C309E29399336CD902F-8k97q/ur5Z1cIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Estrin, Alex @ 2017-09-20 12:33 UTC (permalink / raw)
  To: Sagi Grimberg, Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Patch for this issue was already posted about 3 weeks ago.
https://patchwork.kernel.org/patch/9932505/

Thanks,
Alex.

> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Sagi Grimberg
> Sent: Wednesday, September 20, 2017 7:55 AM
> To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: [PATCH v2] rdma/core: Don't dereference device->get_link_layer directly
> 
> We have rdma_port_get_link_layer that checks the callout
> is actually implemented.
> 
> Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
> ---
> Changes from v1:
> - fixed typo
> 
>  drivers/infiniband/core/verbs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
> index ee9e27dc799b..de57d6c11a25 100644
> --- a/drivers/infiniband/core/verbs.c
> +++ b/drivers/infiniband/core/verbs.c
> @@ -1646,7 +1646,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid)
>  	 */
>  	if (!ib_query_qp(qp, &attr, IB_QP_STATE | IB_QP_PORT, &init_attr)) {
>  		if (attr.qp_state >= IB_QPS_INIT) {
> -			if (qp->device->get_link_layer(qp->device, attr.port_num) !=
> +			if (rdma_port_get_link_layer(qp->device, attr.port_num) !=
>  			    IB_LINK_LAYER_INFINIBAND)
>  				return true;
>  			goto lid_check;
> @@ -1655,7 +1655,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid)
> 
>  	/* Can't get a quick answer, iterate over all ports */
>  	for (port = 0; port < qp->device->phys_port_cnt; port++)
> -		if (qp->device->get_link_layer(qp->device, port) !=
> +		if (rdma_port_get_link_layer(qp->device, port) !=
>  		    IB_LINK_LAYER_INFINIBAND)
>  			num_eth_ports++;
> 
> --
> 2.7.4
> 
> --
> 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] 5+ messages in thread

* Re: [PATCH v2] rdma/core: Don't dereference device->get_link_layer directly
       [not found]     ` <F3529576D8E232409F431C309E29399336CD902F-8k97q/ur5Z1cIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2017-09-20 13:47       ` Leon Romanovsky
       [not found]         ` <20170920134723.GO5788-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2017-09-20 13:47 UTC (permalink / raw)
  To: Estrin, Alex
  Cc: Sagi Grimberg, Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA

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

On Wed, Sep 20, 2017 at 12:33:39PM +0000, Estrin, Alex wrote:
> Patch for this issue was already posted about 3 weeks ago.
> https://patchwork.kernel.org/patch/9932505/

Yeah, exactly.
I had a dejavu while I read the "crash IPoIB" report.

I assume that it didn't make to Linus, because it was posted after Doug
went to vacation.

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2] rdma/core: Don't dereference device->get_link_layer directly
       [not found]         ` <20170920134723.GO5788-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-09-22 17:23           ` Doug Ledford
       [not found]             ` <1506101002.5172.9.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Ledford @ 2017-09-22 17:23 UTC (permalink / raw)
  To: Leon Romanovsky, Estrin, Alex
  Cc: Sagi Grimberg, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Wed, 2017-09-20 at 16:47 +0300, Leon Romanovsky wrote:
> On Wed, Sep 20, 2017 at 12:33:39PM +0000, Estrin, Alex wrote:
> > Patch for this issue was already posted about 3 weeks ago.
> > https://patchwork.kernel.org/patch/9932505/
> 
> Yeah, exactly.
> I had a dejavu while I read the "crash IPoIB" report.
> 
> I assume that it didn't make to Linus, because it was posted after
> Doug
> went to vacation.

I wouldn't call it "vacation" ;-).  I had no internet as I was moving
homes.  It was hardly the peaceful, relaxing experience one hopes to
get on vacation! :-)

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
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] 5+ messages in thread

* Re: [PATCH v2] rdma/core: Don't dereference device->get_link_layer directly
       [not found]             ` <1506101002.5172.9.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2017-09-22 19:13               ` Leon Romanovsky
  0 siblings, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2017-09-22 19:13 UTC (permalink / raw)
  To: Doug Ledford
  Cc: Estrin, Alex, Sagi Grimberg, linux-rdma-u79uwXL29TY76Z2rM5mHXA

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

On Fri, Sep 22, 2017 at 01:23:22PM -0400, Doug Ledford wrote:
> On Wed, 2017-09-20 at 16:47 +0300, Leon Romanovsky wrote:
> > On Wed, Sep 20, 2017 at 12:33:39PM +0000, Estrin, Alex wrote:
> > > Patch for this issue was already posted about 3 weeks ago.
> > > https://patchwork.kernel.org/patch/9932505/
> >
> > Yeah, exactly.
> > I had a dejavu while I read the "crash IPoIB" report.
> >
> > I assume that it didn't make to Linus, because it was posted after
> > Doug
> > went to vacation.
>
> I wouldn't call it "vacation" ;-).  I had no internet as I was moving
> homes.  It was hardly the peaceful, relaxing experience one hopes to
> get on vacation! :-)

Nowadays, every day without internet is called "vacation" now :).

>
> --
> Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>     GPG KeyID: B826A3330E572FDD
>     Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-09-22 19:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-20 11:54 [PATCH v2] rdma/core: Don't dereference device->get_link_layer directly Sagi Grimberg
     [not found] ` <1505908483-29641-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-09-20 12:33   ` Estrin, Alex
     [not found]     ` <F3529576D8E232409F431C309E29399336CD902F-8k97q/ur5Z1cIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-09-20 13:47       ` Leon Romanovsky
     [not found]         ` <20170920134723.GO5788-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-09-22 17:23           ` Doug Ledford
     [not found]             ` <1506101002.5172.9.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-09-22 19:13               ` Leon Romanovsky

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).