]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net/mlx5: Support new MR features
authorArtemy Kovalyov <artemyko@mellanox.com>
Mon, 2 Jan 2017 09:37:41 +0000 (11:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Jan 2017 20:51:20 +0000 (15:51 -0500)
This patch adds the following items to IFC file.

1. MLX5_MKC_ACCESS_MODE_KSM enum value for creating KSM memory keys.
KSM access mode used when indirect MKey associated with fixed memory
size entries.

2. null_mkey field that is used to indicate non-present KLM/KSM
entries, where it causes the device to generate page fault event
when trying to access it.

3. struct mlx5_ifc_cmd_hca_cap_bits capability bits indicating
related value/field is supported:
* fixed_buffer_size - MLX5_MKC_ACCESS_MODE_KSM
* umr_extended_translation_offset - translation_offset_42_16
    in UMR ctrl segment
* null_mkey - null_mkey in QUERY_SPECIAL_CONTEXTS

Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/mlx5/mlx5_ifc.h

index 4792c856531e062d7651969e6d25e6f5ad4cee0c..7c760e580268ad8ddc21270c60284933ada49b6e 100644 (file)
@@ -782,11 +782,12 @@ struct mlx5_ifc_cmd_hca_cap_bits {
        u8         log_max_eq[0x4];
 
        u8         max_indirection[0x8];
-       u8         reserved_at_108[0x1];
+       u8         fixed_buffer_size[0x1];
        u8         log_max_mrw_sz[0x7];
        u8         reserved_at_110[0x2];
        u8         log_max_bsf_list_size[0x6];
-       u8         reserved_at_118[0x2];
+       u8         umr_extended_translation_offset[0x1];
+       u8         null_mkey[0x1];
        u8         log_max_klm_list_size[0x6];
 
        u8         reserved_at_120[0xa];
@@ -2569,6 +2570,7 @@ enum {
        MLX5_MKC_ACCESS_MODE_PA    = 0x0,
        MLX5_MKC_ACCESS_MODE_MTT   = 0x1,
        MLX5_MKC_ACCESS_MODE_KLMS  = 0x2,
+       MLX5_MKC_ACCESS_MODE_KSM   = 0x3,
 };
 
 struct mlx5_ifc_mkc_bits {
@@ -3677,6 +3679,10 @@ struct mlx5_ifc_query_special_contexts_out_bits {
        u8         dump_fill_mkey[0x20];
 
        u8         resd_lkey[0x20];
+
+       u8         null_mkey[0x20];
+
+       u8         reserved_at_a0[0x60];
 };
 
 struct mlx5_ifc_query_special_contexts_in_bits {