All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IB/cma: Fix RDMA port validation for iWarp
@ 2016-01-06 13:06 Matan Barak
       [not found] ` <1452085579-7421-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Matan Barak @ 2016-01-06 13:06 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Or Gerlitz, Majd Dibbiny,
	Hariprasad Shenai, Matan Barak

cma_validate_port wrongly assumed that Ethernet devices are RoCE
devices and thus their ndev should be matched in the GID table.
This broke the iWrap support. Fixing that matching the ndev only if
we work on a RoCE port.

Fixes: abae1b71dd37 ('IB/cma: cma_validate_port should verify the port
		     and netdevice')
Reported-by: Hariprasad Shenai <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
Tested-by: Hariprasad Shenai <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---

Hi Doug,

This patch fixes an iWarp issue that was introduced in the RoCE
refactoring series.

Regards,
Matan

 drivers/infiniband/core/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 2d762a2..17a15c5 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -453,7 +453,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);
-- 
2.1.0

--
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: [PATCH] IB/cma: Fix RDMA port validation for iWarp
       [not found] ` <1452085579-7421-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2016-01-06 16:50   ` Steve Wise
       [not found]     ` <568D45C4.8030600-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Wise @ 2016-01-06 16:50 UTC (permalink / raw)
  To: Matan Barak, Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Or Gerlitz, Majd Dibbiny,
	Hariprasad Shenai

On 1/6/2016 7:06 AM, Matan Barak wrote:
> cma_validate_port wrongly assumed that Ethernet devices are RoCE
> devices and thus their ndev should be matched in the GID table.
> This broke the iWrap support. Fixing that matching the ndev only if

Typo "iWrap"

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

> we work on a RoCE port.
>
> Fixes: abae1b71dd37 ('IB/cma: cma_validate_port should verify the port
> 		     and netdevice')
> Reported-by: Hariprasad Shenai <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
> Tested-by: Hariprasad Shenai <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>
> Hi Doug,
>
> This patch fixes an iWarp issue that was introduced in the RoCE
> refactoring series.
>
> Regards,
> Matan
>
>   drivers/infiniband/core/cma.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index 2d762a2..17a15c5 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -453,7 +453,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);

--
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: [PATCH] IB/cma: Fix RDMA port validation for iWarp
       [not found]     ` <568D45C4.8030600-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
@ 2016-01-07  9:21       ` Matan Barak
  0 siblings, 0 replies; 3+ messages in thread
From: Matan Barak @ 2016-01-07  9:21 UTC (permalink / raw)
  To: Steve Wise
  Cc: Matan Barak, Doug Ledford, linux-rdma, Or Gerlitz, Majd Dibbiny,
	Hariprasad Shenai

On Wed, Jan 6, 2016 at 6:50 PM, Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org> wrote:
> On 1/6/2016 7:06 AM, Matan Barak wrote:
>>
>> cma_validate_port wrongly assumed that Ethernet devices are RoCE
>> devices and thus their ndev should be matched in the GID table.
>> This broke the iWrap support. Fixing that matching the ndev only if
>
>
> Typo "iWrap"
>

Thanks, I fixed the spelling mistake.

> Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
>
>
>> we work on a RoCE port.
>>
>> Fixes: abae1b71dd37 ('IB/cma: cma_validate_port should verify the port
>>                      and netdevice')
>> Reported-by: Hariprasad Shenai <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
>> Tested-by: Hariprasad Shenai <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
>> Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>> ---
>>
>> Hi Doug,
>>
>> This patch fixes an iWarp issue that was introduced in the RoCE
>> refactoring series.
>>
>> Regards,
>> Matan
>>
>>   drivers/infiniband/core/cma.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
>> index 2d762a2..17a15c5 100644
>> --- a/drivers/infiniband/core/cma.c
>> +++ b/drivers/infiniband/core/cma.c
>> @@ -453,7 +453,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);
>
>
> --
> 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-07  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-06 13:06 [PATCH] IB/cma: Fix RDMA port validation for iWarp Matan Barak
     [not found] ` <1452085579-7421-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-01-06 16:50   ` Steve Wise
     [not found]     ` <568D45C4.8030600-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2016-01-07  9:21       ` Matan Barak

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.