Commit 7964f1df authored by Pawel Kaminski's avatar Pawel Kaminski Committed by Jim Harris
Browse files

scripts/rpc: Change rpc construct_malloc_bdev to bdev_malloc_create

This is patch that implements changes according to proposal
submitted in https://review.gerrithub.io/c/spdk/spdk/+/453036



Change-Id: I5423cd34cb5fc111b34cab2b7f7c6c5f11898af8
Signed-off-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464677


Reviewed-by: default avatarBroadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 6fdd36e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -233,8 +233,8 @@ $ ./app/iscsi_tgt/iscsi_tgt
Construct two 64MB Malloc block devices with 512B sector size "Malloc0" and "Malloc1":

```
$ ./scripts/rpc.py construct_malloc_bdev -b Malloc0 64 512
$ ./scripts/rpc.py construct_malloc_bdev -b Malloc1 64 512
$ ./scripts/rpc.py bdev_malloc_create -b Malloc0 64 512
$ ./scripts/rpc.py bdev_malloc_create -b Malloc1 64 512
```

Create new portal group with id 1, and address 10.0.0.1:3260:
+5 −5
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ Example response:
    "construct_nvme_bdev",
    "construct_null_bdev",
    "delete_malloc_bdev",
    "construct_malloc_bdev",
    "bdev_malloc_create",
    "delete_ftl_bdev",
    "construct_ftl_bdev",
    "get_lvol_stores",
@@ -469,7 +469,7 @@ Example response:
        "name": "Malloc0",
        "uuid": "913fc008-79a7-447f-b2c4-c73543638c31"
      },
      "method": "construct_malloc_bdev"
      "method": "bdev_malloc_create"
    },
    {
      "params": {
@@ -478,7 +478,7 @@ Example response:
        "name": "Malloc1",
        "uuid": "dd5b8f6e-b67a-4506-b606-7fff5a859920"
      },
      "method": "construct_malloc_bdev"
      "method": "bdev_malloc_create"
    }
  ]
}
@@ -1151,7 +1151,7 @@ Example response:
}
~~~

## construct_malloc_bdev {#rpc_construct_malloc_bdev}
## bdev_malloc_create {#rpc_bdev_malloc_create}

Construct @ref bdev_config_malloc

@@ -1181,7 +1181,7 @@ Example request:
    "uuid": "2b6601ba-eada-44fb-9a83-a20eb9eb9e90"
  },
  "jsonrpc": "2.0",
  "method": "construct_malloc_bdev",
  "method": "bdev_malloc_create",
  "id": 1
}
~~~
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ NQN, serial number, and IP address with RDMA transport to your own circumstances
"rdma" with "TCP", then the subsystem will add a listener with TCP transport.

~~~{.sh}
scripts/rpc.py construct_malloc_bdev -b Malloc0 512 512
scripts/rpc.py bdev_malloc_create -b Malloc0 512 512
scripts/rpc.py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -d SPDK_Controller1
scripts/rpc.py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0
scripts/rpc.py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a 192.168.100.8 -s 4420
+3 −3
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ This guide will use a malloc bdev (ramdisk) named Malloc0. The following RPC
will create a 64MB malloc bdev with 512-byte block size.

~~~{.sh}
scripts/rpc.py construct_malloc_bdev 64 512 -b Malloc0
scripts/rpc.py bdev_malloc_create 64 512 -b Malloc0
~~~

## Create a vhost device {#vhost_vdev_create}
@@ -267,7 +267,7 @@ EAL: using IOMMU type 1 (Type 1)
~~~

~~~{.sh}
host:~# ./scripts/rpc.py construct_malloc_bdev 128 4096 Malloc0
host:~# ./scripts/rpc.py bdev_malloc_create 128 4096 Malloc0
Malloc0
~~~

@@ -290,7 +290,7 @@ vhost_scsi.c: 840:spdk_vhost_scsi_dev_add_tgt: *NOTICE*: Controller vhost.0: def
~~~

~~~{.sh}
host:~# ./scripts/rpc.py construct_malloc_bdev 64 512 -b Malloc1
host:~# ./scripts/rpc.py bdev_malloc_create 64 512 -b Malloc1
Malloc1
~~~

+1 −1
Original line number Diff line number Diff line
@@ -368,7 +368,7 @@ bdev_malloc_write_json_config(struct spdk_bdev *bdev, struct spdk_json_write_ctx

	spdk_json_write_object_begin(w);

	spdk_json_write_named_string(w, "method", "construct_malloc_bdev");
	spdk_json_write_named_string(w, "method", "bdev_malloc_create");

	spdk_json_write_named_object_begin(w, "params");
	spdk_json_write_named_string(w, "name", bdev->name);
Loading