public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] nvmetcli: remote configuation
@ 2021-02-12 15:52 Hannes Reinecke
  2021-02-12 15:52 ` [PATCH 1/3] nvmetcli: add 'merge' parameter to set_config() Hannes Reinecke
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Hannes Reinecke @ 2021-02-12 15:52 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Daniel Wagner, Keith Busch, Chaitanya Kulkarni, Hannes Reinecke,
	linux-nvme, Enzo Matsumiya, Sagi Grimberg

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

-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-13  9:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-12 15:52 [RFC PATCH 0/3] nvmetcli: remote configuation Hannes Reinecke
2021-02-12 15:52 ` [PATCH 1/3] nvmetcli: add 'merge' parameter to set_config() Hannes Reinecke
2021-02-12 15:52 ` [PATCH 2/3] nvmetproxy: add a JSON-RPC proxy daemon Hannes Reinecke
2021-02-12 15:52 ` [PATCH 3/3] nvmetadm: add JSON-RPC client for remote configuration Hannes Reinecke
2021-07-13  9:21 ` [RFC PATCH 0/3] nvmetcli: remote configuation Christoph Hellwig
2021-07-13  9:41   ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox