On 11/1/2013 10:46 PM, Bart Van Assche wrote:
On 31/10/2013 5:24, Sagi Grimberg wrote:
+ /* connect to MR tree */
+ write_lock_irq(&table->lock);
+ err = radix_tree_insert(&table->tree, mr->key & 0xffffff00, mr);
+ write_unlock_irq(&table->lock);
The conversion from MR key into radix tree index occurs three times so
maybe it's worth to introduce an (inline) helper function for this
conversion.
Another comment about this conversion: is the mlx5 driver supported on
32-bit platforms ? I think that 0xffffff00 should be changed into
0xffffff00u to avoid that a compiler warning is triggered on 32-bit
platforms.
Thanks,
Bart.
Thanks for the hint.
Although mlx5 currently doesn't support 32-bit platforms, I'll take your
suggestion.
Sagi.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html