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
6161 */
6262
6363 struct mlx5_ib_alloc_ucontext_req {
64− __u32 total_num_uuars;
65− __u32 num_low_latency_uuars;
64+ __u32 total_num_bfregs;
65+ __u32 num_low_latency_bfregs;
66+};
67+
68+enum mlx5_lib_caps {
69+ MLX5_LIB_CAP_4K_UAR = (u64)1 << 0,
6670 };
6771
6872 struct mlx5_ib_alloc_ucontext_req_v2 {
69− __u32 total_num_uuars;
70− __u32 num_low_latency_uuars;
73+ __u32 total_num_bfregs;
74+ __u32 num_low_latency_bfregs;
7175 __u32 flags;
7276 __u32 comp_mask;
7377 __u8 max_cqe_version;
7478 __u8 reserved0;
7579 __u16 reserved1;
7680 __u32 reserved2;
81+ __u64 lib_caps;
7782 };
7883
7984 enum mlx5_ib_alloc_ucontext_resp_mask {
@@ -88,7 +93,7 @@ enum mlx5_user_cmds_supp_uhw { · 8 unmodified lines
8893 struct mlx5_ib_alloc_ucontext_resp {
8994 __u32 qp_tab_size;
9095 __u32 bf_reg_size;
91− __u32 tot_uuars;
96+ __u32 tot_bfregs;
9297 __u32 cache_line_size;
9398 __u16 max_sq_desc_sz;
9499 __u16 max_rq_desc_sz;
@@ -103,6 +108,8 @@ struct mlx5_ib_alloc_ucontext_resp { · 8 unmodified lines
103108 __u8 cmds_supp_uhw;
104109 __u16 reserved2;
105110 __u64 hca_core_clock_offset;
111+ __u32 log_uar_size;
112+ __u32 num_uars_per_page;
106113 };
107114
108115 struct mlx5_ib_alloc_pd_resp {
@@ -241,7 +248,7 @@ struct mlx5_ib_create_qp_rss { · 132 unmodified lines
241248 };
242249
243250 struct mlx5_ib_create_qp_resp {
244− __u32 uuar_index;
251+ __u32 bfreg_index;
245252 };
246253
247254 struct 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