Commit Graph

14 Commits

Author SHA1 Message Date
Maxim Levitsky c65cfd5bec RDMA/mana_ib: Set correct device into ib
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 1df03a4b44146c4f720d793915747272c7773a3e
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Thu Jul 11 06:37:57 2024 -0700

    RDMA/mana_ib: Set correct device into ib

    Add mana_get_primary_netdev_rcu helper to get a primary
    netdevice for a given port. When mana is used with
    netvsc, the VF netdev is controlled by an upper netvsc
    device. In a baremetal case, the VF netdev is the
    primary device.

    Use the mana_get_primary_netdev_rcu() helper in the mana_ib
    to get the correct device for querying network states.

    Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")
    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1720705077-322-1-git-send-email-kotaranov@linux.microsoft.com
    Reviewed-by: Long Li <longli@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 11:32:04 +03:00
Maxim Levitsky 3ba4167410 RDMA/mana_ib: Process QP error events in mana_ib
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 2a1251e3dbb2995100b6f351c2452228895386a5
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Fri Jun 7 03:08:17 2024 -0700

    RDMA/mana_ib: Process QP error events in mana_ib

    Process QP fatal events from the error event queue.
    For that, find the QP, using QPN from the event, and then call its
    event_handler. To find the QPs, store created RC QPs in an xarray.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1717754897-19858-1-git-send-email-kotaranov@linux.microsoft.com
    Reviewed-by: Wei Hu <weh@microsoft.com>
    Signed-off-by: Leon Romanovsky <leon@kernel.org>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-15 11:32:03 +03:00
Maxim Levitsky bcafbf20e9 RDMA/mana_ib: set node_guid
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 65357e2c164a08bf20849dd55f46aa71e00334fa
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Thu May 30 04:55:16 2024 -0700

    RDMA/mana_ib: set node_guid

    Use the mac address for the node_guid of the IB device.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1717070117-1234-2-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 11:32:03 +03:00
Maxim Levitsky 7fdd36ea29 RDMA/mana_ib: Fix missing ret value
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit f88320b698ad099a2f742adfb9f87177bfffe0c5
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Tue Apr 23 07:15:51 2024 -0700

    RDMA/mana_ib: Fix missing ret value

    Set ret to -ENODEV when netdev_master_upper_dev_get_rcu returns NULL.

    Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")
    Link: https://lore.kernel.org/r/1713881751-21621-1-git-send-email-kotaranov@linux.microsoft.com
    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-15 01:06:39 +03:00
Maxim Levitsky e7ccf6d3e0 RDMA/mana_ib: Configure mac address in RNIC
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 8859f009ace237ffc165c95edcc113d3824b9bf3
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Wed Apr 10 01:42:31 2024 -0700

    RDMA/mana_ib: Configure mac address in RNIC

    Set local mac address in RNIC, which is required by the HW.

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

Conflicts:
    include the etherdevice.h explicitly

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-08-15 01:06:04 +03:00
Maxim Levitsky 65f627d265 RDMA/mana_ib: Adding and deleting GIDs
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit faafb8b126ad6043663a77e6b234bca932f60694
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Wed Apr 10 01:42:30 2024 -0700

    RDMA/mana_ib: Adding and deleting GIDs

    Implement add_gid and del_gid for RNIC.
    IPv4 and IPv6 addresses are supported.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1712738551-22075-6-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-15 00:40:08 +03:00
Maxim Levitsky 14b7db4020 RDMA/mana_ib: Enable RoCE on port 1
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 8b184e4f1c328d9b37994f66224550befdefe49b
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Wed Apr 10 01:42:29 2024 -0700

    RDMA/mana_ib: Enable RoCE on port 1

    Set netdev and RoCEv2 flag to enable GID population on port 1.
    Use GIDs of the master netdev. As mc->ports[] stores slave devices,
    use a helper to get the master netdev.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1712738551-22075-5-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-15 00:40:08 +03:00
Maxim Levitsky 82f5c55cd3 RDMA/mana_ib: Implement port parameters
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 4bda1d5332ec1b00262ad53f6a4cfa88190a048d
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Wed Apr 10 01:42:28 2024 -0700

    RDMA/mana_ib: Implement port parameters

    Implement port parameters for RNIC:
    1) extend query_port() method
    2) implement get_link_layer()
    3) implement query_pkey()

    Only port 1 can store GIDs.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1712738551-22075-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-15 00:40:08 +03:00
Maxim Levitsky 4d2d230764 RDMA/mana_ib: Create and destroy rnic adapter
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 1a79c2b9d4a08788cf1554981f10d23fbad77d11
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Wed Apr 10 01:42:27 2024 -0700

    RDMA/mana_ib: Create and destroy rnic adapter

    Add functions for RNIC creation and destruction.
    If creation fails, the ib_probe fails as well.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1712738551-22075-3-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-15 00:40:08 +03:00
Maxim Levitsky b402d36f58 RDMA/mana_ib: Add EQ creation for rnic adapter
JIRA: https://issues.redhat.com/browse/RHEL-54330

commit 98b889c43935c43ad15783dbfb1e59b4ee7f4a56
Author: Konstantin Taranov <kotaranov@microsoft.com>
Date:   Wed Apr 10 01:42:26 2024 -0700

    RDMA/mana_ib: Add EQ creation for rnic adapter

    Create an error EQ for the RNIC adapter.

    Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
    Link: https://lore.kernel.org/r/1712738551-22075-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-15 00:40:08 +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 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
Maxim Levitsky 7b9f3e7e80 RDMA/mana_ib: register RDMA device with GDMA
JIRA: https://issues.redhat.com/browse/RHEL-23420

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

    RDMA/mana_ib: register RDMA device with GDMA

    Software client needs to register with the RDMA management interface on
    the SoC to access more features, including querying device capabilities
    and RC queue pair.

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

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2024-01-30 20:38:24 -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