Skip to content

RFC nvmetcli: remote configuation

Hannes Reinecke linux-nvme 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nvmetcli: add 'merge' parameter to set_config()nvmet/nvme.py nvmetcli+7 -50 replies
2/3nvmetproxy: add a JSON-RPC proxy daemonDocumentation/Makefile Documentation/nvmetproxy.txt nvmet/__init__.py +4 more+891 -140 replies
3/3nvmetadm: add JSON-RPC client for remote configurationnvmetadm setup.py+260 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] nvmetcli: remote configuation

Hi all,

I've discovered that SPDK has an JSON RPC interface which allows for remote configuration. And it turns out that the SPDK configuration itself is pretty similar to the in-kernel NVMe-oF target (surprise, surprise).
And to not let SPDK have an upper edge here's a simple JSON-RPC proxy for nvmet, together with a JSON-RPC client 'nvmetadm'. This allows a full remote configuration of an NVMe-oF target:

# nvmetadm nvmf_create_subsystem --nqn=nqn.nvmf-test1
# nvmetadm nvmf_subsystem_add_port --nqn=nqn.nvmf-test1 \
  --traddr=<target-ip> --trtrype=tcp --adrfam=ipv6
# nvmetadm bdev_create_file --file-name=Testfile1 --size=1G
# nvmetadm nvmf_subsystem_add_ns --nqn=nqn.nvmf-test1 \
  --bdev=Testfile1
# nvmetadm nvmf_subsystem_add_host --nqn=nqn.nvmf-test1 \
  --host=<hostnqn>
# nvme discover --transport=tcp --traddr=<target-ip> \
  --trsvcid=4420

With this it should be possible to convert blktests nvme suite to use this interface, which will allow blktest to run across arbitrary transports instead of just nvme-loop.

As usual, comments and reviews are welcome.

Hannes Reinecke (3):
nvmetcli: add 'merge' parameter to set_config()
nvmetproxy: add a JSON-RPC proxy daemon
nvmetadm: add JSON-RPC client for remote configuration

 Documentation/Makefile       |  24 +-
 Documentation/nvmetproxy.txt | 111 ++++++++
 nvmet/__init__.py            |   4 +-
 nvmet/bdev.py                |  72 +++++
 nvmet/nvme.py                |   8 +-
 nvmet/rpc.py                 | 495 +++++++++++++++++++++++++++++++++++
 nvmetadm                     | 259 ++++++++++++++++++
 nvmetcli                     |   4 +-
 nvmetproxy                   | 197 ++++++++++++++
 setup.py                     |   2 +-
 10 files changed, 1157 insertions(+), 19 deletions(-)
 create mode 100644 Documentation/nvmetproxy.txt
 create mode 100644 nvmet/bdev.py
 create mode 100644 nvmet/rpc.py
 create mode 100755 nvmetadm
 create mode 100755 nvmetproxy
Signature · 7 lines
2.29.2


_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme