Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* Unable to establish rdma connection, breaks rdma basic functionality
@ 2016-01-06  4:43 Hariprasad S
       [not found] ` <26E3F92EC670BD429DB5CB319D773C13C4452BD0-m9HP2+76emFEErodcbzraFjMPmZJtkid@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Hariprasad S @ 2016-01-06  4:43 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
  Cc: SWise OGC, Nirranjan Kirubaharan, Potnuri Bharat Teja


Hi Doug,

I am trying to rping server, but it fails when bound to any address other then IF_ANY.
# rping -s -a 102.1.1.129 -C1 -p 9999 -vd
created cm_id 0x23d7800
rdma_bind_addr: No such file or directory
destroy cm_id 0x23d7800

If bound to IF_ANY address, server starts but client fails to establish connection.
# rping -s -C1 -p 9999 -vvvd
created cm_id 0xc34800
rdma_bind_addr successful
rdma_listen

And the commit which introduced this regression is

commit abae1b71dd37bab506b14a6cf6ba7148f4d57232
Author: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Date:   Thu Oct 15 18:38:49 2015 +0300

    IB/cma: cma_validate_port should verify the port and netdevice

    Previously, cma_validate_port searched for GIDs in IB cache and then
    tried to verify the found port. This could fail when there are
    identical GIDs on both ports. In addition, netdevice should be taken
    into account when searching the GID table.
    Fixing cma_validate_port to search only the relevant port's cache
    and netdevice.

    Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
    Signed-off-by: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org


The bug is easily reproducible with latest rc and breaks basic rdma functionality.
Since 4.4 is already in -rc8, can we have a quick fix.

Thanks,
Hari--
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] 3+ messages in thread

* Re: Unable to establish rdma connection, breaks rdma basic functionality
       [not found] ` <26E3F92EC670BD429DB5CB319D773C13C4452BD0-m9HP2+76emFEErodcbzraFjMPmZJtkid@public.gmane.org>
@ 2016-01-06 10:33   ` Matan Barak
       [not found]     ` <CAAKD3BD3oj7kBgHrpkoVFVXtFAUHgkkSHP3vBSWRZCc+VCC++g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Matan Barak @ 2016-01-06 10:33 UTC (permalink / raw)
  To: Hariprasad S
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, SWise OGC,
	Nirranjan Kirubaharan, Potnuri Bharat Teja

On Wed, Jan 6, 2016 at 6:43 AM, Hariprasad S <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org> wrote:
>
> Hi Doug,
>
> I am trying to rping server, but it fails when bound to any address other then IF_ANY.
> # rping -s -a 102.1.1.129 -C1 -p 9999 -vd
> created cm_id 0x23d7800
> rdma_bind_addr: No such file or directory
> destroy cm_id 0x23d7800
>
> If bound to IF_ANY address, server starts but client fails to establish connection.
> # rping -s -C1 -p 9999 -vvvd
> created cm_id 0xc34800
> rdma_bind_addr successful
> rdma_listen
>
> And the commit which introduced this regression is
>
> commit abae1b71dd37bab506b14a6cf6ba7148f4d57232
> Author: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Date:   Thu Oct 15 18:38:49 2015 +0300
>
>     IB/cma: cma_validate_port should verify the port and netdevice
>
>     Previously, cma_validate_port searched for GIDs in IB cache and then
>     tried to verify the found port. This could fail when there are
>     identical GIDs on both ports. In addition, netdevice should be taken
>     into account when searching the GID table.
>     Fixing cma_validate_port to search only the relevant port's cache
>     and netdevice.
>
>     Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>     Signed-off-by: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
>
>
> The bug is easily reproducible with latest rc and breaks basic rdma functionality.
> Since 4.4 is already in -rc8, can we have a quick fix.
>
> Thanks,
> Hari--

Hi,

I don't have a iwarp server, so could you please test this simple fix:

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 2cbf9c9..351e835 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -439,7 +439,7 @@ static inline int cma_validate_port(struct
ib_device *device, u8 port,
        if ((dev_type != ARPHRD_INFINIBAND) && rdma_protocol_ib(device, port))
                return ret;

-       if (dev_type == ARPHRD_ETHER)
+       if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port))
                ndev = dev_get_by_index(&init_net, bound_if_index);

        ret = ib_find_cached_gid_by_port(device, gid, port, ndev, NULL);

Regards,
Matan

> 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 related	[flat|nested] 3+ messages in thread

* Re: Unable to establish rdma connection, breaks rdma basic functionality
       [not found]     ` <CAAKD3BD3oj7kBgHrpkoVFVXtFAUHgkkSHP3vBSWRZCc+VCC++g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-01-06 11:20       ` Hariprasad Shenai
  0 siblings, 0 replies; 3+ messages in thread
From: Hariprasad Shenai @ 2016-01-06 11:20 UTC (permalink / raw)
  To: Matan Barak
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, SWise OGC,
	Nirranjan Kirubaharan, Potnuri Bharat Teja

On Wed, Jan 06, 2016 at 12:33:09 +0200, Matan Barak wrote:
> On Wed, Jan 6, 2016 at 6:43 AM, Hariprasad S <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org> wrote:
> >
> > Hi Doug,
> >
> > I am trying to rping server, but it fails when bound to any address other then IF_ANY.
> > # rping -s -a 102.1.1.129 -C1 -p 9999 -vd
> > created cm_id 0x23d7800
> > rdma_bind_addr: No such file or directory
> > destroy cm_id 0x23d7800
> >
> > If bound to IF_ANY address, server starts but client fails to establish connection.
> > # rping -s -C1 -p 9999 -vvvd
> > created cm_id 0xc34800
> > rdma_bind_addr successful
> > rdma_listen
> >
> > And the commit which introduced this regression is
> >
> > commit abae1b71dd37bab506b14a6cf6ba7148f4d57232
> > Author: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > Date:   Thu Oct 15 18:38:49 2015 +0300
> >
> >     IB/cma: cma_validate_port should verify the port and netdevice
> >
> >     Previously, cma_validate_port searched for GIDs in IB cache and then
> >     tried to verify the found port. This could fail when there are
> >     identical GIDs on both ports. In addition, netdevice should be taken
> >     into account when searching the GID table.
> >     Fixing cma_validate_port to search only the relevant port's cache
> >     and netdevice.
> >
> >     Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >     Signed-off-by: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
> >
> >
> > The bug is easily reproducible with latest rc and breaks basic rdma functionality.
> > Since 4.4 is already in -rc8, can we have a quick fix.
> >
> > Thanks,
> > Hari--
> 
> Hi,
> 
> I don't have a iwarp server, so could you please test this simple fix:
> 
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index 2cbf9c9..351e835 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -439,7 +439,7 @@ static inline int cma_validate_port(struct
> ib_device *device, u8 port,
>         if ((dev_type != ARPHRD_INFINIBAND) && rdma_protocol_ib(device, port))
>                 return ret;
> 
> -       if (dev_type == ARPHRD_ETHER)
> +       if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port))
>                 ndev = dev_get_by_index(&init_net, bound_if_index);
> 
>         ret = ib_find_cached_gid_by_port(device, gid, port, ndev, NULL);
> 
> Regards,
> Matan

Hi Matan,

Thanks. It worked for me.

Regards,
Hari

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

end of thread, other threads:[~2016-01-06 11:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-06  4:43 Unable to establish rdma connection, breaks rdma basic functionality Hariprasad S
     [not found] ` <26E3F92EC670BD429DB5CB319D773C13C4452BD0-m9HP2+76emFEErodcbzraFjMPmZJtkid@public.gmane.org>
2016-01-06 10:33   ` Matan Barak
     [not found]     ` <CAAKD3BD3oj7kBgHrpkoVFVXtFAUHgkkSHP3vBSWRZCc+VCC++g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-06 11:20       ` Hariprasad Shenai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox