* [PATCH] mlx4: properly mask MGM entry members count
@ 2010-11-15 14:08 Eli Cohen
2010-11-16 9:38 ` Aleksey Senin
2010-11-16 16:11 ` Roland Dreier
0 siblings, 2 replies; 15+ messages in thread
From: Eli Cohen @ 2010-11-15 14:08 UTC (permalink / raw)
To: Roland Dreier; +Cc: RDMA list
The members_count field size is 24 bits so mask it properly when reading it.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
---
drivers/net/mlx4/mcg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/mlx4/mcg.c b/drivers/net/mlx4/mcg.c
index c4f88b7..fff20fc 100644
--- a/drivers/net/mlx4/mcg.c
+++ b/drivers/net/mlx4/mcg.c
@@ -187,7 +187,7 @@ int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
memcpy(mgm->gid, gid, 16);
}
- members_count = be32_to_cpu(mgm->members_count);
+ members_count = be32_to_cpu(mgm->members_count) & 0xffffff;
if (members_count == MLX4_QP_PER_MGM) {
mlx4_err(dev, "MGM at index %x is full.\n", index);
err = -ENOMEM;
--
1.6.0.2
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
2010-11-15 14:08 [PATCH] mlx4: properly mask MGM entry members count Eli Cohen
@ 2010-11-16 9:38 ` Aleksey Senin
[not found] ` <AANLkTi=zJsFjbrZrpj-E65T49ewgqdia+MOPnqmgx5KW-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-16 16:11 ` Roland Dreier
1 sibling, 1 reply; 15+ messages in thread
From: Aleksey Senin @ 2010-11-16 9:38 UTC (permalink / raw)
To: Eli Cohen; +Cc: Roland Dreier, RDMA list
On Mon, Nov 15, 2010 at 4:08 PM, Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> wrote:
> The members_count field size is 24 bits so mask it properly when reading it.
>
> Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
> ---
> drivers/net/mlx4/mcg.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/mlx4/mcg.c b/drivers/net/mlx4/mcg.c
> index c4f88b7..fff20fc 100644
> --- a/drivers/net/mlx4/mcg.c
> +++ b/drivers/net/mlx4/mcg.c
> @@ -187,7 +187,7 @@ int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
> memcpy(mgm->gid, gid, 16);
> }
>
> - members_count = be32_to_cpu(mgm->members_count);
> + members_count = be32_to_cpu(mgm->members_count) & 0xffffff;
> if (members_count == MLX4_QP_PER_MGM) {
> mlx4_err(dev, "MGM at index %x is full.\n", index);
> err = -ENOMEM;
> --
> 1.6.0.2
>
Don't you need to do the same when detaching?
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
2010-11-15 14:08 [PATCH] mlx4: properly mask MGM entry members count Eli Cohen
2010-11-16 9:38 ` Aleksey Senin
@ 2010-11-16 16:11 ` Roland Dreier
[not found] ` <ada62vxl046.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
1 sibling, 1 reply; 15+ messages in thread
From: Roland Dreier @ 2010-11-16 16:11 UTC (permalink / raw)
To: Eli Cohen; +Cc: RDMA list
> The members_count field size is 24 bits so mask it properly when reading it.
what's the impact of this? Does this actually fix something seen in
practice or is it just found by inspection?
- R.
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
[not found] ` <AANLkTi=zJsFjbrZrpj-E65T49ewgqdia+MOPnqmgx5KW-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-11-16 18:03 ` Eli Cohen
0 siblings, 0 replies; 15+ messages in thread
From: Eli Cohen @ 2010-11-16 18:03 UTC (permalink / raw)
To: Aleksey Senin; +Cc: Roland Dreier, RDMA list
On Tue, Nov 16, 2010 at 11:38:45AM +0200, Aleksey Senin wrote:
> On Mon, Nov 15, 2010 at 4:08 PM, Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> wrote:
>
> Don't you need to do the same when detaching?
Yes, indeed. It was in the original OFED patch but somehow I failed to
include that hunk.
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
[not found] ` <ada62vxl046.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2010-11-16 18:07 ` Eli Cohen
2010-11-16 22:43 ` Roland Dreier
0 siblings, 1 reply; 15+ messages in thread
From: Eli Cohen @ 2010-11-16 18:07 UTC (permalink / raw)
To: Roland Dreier; +Cc: RDMA list
On Tue, Nov 16, 2010 at 08:11:21AM -0800, Roland Dreier wrote:
> > The members_count field size is 24 bits so mask it properly when reading it.
>
> what's the impact of this? Does this actually fix something seen in
> practice or is it just found by inspection?
>
We need this patch as the MS byte is used now to encode the protocol
of the multicast address. I need to resend since the patch is missing
handling in the dettach function.
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
2010-11-16 18:07 ` Eli Cohen
@ 2010-11-16 22:43 ` Roland Dreier
[not found] ` <ada1v6klwil.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Roland Dreier @ 2010-11-16 22:43 UTC (permalink / raw)
To: Eli Cohen; +Cc: RDMA list
> We need this patch as the MS byte is used now to encode the protocol
> of the multicast address. I need to resend since the patch is missing
> handling in the dettach function.
Where is the change in handling in the members_count field? In the firmware?
- R.
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
[not found] ` <ada1v6klwil.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2010-11-17 9:01 ` Eli Cohen
2010-11-17 17:38 ` Roland Dreier
0 siblings, 1 reply; 15+ messages in thread
From: Eli Cohen @ 2010-11-17 9:01 UTC (permalink / raw)
To: Roland Dreier; +Cc: RDMA list, alekseys-smomgflXvOZWk0Htik3J/w
On Tue, Nov 16, 2010 at 02:43:46PM -0800, Roland Dreier wrote:
>
> Where is the change in handling in the members_count field? In the firmware?
>
The firmware now distinguishes between differnet multicast addresses
according to a protocol field located in the high MS byte which
previously was reserved. The patches that Alekseys will will probably
send later make use of this.
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
2010-11-17 9:01 ` Eli Cohen
@ 2010-11-17 17:38 ` Roland Dreier
[not found] ` <adasjyzkfyw.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Roland Dreier @ 2010-11-17 17:38 UTC (permalink / raw)
To: Eli Cohen; +Cc: RDMA list, alekseys-smomgflXvOZWk0Htik3J/w
> > Where is the change in handling in the members_count field? In the firmware?
> >
> The firmware now distinguishes between differnet multicast addresses
> according to a protocol field located in the high MS byte which
> previously was reserved. The patches that Alekseys will will probably
> send later make use of this.
OK, so what you seem to be saying is that this patch is not fixing
anything until we add Alekseys patches?
- R.
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
[not found] ` <adasjyzkfyw.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2010-11-18 6:51 ` Eli Cohen
2010-11-25 7:13 ` Aleksey Senin
0 siblings, 1 reply; 15+ messages in thread
From: Eli Cohen @ 2010-11-18 6:51 UTC (permalink / raw)
To: Roland Dreier; +Cc: RDMA list, alekseys-smomgflXvOZWk0Htik3J/w
On Wed, Nov 17, 2010 at 09:38:47AM -0800, Roland Dreier wrote:
> > > Where is the change in handling in the members_count field? In the firmware?
> > >
> > The firmware now distinguishes between differnet multicast addresses
> > according to a protocol field located in the high MS byte which
> > previously was reserved. The patches that Alekseys will will probably
> > send later make use of this.
>
> OK, so what you seem to be saying is that this patch is not fixing
> anything until we add Alekseys patches?
>
It only keeps the code and the PRM in sync.
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
2010-11-18 6:51 ` Eli Cohen
@ 2010-11-25 7:13 ` Aleksey Senin
[not found] ` <AANLkTinN43YgQW3ftbng-4f2NiNe9_oXPVCX5LPzh7uG-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Aleksey Senin @ 2010-11-25 7:13 UTC (permalink / raw)
To: Roland Dreier; +Cc: Eli Cohen, RDMA list, alekseys-smomgflXvOZWk0Htik3J/w
On Thu, Nov 18, 2010 at 8:51 AM, Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> wrote:
> On Wed, Nov 17, 2010 at 09:38:47AM -0800, Roland Dreier wrote:
>> > > Where is the change in handling in the members_count field? In the firmware?
>> > >
>> > The firmware now distinguishes between differnet multicast addresses
>> > according to a protocol field located in the high MS byte which
>> > previously was reserved. The patches that Alekseys will will probably
>> > send later make use of this.
>>
>> OK, so what you seem to be saying is that this patch is not fixing
>> anything until we add Alekseys patches?
>>
> It only keeps the code and the PRM in sync.
> --
RAW_ETH patches cannot be applied without it, so we really need this masking.
In addition, Yevgeny's mlx SRIOV patches
(http://marc.info/?l=linux-rdma&m=127619666403521&w=2 ),
also using this field - there are changes in find_mgm function.
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
[not found] ` <AANLkTinN43YgQW3ftbng-4f2NiNe9_oXPVCX5LPzh7uG-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-11-25 8:36 ` Or Gerlitz
[not found] ` <4CEE200B.70106-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Or Gerlitz @ 2010-11-25 8:36 UTC (permalink / raw)
To: Aleksey Senin
Cc: Roland Dreier, Eli Cohen, RDMA list,
alekseys-smomgflXvOZWk0Htik3J/w
Aleksey Senin wrote:
> RAW_ETH patches cannot be applied without it, so we really need this masking.
So Maybe it would be easier to review and merge if you add this patch to the raw qp patch set
you mentioned
Or.
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
[not found] ` <4CEE200B.70106-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
@ 2010-11-25 8:56 ` Alekseys Senin
[not found] ` <1290675387.4050.51.camel-uOVkuFIEnOODI2cvxHXf6UEOCMrvLtNR@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Alekseys Senin @ 2010-11-25 8:56 UTC (permalink / raw)
To: Or Gerlitz; +Cc: Aleksey Senin, Roland Dreier, Eli Cohen, RDMA list
On Thu, 2010-11-25 at 10:36 +0200, Or Gerlitz wrote:
> Aleksey Senin wrote:
> > RAW_ETH patches cannot be applied without it, so we really need this masking.
>
> So Maybe it would be easier to review and merge if you add this patch to the raw qp patch set
> you mentioned
>
> Or.
I don't think that RAW_ETH patches should contain fixes for Mellanox
driver implementation and make it working according to Mellanox PRM.
In any case, Eli sent patch that easy to review and merge.
In addition, even if I include this change to my series, there is a
chance that from the whole set, will be accepted only this one, and the
rest will be accepted later ;-)
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
[not found] ` <1290675387.4050.51.camel-uOVkuFIEnOODI2cvxHXf6UEOCMrvLtNR@public.gmane.org>
@ 2010-11-28 13:50 ` Aleksey Senin
[not found] ` <AANLkTikWrQRcA62bkM=1zWQuyH6nABSvqnbAeaAjfgcP-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Aleksey Senin @ 2010-11-28 13:50 UTC (permalink / raw)
To: Roland Dreier
Cc: Alekseys Senin, Eli Cohen, RDMA list,
monis-smomgflXvOZWk0Htik3J/w
Hello, Roland.
I afraid that you overloaded with dozen of e-mails and missed this
question, so I'd ask you again. Is there any reason why this
members_count patch cannot be applied?
On Thu, Nov 25, 2010 at 10:56 AM, Alekseys Senin <alekseys-smomgflXvOZWk0Htik3J/w@public.gmane.org> wrote:
> On Thu, 2010-11-25 at 10:36 +0200, Or Gerlitz wrote:
>> Aleksey Senin wrote:
>> > RAW_ETH patches cannot be applied without it, so we really need this masking.
>>
>> So Maybe it would be easier to review and merge if you add this patch to the raw qp patch set
>> you mentioned
>>
>> Or.
>
> I don't think that RAW_ETH patches should contain fixes for Mellanox
> driver implementation and make it working according to Mellanox PRM.
> In any case, Eli sent patch that easy to review and merge.
> In addition, even if I include this change to my series, there is a
> chance that from the whole set, will be accepted only this one, and the
> rest will be accepted later ;-)
>
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
[not found] ` <AANLkTikWrQRcA62bkM=1zWQuyH6nABSvqnbAeaAjfgcP-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-11-29 17:34 ` Roland Dreier
[not found] ` <adafwukf2yy.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Roland Dreier @ 2010-11-29 17:34 UTC (permalink / raw)
To: Aleksey Senin
Cc: Alekseys Senin, Eli Cohen, RDMA list,
monis-smomgflXvOZWk0Htik3J/w
> I afraid that you overloaded with dozen of e-mails and missed this
> question, so I'd ask you again. Is there any reason why this
> members_count patch cannot be applied?
No, it is fine. I will merge it for 2.6.38. However this long thread
should (I hope) show how the changelog could be improved -- if the
original patch had said why the patch was needed then we could have
avoided all this long discussion.
- R.
--
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] 15+ messages in thread
* Re: [PATCH] mlx4: properly mask MGM entry members count
[not found] ` <adafwukf2yy.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2010-11-30 11:07 ` Aleksey Senin
0 siblings, 0 replies; 15+ messages in thread
From: Aleksey Senin @ 2010-11-30 11:07 UTC (permalink / raw)
To: Roland Dreier
Cc: Alekseys Senin, Eli Cohen, RDMA list,
monis-smomgflXvOZWk0Htik3J/w
On Mon, Nov 29, 2010 at 7:34 PM, Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> wrote:
> > I afraid that you overloaded with dozen of e-mails and missed this
> > question, so I'd ask you again. Is there any reason why this
> > members_count patch cannot be applied?
>
> No, it is fine. I will merge it for 2.6.38. However this long thread
> should (I hope) show how the changelog could be improved -- if the
> original patch had said why the patch was needed then we could have
> avoided all this long discussion.
>
> - R.
Excellent news, thanks.
--
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] 15+ messages in thread
end of thread, other threads:[~2010-11-30 11:07 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-15 14:08 [PATCH] mlx4: properly mask MGM entry members count Eli Cohen
2010-11-16 9:38 ` Aleksey Senin
[not found] ` <AANLkTi=zJsFjbrZrpj-E65T49ewgqdia+MOPnqmgx5KW-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-16 18:03 ` Eli Cohen
2010-11-16 16:11 ` Roland Dreier
[not found] ` <ada62vxl046.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-11-16 18:07 ` Eli Cohen
2010-11-16 22:43 ` Roland Dreier
[not found] ` <ada1v6klwil.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-11-17 9:01 ` Eli Cohen
2010-11-17 17:38 ` Roland Dreier
[not found] ` <adasjyzkfyw.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-11-18 6:51 ` Eli Cohen
2010-11-25 7:13 ` Aleksey Senin
[not found] ` <AANLkTinN43YgQW3ftbng-4f2NiNe9_oXPVCX5LPzh7uG-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-25 8:36 ` Or Gerlitz
[not found] ` <4CEE200B.70106-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-11-25 8:56 ` Alekseys Senin
[not found] ` <1290675387.4050.51.camel-uOVkuFIEnOODI2cvxHXf6UEOCMrvLtNR@public.gmane.org>
2010-11-28 13:50 ` Aleksey Senin
[not found] ` <AANLkTikWrQRcA62bkM=1zWQuyH6nABSvqnbAeaAjfgcP-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-29 17:34 ` Roland Dreier
[not found] ` <adafwukf2yy.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-11-30 11:07 ` Aleksey Senin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox