Commit Graph

12 Commits

Author SHA1 Message Date
Kamal Heib 60620ca443 RDMA: Pass entire uverbs attr bundle to create cq function
JIRA: https://issues.redhat.com/browse/RHEL-56247
Conflicts:
Drop hunks for none existing drivers.

commit dd6d7f8574d7f8b6a0bf1aeef0b285d2706b8c2a
Author: Akiva Goldberger <agoldberger@nvidia.com>
Date:   Thu Jun 27 21:23:49 2024 +0300

    RDMA: Pass entire uverbs attr bundle to create cq function

    Changes the create_cq verb signature by sending the entire uverbs attr
    bundle as a parameter. This allows drivers to send driver specific attrs
    through ioctl for the create_cq verb and access them in their driver
    specific code.

    Also adds a new enum value for driver specific ioctl attributes for
    methods already supporting UHW.

    Link: https://lore.kernel.org/r/ed147343987c0d43fd391c1b2f85e2f425747387.1719512393.git.leon@kernel.org
    Signed-off-by: Akiva Goldberger <agoldberger@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Signed-off-by: Kamal Heib <kheib@redhat.com>
2024-10-07 11:55:54 -04:00
Maxim Levitsky 5ba19ee82c RDMA/mana_ib: implement uapi for creation of rnic cq
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 44b607ad4cdf23ae8f796b95bd14709fa06f7728
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Fri Apr 26 06:12:40 2024 -0700

    RDMA/mana_ib: implement uapi for creation of rnic cq

    Enable users to create RNIC CQs using a corresponding flag.
    With the previous request size, an ethernet CQ is created.
    As a response, return ID of the created CQ.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1714137160-5222-6-git-send-email-kotaranov@linux.microsoft.com
    Reviewed-by: Long Li <longli@microsoft.com>
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-15 01:08:09 +03:00
Maxim Levitsky 6501addc59 RDMA/mana_ib: boundary check before installing cq callbacks
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit f79edef79b6a2161f4124112f9b0c46891bb0b74
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Fri Apr 26 06:12:39 2024 -0700

    RDMA/mana_ib: boundary check before installing cq callbacks

    Add a boundary check inside mana_ib_install_cq_cb to prevent index overflow.

    Fixes: 2a31c5a7e0d8 ("RDMA/mana_ib: Introduce mana_ib_install_cq_cb helper function")
    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1714137160-5222-5-git-send-email-kotaranov@linux.microsoft.com
    Reviewed-by: Long Li <longli@microsoft.com>
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-15 01:06:40 +03:00
Maxim Levitsky adbb1c3d0f RDMA/mana_ib: introduce a helper to remove cq callbacks
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 3e41105263d5d74840c0d117278894b428f02841
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Fri Apr 26 06:12:38 2024 -0700

    RDMA/mana_ib: introduce a helper to remove cq callbacks

    Intoduce the mana_ib_remove_cq_cb helper to remove cq callbacks.
    The helper removes code duplicates.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1714137160-5222-4-git-send-email-kotaranov@linux.microsoft.com
    Reviewed-by: Long Li <longli@microsoft.com>
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-15 01:06:39 +03:00
Maxim Levitsky 5e5abb1d01 RDMA/mana_ib: Use num_comp_vectors of ib_device
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 23f59f4e837bba9db8d25ae85b8455d53b23665b
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Fri Apr 12 01:47:36 2024 -0700

    RDMA/mana_ib: Use num_comp_vectors of ib_device

    Use num_comp_vectors of struct ib_device instead of max_num_queues
    from gdma_context.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1712911656-17352-1-git-send-email-kotaranov@linux.microsoft.com
    Reviewed-by: Long Li <longli@microsoft.com>
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-15 00:40:07 +03:00
Maxim Levitsky 4a250e0ffc RDMA/mana_ib: Use struct mana_ib_queue for CQs
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 60a7ac0b8bec5df9764b7460ffee91fc981e8a31
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Tue Mar 26 13:08:06 2024 -0700

    RDMA/mana_ib: Use struct mana_ib_queue for CQs

    Use struct mana_ib_queue and its helpers for CQs

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1711483688-24358-3-git-send-email-kotaranov@linux.microsoft.com
    Reviewed-by: Long Li <longli@microsoft.com>
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-15 00:40:06 +03:00
Maxim Levitsky 6e0dc975a5 RDMA/mana_ib: Use virtual address in dma regions for MRs
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 2d5c00815778ec4f4e0a84e405e3e157b7815db1
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Mon Mar 4 05:52:41 2024 -0800

    RDMA/mana_ib: Use virtual address in dma regions for MRs

    Introduce mana_ib_create_dma_region() to create dma regions with iova
    for MRs. It allows creating MRs with any page offset. Previously,
    only page-aligned addresses worked.

    For dma regions that must have a zero dma offset (e.g., for queues),
    mana_ib_create_zero_offset_dma_region() is added.
    To get the zero offset, ib_umem_find_best_pgoff() is used with zero
    pgoff_bitmask.

    Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1709560361-26393-3-git-send-email-kotaranov@linux.microsoft.com
    Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-15 00:40:06 +03:00
Maxim Levitsky 90fd9f0d9b RDMA/mana_ib: Introduce mana_ib_install_cq_cb helper function
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 2a31c5a7e0d87959a03e846523013c75f4395a91
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Mon Jan 22 15:23:01 2024 -0800

    RDMA/mana_ib: Introduce mana_ib_install_cq_cb helper function

    Use a helper function to install callbacks to CQs.
    This patch removes code repetition.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1705965781-3235-4-git-send-email-kotaranov@linux.microsoft.com
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-14 21:04:39 +03:00
Maxim Levitsky aedb3e6895 RDMA/mana_ib: Introduce mdev_to_gc helper function
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 71c8cbfcdc8f1dc651b976d4c12dc9b9fce675c1
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Mon Jan 22 15:22:59 2024 -0800

    RDMA/mana_ib: Introduce mdev_to_gc helper function

    Use a helper function to access gdma_context from mana_ib_dev.
    This patch removes code repetitions as well as removes the need
    to explicitly use gdma_dev, which was error-prone.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1705965781-3235-2-git-send-email-kotaranov@linux.microsoft.com
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-14 21:04:28 +03:00
Maxim Levitsky 8d4d5d2000 RDMA/mana_ib: Add CQ interrupt support for RAW QP
JIRA: https://issues.redhat.com/browse/RHEL-23420

commit c15d7802a42402a87880a17eee89ff023e49ecc0
Author: Long Li <longli@microsoft.com>
Date:   Fri Dec 15 18:04:15 2023 -0800

    RDMA/mana_ib: Add CQ interrupt support for RAW QP

    At probing time, the MANA core code allocates EQs for supporting interrupts
    on Ethernet queues. The same interrupt mechanisum is used by RAW QP.

    Use the same EQs for delivering interrupts on the CQ for the RAW QP.

    Signed-off-by: Long Li <longli@microsoft.com>
    Link: https://lore.kernel.org/r/1702692255-23640-4-git-send-email-longli@linuxonhyperv.com
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-01-31 18:38:08 -05:00
Maxim Levitsky bd3e849591 RDMA/mana_ib: query device capabilities
JIRA: https://issues.redhat.com/browse/RHEL-23420

commit 2c20e20b22d9fc64072e3445ae3ca244cbd523a2
Author: Long Li <longli@microsoft.com>
Date:   Fri Dec 15 18:04:14 2023 -0800

    RDMA/mana_ib: query device capabilities

    With RDMA device registered, use it to query on hardware capabilities and
    cache this information for future query requests to the driver.

    Signed-off-by: Long Li <longli@microsoft.com>
    Link: https://lore.kernel.org/r/1702692255-23640-3-git-send-email-longli@linuxonhyperv.com
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-01-31 18:38:02 -05:00
Kamal Heib cba7f40b30 RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter
Bugzilla: https://bugzilla.redhat.com/2189296
Conflicts:
- ib_user_ioctl_verbs.h: Context diff due to the missing of erdma,
  Added reservations to keep UAPI compatible with upstream.
- MAINTAINERS: Context diff due to the unupdated file.

commit 0266a177631d4c6b963b5b12dd986a8c5abdbf06
Author: Long Li <longli@microsoft.com>
Date:   Thu Nov 3 12:16:30 2022 -0700

    RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter

    Add a RDMA VF driver for Microsoft Azure Network Adapter (MANA).

    Co-developed-by: Ajay Sharma <sharmaajay@microsoft.com>
    Signed-off-by: Ajay Sharma <sharmaajay@microsoft.com>
    Reviewed-by: Dexuan Cui <decui@microsoft.com>
    Signed-off-by: Long Li <longli@microsoft.com>
    Link: https://lore.kernel.org/r/1667502990-2559-13-git-send-email-longli@linuxonhyperv.com
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Kamal Heib <kheib@redhat.com>
2023-05-08 08:20:25 -04:00