[ofa-general] Re: [PATCH] mlx4: Fix the value of the pkey_index in the completion
Roland Dreier
rdreier at cisco.com
Mon Jan 7 14:11:28 PST 2008
> Without this fix, incoming GSI packets on port 2 gets invalid pkey index in the completion,
> which prevent from the mad layer to send back a response.
Does this explain the problems that someone saw when using all port 2
of a connectx setup?
Why does it only affect port 2?
> - wc->pkey_index = be32_to_cpu(cqe->immed_rss_invalid) >> 16;
> + wc->pkey_index = (u16)(be32_to_cpu(cqe->immed_rss_invalid) & 0x7f);
It seems the (u16) cast here is doubly useless, since wc->pkey_index
is already u16, and we're masking with 0x7f anyway.
By the way, will it always work to mask with 0x7f? Or is it possible
that the P_Key table might have more than 128 entries?
- R.
More information about the general
mailing list