[RFC 00/10] Python binding for rdma-core

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

 



From: Leon Romanovsky <leonro@xxxxxxxxxxxx>

In this patch set we introduce python bindings (pyverbs) for
rdma-core in its initial form. It will cover libibverbs and will be
expanded to support librdmacm in the future.

Prior to developing of pyverbs, the existing python-rdma package [1]
was evaluated, but a new package was built using newer cython and
python versions, in order to provide a more comfortable user experience.

The main goal of pyverbs is to provide to the user a simple API
that makes working with verbs easier. Among other things, it allows
setting up RDMA resources quickly.

In the future, it will also suggest default configuration (e.g.
default values for QP attributes, which the user can override) and
further bring up shortcuts will be provided (e.g. QPs can change
state internally, without user intervention).

The above means a significant cut in tests development time,
which will allow developers to send a feature with a test included,
increasing rdma-core's robustness.

A short example based on the preliminary abilities of this PR:

    >>>import pyverbs.device as d
    >>>ctx = d.Context(name='mlx5_0')
    >>>attr = ctx.query_device()
    print(attr)
    FW version            : 16.24.0185
    Node guid             : 9803:9b03:0000:e4c6
    Sys image GUID        : 9803:9b03:0000:e4c6
    Max MR size           : 0xffffffffffffffff
    [...]

Known limitations:
 This PR contains an updated rdma-core.spec files, but it is not final.
 More work on packaging and travis is needed.

Future plan:
 * Extend pyverbs' coverage over rdma-core (further RDMA objects such as
   PD, MR etc.).
 * Enrich examles section.
 * Provide tests for existing and new features.

[1] https://github.com/jgunthorpe/python-rdma

Thanks,
   Noa and Leon

Maxim Chicherin (2):
  pyverbs: Introduce device class
  pyverbs/examples: Introduce ib_devices

Noa Osherovich (8):
  pyverbs: Introducing pyverbs and its context class
  pyverbs: GID class
  pyverbs: Documetn pyverbs usage and examples
  pyverbs: Update cmake to include pyverbs package
  redhat: Add pyverbs to RedHat specification
  suse: Add Pyverbs to SUSE specification
  debian: Add pyverbs to Debian package
  pyverbs: Unittest framework

 .travis.yml                      |   4 +
 CMakeLists.txt                   |  45 +++-
 Documentation/pyverbs.md         |  98 +++++++++
 buildlib/Findcython.cmake        |  29 +++
 buildlib/cbuild                  |  13 +-
 buildlib/pyverbs_functions.cmake |  45 ++++
 debian/control                   |  11 +-
 debian/python3-pyverbs.install   |   1 +
 debian/rules                     |   2 +
 pyverbs/CMakeLists.txt           |  20 ++
 pyverbs/__init__.pxd             |   0
 pyverbs/__init__.py              |   0
 pyverbs/addr.pxd                 |   9 +
 pyverbs/addr.pyx                 |  53 +++++
 pyverbs/base.pxd                 |   5 +
 pyverbs/base.pyx                 |  24 +++
 pyverbs/device.pxd               |  20 ++
 pyverbs/device.pyx               | 358 +++++++++++++++++++++++++++++++
 pyverbs/enums.pyx                |   1 +
 pyverbs/examples/ib_devices.py   |  20 ++
 pyverbs/libibverbs.pxd           |  74 +++++++
 pyverbs/libibverbs_enums.pxd     | 344 +++++++++++++++++++++++++++++
 pyverbs/pyverbs_error.py         |  40 ++++
 pyverbs/run_tests.py             |  22 ++
 pyverbs/tests/__init__.py        |   0
 pyverbs/tests/device.py          |  41 ++++
 redhat/rdma-core.spec            |  23 ++
 suse/rdma-core.spec              |  26 ++-
 28 files changed, 1318 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/pyverbs.md
 create mode 100644 buildlib/Findcython.cmake
 create mode 100644 buildlib/pyverbs_functions.cmake
 create mode 100644 debian/python3-pyverbs.install
 create mode 100644 pyverbs/CMakeLists.txt
 create mode 100644 pyverbs/__init__.pxd
 create mode 100644 pyverbs/__init__.py
 create mode 100644 pyverbs/addr.pxd
 create mode 100644 pyverbs/addr.pyx
 create mode 100644 pyverbs/base.pxd
 create mode 100644 pyverbs/base.pyx
 create mode 100644 pyverbs/device.pxd
 create mode 100644 pyverbs/device.pyx
 create mode 120000 pyverbs/enums.pyx
 create mode 100755 pyverbs/examples/ib_devices.py
 create mode 100644 pyverbs/libibverbs.pxd
 create mode 100644 pyverbs/libibverbs_enums.pxd
 create mode 100644 pyverbs/pyverbs_error.py
 create mode 100644 pyverbs/run_tests.py
 create mode 100644 pyverbs/tests/__init__.py
 create mode 100644 pyverbs/tests/device.py

--
2.19.1




[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