Re: [PATCH for-next v4] RDMA/efa: Add EFA query MR support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 04, 2024 at 09:51:55AM +0000, Michael Margolin wrote:
> Add EFA driver uapi definitions and register a new query MR method that
> currently returns the physical interconnects the device is using to
> reach the MR. Update admin definitions and efa-abi accordingly.
> 
> Reviewed-by: Anas Mousa <anasmous@xxxxxxxxxx>
> Reviewed-by: Firas Jahjah <firasj@xxxxxxxxxx>
> Signed-off-by: Michael Margolin <mrgolin@xxxxxxxxxx>
> ---
>  drivers/infiniband/hw/efa/efa.h               | 12 +++-
>  .../infiniband/hw/efa/efa_admin_cmds_defs.h   | 33 ++++++++-
>  drivers/infiniband/hw/efa/efa_com_cmd.c       | 11 ++-
>  drivers/infiniband/hw/efa/efa_com_cmd.h       | 12 +++-
>  drivers/infiniband/hw/efa/efa_main.c          |  7 +-
>  drivers/infiniband/hw/efa/efa_verbs.c         | 71 ++++++++++++++++++-
>  include/uapi/rdma/efa-abi.h                   | 21 +++++-
>  7 files changed, 160 insertions(+), 7 deletions(-)

It is already fourth version of this patch and not a single word about
the changes. Please add changelog in your next submissions.

Applied this patch with the following change.

diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index 8f4435706e4d..2f412db2edcd 100644
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -1748,7 +1748,7 @@ static int UVERBS_HANDLER(EFA_IB_METHOD_MR_QUERY)(struct uverbs_attr_bundle *att
 {
        struct ib_mr *ibmr = uverbs_attr_get_obj(attrs, EFA_IB_ATTR_QUERY_MR_HANDLE);
        struct efa_mr *mr = to_emr(ibmr);
-       u16 ic_id_validity;
+       u16 ic_id_validity = 0;
        int ret;

        ret = uverbs_copy_to(attrs, EFA_IB_ATTR_QUERY_MR_RESP_RECV_IC_ID,
@@ -1766,12 +1766,12 @@ static int UVERBS_HANDLER(EFA_IB_METHOD_MR_QUERY)(struct uverbs_attr_bundle *att
        if (ret)
                return ret;

-       ic_id_validity = (mr->ic_info.recv_ic_id_valid ?
-                         EFA_QUERY_MR_VALIDITY_RECV_IC_ID : 0) |
-                        (mr->ic_info.rdma_read_ic_id_valid ?
-                         EFA_QUERY_MR_VALIDITY_RDMA_READ_IC_ID : 0) |
-                        (mr->ic_info.rdma_recv_ic_id_valid ?
-                         EFA_QUERY_MR_VALIDITY_RDMA_RECV_IC_ID : 0);
+       if (mr->ic_info.recv_ic_id_valid)
+               ic_id_validity |= EFA_QUERY_MR_VALIDITY_RECV_IC_ID;
+       if (mr->ic_info.rdma_read_ic_id_valid)
+               ic_id_validity |= EFA_QUERY_MR_VALIDITY_RDMA_READ_IC_ID;
+       if (mr->ic_info.rdma_recv_ic_id_valid)
+               ic_id_validity |= EFA_QUERY_MR_VALIDITY_RDMA_RECV_IC_ID;

        return uverbs_copy_to(attrs, EFA_IB_ATTR_QUERY_MR_RESP_IC_ID_VALIDITY,
                              &ic_id_validity, sizeof(ic_id_validity));




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux