History

Merge tag 'mlx5-4kuar-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux

Saeed Mahameed says: ==================== mlx5 4K UAR The following series of patches optimizes the usage of the UAR area which is contained within the BAR 0-1. Previous versions of the firmware and the driver assumed each system page contains a single UAR. This patch set will query the firmware for a new capability that if published, means that the firmware can support UARs of fixed 4K regardless of system page size. In the case of powerpc, where page size equals 64KB, this means we can utilize 16 UARs per system page. Since user space processes by default consume eight UARs per context this means that with this change a process will need a single system page to fulfill that requirement and in fact make use of more UARs which is better in terms of performance. In addition to optimizing user-space processes, we introduce an allocator that can be used by kernel consumers to allocate blue flame registers (which are areas within a UAR that are used to write doorbells). This provides further optimization on using the UAR area since the Ethernet driver makes use of a single blue flame register per system page and now it will use two blue flame registers per 4K. The series also makes changes to naming conventions and now the terms used in the driver code match the terms used in the PRM (programmers reference manual). Thus, what used to be called UUAR (micro UAR) is now called BFREG (blue flame register). In order to support compatibility between different versions of library/driver/firmware, the library has now means to notify the kernel driver that it supports the new scheme and the kernel can notify the library if it supports this extension. So mixed versions of libraries can run concurrently without any issues. ====================

David S. Miller committed 9 years ago

Commit bda65b42 parents b369e7f f502d8317 files · +672 −516Browse files

Showing the changes to include/uapi (1 of 17 files). Show all

Unified · Split

include/uapi/rdma/mlx5-abi.h+13−6
@@ -61,19 +61,24 @@ enum { · 60 unmodified lines
61 */61 */
62 62
63struct mlx5_ib_alloc_ucontext_req {63struct mlx5_ib_alloc_ucontext_req {
64 __u32 total_num_uuars;64 __u32 total_num_bfregs;
65 __u32 num_low_latency_uuars;65 __u32 num_low_latency_bfregs;
66};
67
68enum mlx5_lib_caps {
69 MLX5_LIB_CAP_4K_UAR = (u64)1 << 0,
66};70};
67 71
68struct mlx5_ib_alloc_ucontext_req_v2 {72struct mlx5_ib_alloc_ucontext_req_v2 {
69 __u32 total_num_uuars;73 __u32 total_num_bfregs;
70 __u32 num_low_latency_uuars;74 __u32 num_low_latency_bfregs;
71 __u32 flags;75 __u32 flags;
72 __u32 comp_mask;76 __u32 comp_mask;
73 __u8 max_cqe_version;77 __u8 max_cqe_version;
74 __u8 reserved0;78 __u8 reserved0;
75 __u16 reserved1;79 __u16 reserved1;
76 __u32 reserved2;80 __u32 reserved2;
81 __u64 lib_caps;
77};82};
78 83
79enum mlx5_ib_alloc_ucontext_resp_mask {84enum mlx5_ib_alloc_ucontext_resp_mask {
@@ -88,7 +93,7 @@ enum mlx5_user_cmds_supp_uhw { · 8 unmodified lines
88struct mlx5_ib_alloc_ucontext_resp {93struct mlx5_ib_alloc_ucontext_resp {
89 __u32 qp_tab_size;94 __u32 qp_tab_size;
90 __u32 bf_reg_size;95 __u32 bf_reg_size;
91 __u32 tot_uuars;96 __u32 tot_bfregs;
92 __u32 cache_line_size;97 __u32 cache_line_size;
93 __u16 max_sq_desc_sz;98 __u16 max_sq_desc_sz;
94 __u16 max_rq_desc_sz;99 __u16 max_rq_desc_sz;
@@ -103,6 +108,8 @@ struct mlx5_ib_alloc_ucontext_resp { · 8 unmodified lines
103 __u8 cmds_supp_uhw;108 __u8 cmds_supp_uhw;
104 __u16 reserved2;109 __u16 reserved2;
105 __u64 hca_core_clock_offset;110 __u64 hca_core_clock_offset;
111 __u32 log_uar_size;
112 __u32 num_uars_per_page;
106};113};
107 114
108struct mlx5_ib_alloc_pd_resp {115struct mlx5_ib_alloc_pd_resp {
@@ -241,7 +248,7 @@ struct mlx5_ib_create_qp_rss { · 132 unmodified lines
241};248};
242 249
243struct mlx5_ib_create_qp_resp {250struct mlx5_ib_create_qp_resp {
244 __u32 uuar_index;251 __u32 bfreg_index;
245};252};
246 253
247struct mlx5_ib_alloc_mw {254struct mlx5_ib_alloc_mw {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t