From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Daniel Wagner <dwagner@suse.de>,
Keith Busch <keith.busch@wdc.com>,
Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
Hannes Reinecke <hare@suse.de>,
linux-nvme@lists.infradead.org,
Enzo Matsumiya <ematsumiya@suse.com>,
Sagi Grimberg <sagi@grimberg.me>
Subject: [RFC PATCH 0/3] nvmetcli: remote configuation
Date: Fri, 12 Feb 2021 16:52:26 +0100 [thread overview]
Message-ID: <20210212155229.98816-1-hare@suse.de> (raw)
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
next reply other threads:[~2021-02-12 15:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-12 15:52 Hannes Reinecke [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210212155229.98816-1-hare@suse.de \
--to=hare@suse.de \
--cc=Chaitanya.Kulkarni@wdc.com \
--cc=dwagner@suse.de \
--cc=ematsumiya@suse.com \
--cc=hch@lst.de \
--cc=keith.busch@wdc.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox