[PATCH v6 00/14] Introduce AMD Pensando RDMA driver

Abhijit Gangurde posted 14 patches 1 month ago
.../device_drivers/ethernet/index.rst         |    1 +
.../ethernet/pensando/ionic.rst               |   10 +
.../ethernet/pensando/ionic_rdma.rst          |   52 +
MAINTAINERS                                   |    9 +
drivers/infiniband/Kconfig                    |    1 +
drivers/infiniband/hw/Makefile                |    1 +
drivers/infiniband/hw/ionic/Kconfig           |   15 +
drivers/infiniband/hw/ionic/Makefile          |    9 +
drivers/infiniband/hw/ionic/ionic_admin.c     | 1228 ++++++++
.../infiniband/hw/ionic/ionic_controlpath.c   | 2679 +++++++++++++++++
drivers/infiniband/hw/ionic/ionic_datapath.c  | 1399 +++++++++
drivers/infiniband/hw/ionic/ionic_fw.h        | 1029 +++++++
drivers/infiniband/hw/ionic/ionic_hw_stats.c  |  484 +++
drivers/infiniband/hw/ionic/ionic_ibdev.c     |  440 +++
drivers/infiniband/hw/ionic/ionic_ibdev.h     |  517 ++++
drivers/infiniband/hw/ionic/ionic_lif_cfg.c   |  111 +
drivers/infiniband/hw/ionic/ionic_lif_cfg.h   |   66 +
drivers/infiniband/hw/ionic/ionic_pgtbl.c     |  143 +
drivers/infiniband/hw/ionic/ionic_queue.c     |   52 +
drivers/infiniband/hw/ionic/ionic_queue.h     |  234 ++
drivers/infiniband/hw/ionic/ionic_res.h       |  154 +
drivers/net/ethernet/pensando/Kconfig         |    1 +
drivers/net/ethernet/pensando/ionic/Makefile  |    2 +-
drivers/net/ethernet/pensando/ionic/ionic.h   |    7 -
.../net/ethernet/pensando/ionic/ionic_api.h   |  131 +
.../net/ethernet/pensando/ionic/ionic_aux.c   |  102 +
.../net/ethernet/pensando/ionic/ionic_aux.h   |   10 +
.../ethernet/pensando/ionic/ionic_bus_pci.c   |    7 +
.../net/ethernet/pensando/ionic/ionic_dev.c   |  270 +-
.../net/ethernet/pensando/ionic/ionic_dev.h   |   28 +-
.../net/ethernet/pensando/ionic/ionic_if.h    |  118 +-
.../net/ethernet/pensando/ionic/ionic_lif.c   |   47 +-
.../net/ethernet/pensando/ionic/ionic_lif.h   |    3 +
.../net/ethernet/pensando/ionic/ionic_main.c  |    4 +-
include/uapi/rdma/ib_user_ioctl_verbs.h       |    1 +
include/uapi/rdma/ionic-abi.h                 |  115 +
36 files changed, 9416 insertions(+), 64 deletions(-)
create mode 100644 Documentation/networking/device_drivers/ethernet/pensando/ionic_rdma.rst
create mode 100644 drivers/infiniband/hw/ionic/Kconfig
create mode 100644 drivers/infiniband/hw/ionic/Makefile
create mode 100644 drivers/infiniband/hw/ionic/ionic_admin.c
create mode 100644 drivers/infiniband/hw/ionic/ionic_controlpath.c
create mode 100644 drivers/infiniband/hw/ionic/ionic_datapath.c
create mode 100644 drivers/infiniband/hw/ionic/ionic_fw.h
create mode 100644 drivers/infiniband/hw/ionic/ionic_hw_stats.c
create mode 100644 drivers/infiniband/hw/ionic/ionic_ibdev.c
create mode 100644 drivers/infiniband/hw/ionic/ionic_ibdev.h
create mode 100644 drivers/infiniband/hw/ionic/ionic_lif_cfg.c
create mode 100644 drivers/infiniband/hw/ionic/ionic_lif_cfg.h
create mode 100644 drivers/infiniband/hw/ionic/ionic_pgtbl.c
create mode 100644 drivers/infiniband/hw/ionic/ionic_queue.c
create mode 100644 drivers/infiniband/hw/ionic/ionic_queue.h
create mode 100644 drivers/infiniband/hw/ionic/ionic_res.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_api.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_aux.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_aux.h
create mode 100644 include/uapi/rdma/ionic-abi.h
[PATCH v6 00/14] Introduce AMD Pensando RDMA driver
Posted by Abhijit Gangurde 1 month ago
This patchset introduces an RDMA driver for the AMD Pensando adapter.
An AMD Pensando Ethernet device with RDMA capabilities extends its
functionality through an auxiliary device.

The first 6 patches of the series modify the ionic Ethernet driver
to support the RDMA driver. The ionic RDMA driver implementation is
split into the remaining 8 patches.

The user-mode of the driver is being reviewed at:
https://github.com/linux-rdma/rdma-core/pull/1620

v5->v6
  - Updated documentation
  - Removed unused ib op
v4->v5
  - Updated documentation
  - Fixed error path in aux device creation
v3->v4
  - Used xa lock instead of rcu lock for qp and cq access
  - Removed empty labels
  - Improved comments
  - Removed unwanted warning and error prints.
v2->v3
  - Used IDA for resource id allocation
  - Fixed lockdep warning
  - Removed rw locks around xarrays
  - Used rdma_user_mmap_* APIs for mappings
  - Removed uverbs_cmd_mask
  - Registered main ib ops at once
  - Fixed sparse checks
  - Fixed make htmldocs error
v1->v2
  - Removed netdev references from ionic RDMA driver
  - Moved to ionic_lif* instead of void* to convey information between
    aux devices and drivers

Abhijit Gangurde (14):
  net: ionic: Create an auxiliary device for rdma driver
  net: ionic: Update LIF identity with additional RDMA capabilities
  net: ionic: Export the APIs from net driver to support device commands
  net: ionic: Provide RDMA reset support for the RDMA driver
  net: ionic: Provide interrupt allocation support for the RDMA driver
  net: ionic: Provide doorbell and CMB region information
  RDMA: Add IONIC to rdma_driver_id definition
  RDMA/ionic: Register auxiliary module for ionic ethernet adapter
  RDMA/ionic: Create device queues to support admin operations
  RDMA/ionic: Register device ops for control path
  RDMA/ionic: Register device ops for datapath
  RDMA/ionic: Register device ops for miscellaneous functionality
  RDMA/ionic: Implement device stats ops
  RDMA/ionic: Add Makefile/Kconfig to kernel build environment

 .../device_drivers/ethernet/index.rst         |    1 +
 .../ethernet/pensando/ionic.rst               |   10 +
 .../ethernet/pensando/ionic_rdma.rst          |   52 +
 MAINTAINERS                                   |    9 +
 drivers/infiniband/Kconfig                    |    1 +
 drivers/infiniband/hw/Makefile                |    1 +
 drivers/infiniband/hw/ionic/Kconfig           |   15 +
 drivers/infiniband/hw/ionic/Makefile          |    9 +
 drivers/infiniband/hw/ionic/ionic_admin.c     | 1228 ++++++++
 .../infiniband/hw/ionic/ionic_controlpath.c   | 2679 +++++++++++++++++
 drivers/infiniband/hw/ionic/ionic_datapath.c  | 1399 +++++++++
 drivers/infiniband/hw/ionic/ionic_fw.h        | 1029 +++++++
 drivers/infiniband/hw/ionic/ionic_hw_stats.c  |  484 +++
 drivers/infiniband/hw/ionic/ionic_ibdev.c     |  440 +++
 drivers/infiniband/hw/ionic/ionic_ibdev.h     |  517 ++++
 drivers/infiniband/hw/ionic/ionic_lif_cfg.c   |  111 +
 drivers/infiniband/hw/ionic/ionic_lif_cfg.h   |   66 +
 drivers/infiniband/hw/ionic/ionic_pgtbl.c     |  143 +
 drivers/infiniband/hw/ionic/ionic_queue.c     |   52 +
 drivers/infiniband/hw/ionic/ionic_queue.h     |  234 ++
 drivers/infiniband/hw/ionic/ionic_res.h       |  154 +
 drivers/net/ethernet/pensando/Kconfig         |    1 +
 drivers/net/ethernet/pensando/ionic/Makefile  |    2 +-
 drivers/net/ethernet/pensando/ionic/ionic.h   |    7 -
 .../net/ethernet/pensando/ionic/ionic_api.h   |  131 +
 .../net/ethernet/pensando/ionic/ionic_aux.c   |  102 +
 .../net/ethernet/pensando/ionic/ionic_aux.h   |   10 +
 .../ethernet/pensando/ionic/ionic_bus_pci.c   |    7 +
 .../net/ethernet/pensando/ionic/ionic_dev.c   |  270 +-
 .../net/ethernet/pensando/ionic/ionic_dev.h   |   28 +-
 .../net/ethernet/pensando/ionic/ionic_if.h    |  118 +-
 .../net/ethernet/pensando/ionic/ionic_lif.c   |   47 +-
 .../net/ethernet/pensando/ionic/ionic_lif.h   |    3 +
 .../net/ethernet/pensando/ionic/ionic_main.c  |    4 +-
 include/uapi/rdma/ib_user_ioctl_verbs.h       |    1 +
 include/uapi/rdma/ionic-abi.h                 |  115 +
 36 files changed, 9416 insertions(+), 64 deletions(-)
 create mode 100644 Documentation/networking/device_drivers/ethernet/pensando/ionic_rdma.rst
 create mode 100644 drivers/infiniband/hw/ionic/Kconfig
 create mode 100644 drivers/infiniband/hw/ionic/Makefile
 create mode 100644 drivers/infiniband/hw/ionic/ionic_admin.c
 create mode 100644 drivers/infiniband/hw/ionic/ionic_controlpath.c
 create mode 100644 drivers/infiniband/hw/ionic/ionic_datapath.c
 create mode 100644 drivers/infiniband/hw/ionic/ionic_fw.h
 create mode 100644 drivers/infiniband/hw/ionic/ionic_hw_stats.c
 create mode 100644 drivers/infiniband/hw/ionic/ionic_ibdev.c
 create mode 100644 drivers/infiniband/hw/ionic/ionic_ibdev.h
 create mode 100644 drivers/infiniband/hw/ionic/ionic_lif_cfg.c
 create mode 100644 drivers/infiniband/hw/ionic/ionic_lif_cfg.h
 create mode 100644 drivers/infiniband/hw/ionic/ionic_pgtbl.c
 create mode 100644 drivers/infiniband/hw/ionic/ionic_queue.c
 create mode 100644 drivers/infiniband/hw/ionic/ionic_queue.h
 create mode 100644 drivers/infiniband/hw/ionic/ionic_res.h
 create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_api.h
 create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_aux.c
 create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_aux.h
 create mode 100644 include/uapi/rdma/ionic-abi.h


base-commit: 2aa35b24ad12fb960d30e9e282f768e1a0af9291
-- 
2.43.0
Re: [PATCH v6 00/14] Introduce AMD Pensando RDMA driver
Posted by Leon Romanovsky 2 weeks ago
On Wed, Sep 03, 2025 at 11:45:52AM +0530, Abhijit Gangurde wrote:
> This patchset introduces an RDMA driver for the AMD Pensando adapter.
> An AMD Pensando Ethernet device with RDMA capabilities extends its
> functionality through an auxiliary device.
> 
> The first 6 patches of the series modify the ionic Ethernet driver
> to support the RDMA driver. The ionic RDMA driver implementation is
> split into the remaining 8 patches.
> 
> The user-mode of the driver is being reviewed at:
> https://github.com/linux-rdma/rdma-core/pull/1620

<...>

> Abhijit Gangurde (14):
>   net: ionic: Create an auxiliary device for rdma driver
>   net: ionic: Update LIF identity with additional RDMA capabilities
>   net: ionic: Export the APIs from net driver to support device commands
>   net: ionic: Provide RDMA reset support for the RDMA driver
>   net: ionic: Provide interrupt allocation support for the RDMA driver
>   net: ionic: Provide doorbell and CMB region information
>   RDMA: Add IONIC to rdma_driver_id definition
>   RDMA/ionic: Register auxiliary module for ionic ethernet adapter
>   RDMA/ionic: Create device queues to support admin operations
>   RDMA/ionic: Register device ops for control path
>   RDMA/ionic: Register device ops for datapath
>   RDMA/ionic: Register device ops for miscellaneous functionality
>   RDMA/ionic: Implement device stats ops
>   RDMA/ionic: Add Makefile/Kconfig to kernel build environment

This series generates CI warnings:
1. In my local CI

➜  kernel git:(rdma-next) yo ci
e81ec02df1e47 (HEAD -> rdma-next) RDMA: Use %pe format specifier for error pointers
In file included from ./include/linux/string.h:382,
                 from ./include/linux/bitmap.h:13,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/paravirt.h:21,
                 from ./arch/x86/include/asm/cpuid/api.h:57,
                 from ./arch/x86/include/asm/processor.h:19,
                 from ./arch/x86/include/asm/timex.h:5,
                 from ./include/linux/timex.h:67,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from drivers/infiniband/hw/ionic/ionic_controlpath.c:4:
In function ‘fortify_memcpy_chk’,
    inlined from ‘ionic_set_ah_attr.isra’ at drivers/infiniband/hw/ionic/ionic_controlpath.c:609:3:
./include/linux/fortify-string.h:580:25: error: call to ‘__read_overflow2_field’ declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror=attribute-warning]
  580 |                         __read_overflow2_field(q_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:287: drivers/infiniband/hw/ionic/ionic_controlpath.o] Error 1
make[5]: *** [scripts/Makefile.build:556: drivers/infiniband/hw/ionic] Error 2
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [scripts/Makefile.build:556: drivers/infiniband/hw] Error 2
make[3]: *** [scripts/Makefile.build:556: drivers/infiniband] Error 2
make[2]: *** [scripts/Makefile.build:556: drivers] Error 2
make[1]: *** [/tmp/tmp53nb1nwr/Makefile:2011: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2

2. From kbuild

Unverified Error/Warning (likely false positive, kindly check if interested):

    ERROR: modpost: "__xchg_called_with_bad_pointer" [drivers/infiniband/hw/ionic/ionic_rdma.ko] undefined!

Error/Warning ids grouped by kconfigs:

recent_errors
`-- sparc-allmodconfig
    `-- ERROR:__xchg_called_with_bad_pointer-drivers-infiniband-hw-ionic-ionic_rdma.ko-undefined

Re: [PATCH v6 00/14] Introduce AMD Pensando RDMA driver
Posted by Leon Romanovsky 3 weeks, 2 days ago
On Wed, 03 Sep 2025 11:45:52 +0530, Abhijit Gangurde wrote:
> This patchset introduces an RDMA driver for the AMD Pensando adapter.
> An AMD Pensando Ethernet device with RDMA capabilities extends its
> functionality through an auxiliary device.
> 
> The first 6 patches of the series modify the ionic Ethernet driver
> to support the RDMA driver. The ionic RDMA driver implementation is
> split into the remaining 8 patches.
> 
> [...]

Applied, thanks!

[01/14] net: ionic: Create an auxiliary device for rdma driver
        https://git.kernel.org/rdma/rdma/c/82677c31466120
[02/14] net: ionic: Update LIF identity with additional RDMA capabilities
        https://git.kernel.org/rdma/rdma/c/a61164443aa1d4
[03/14] net: ionic: Export the APIs from net driver to support device commands
        https://git.kernel.org/rdma/rdma/c/9aabab47b73fa8
[04/14] net: ionic: Provide RDMA reset support for the RDMA driver
        https://git.kernel.org/rdma/rdma/c/4660ce92944ec5
[05/14] net: ionic: Provide interrupt allocation support for the RDMA driver
        https://git.kernel.org/rdma/rdma/c/e587f088137882
[06/14] net: ionic: Provide doorbell and CMB region information
        https://git.kernel.org/rdma/rdma/c/833e384b2fff35
[07/14] RDMA: Add IONIC to rdma_driver_id definition
        https://git.kernel.org/rdma/rdma/c/f8e85db1702851
[08/14] RDMA/ionic: Register auxiliary module for ionic ethernet adapter
        https://git.kernel.org/rdma/rdma/c/8b265da071f707
[09/14] RDMA/ionic: Create device queues to support admin operations
        https://git.kernel.org/rdma/rdma/c/1c2d35074d9675
[10/14] RDMA/ionic: Register device ops for control path
        https://git.kernel.org/rdma/rdma/c/57c6622844742b
[11/14] RDMA/ionic: Register device ops for datapath
        https://git.kernel.org/rdma/rdma/c/6cada62ba14f25
[12/14] RDMA/ionic: Register device ops for miscellaneous functionality
        https://git.kernel.org/rdma/rdma/c/ca6704a04c36e4
[13/14] RDMA/ionic: Implement device stats ops
        https://git.kernel.org/rdma/rdma/c/8de04ae7bfe0b8
[14/14] RDMA/ionic: Add Makefile/Kconfig to kernel build environment
        https://git.kernel.org/rdma/rdma/c/59804cf2d906df

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>