diff options
author | Eli Cohen <eli@dev.mellanox.co.il> | 2014-01-30 13:49:48 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-02-06 23:00:48 -0800 |
commit | 78c0f98cc9dd46824fa66f35f14ea24ba733d145 (patch) | |
tree | 16954ba1b3c48438748dcb954c01695eb3902005 /include/linux/mlx5 | |
parent | 9e65dc371b5c8d7476c81353137efc13cc1bdabd (diff) | |
download | linux-78c0f98cc9dd46824fa66f35f14ea24ba733d145.tar.gz |
IB/mlx5: Fix binary compatibility with libmlx5
Commit c1be5232d21d ("Fix micro UAR allocator") broke binary compatibility
between libmlx5 and mlx5_ib since it defines a different value to the number
of micro UARs per page, leading to wrong calculation in libmlx5. This patch
defines struct mlx5_ib_alloc_ucontext_req_v2 as an extension to struct
mlx5_ib_alloc_ucontext_req. The extended size is determined in mlx5_ib_alloc_ucontext()
and in case of old library we use uuarn 0 which works fine -- this is
acheived due to create_user_qp() falling back from high to medium then to
low class where low class will return 0. For new libraries we use the
more sophisticated allocation algorithm.
Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/linux/mlx5')
-rw-r--r-- | include/linux/mlx5/driver.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 554548cd3dd4..32cb18c399c2 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -227,6 +227,7 @@ struct mlx5_uuar_info { * protect uuar allocation data structs */ struct mutex lock; + u32 ver; }; struct mlx5_bf { |