From c73dc155c2b1fe53f62fb9ad3b2b9b935c62dbe0 Mon Sep 17 00:00:00 2001 From: paul luse Date: Fri, 11 Sep 2020 12:53:52 -0400 Subject: [PATCH] doc: document crypto RPCs in jsonrpc doc Signed-off-by: paul luse Change-Id: I5338015e1586f8faf601c80a509f48995ec8cf27 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4186 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Tomasz Zawadzki --- doc/jsonrpc.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/doc/jsonrpc.md b/doc/jsonrpc.md index 8c5011c67..2c044d61d 100644 --- a/doc/jsonrpc.md +++ b/doc/jsonrpc.md @@ -1649,6 +1649,90 @@ Example response: } ~~~ +## bdev_crypto_create {#rpc_bdev_crypto_create} + +Create a new crypto bdev on a given base bdev. + +### Parameters + +Name | Optional | Type | Description +----------------------- | -------- | ----------- | ----------- +base_bdev_name | Required | string | Name of the base bdev +name | Required | string | Name of the crypto vbdev to create +crypto_pmd | Required | string | Name of the crypto device driver +key | Required | string | Key +cipher | Required | string | Cipher to use, AES_CBC or AES_XTS (QAT only) +key2 | Required | string | 2nd key only required for cipher AET_XTS + +### Result + +Name of newly created bdev. + +### Example + +Example request: + +~~~ +{ + "params": { + "base_bdev_name": "Nvme0n1", + "name": "my_crypto_bdev", + "crypto_pmd": "crypto_aesni_mb", + "key": "1234567890123456", + "cipher": "AES_CBC" + }, + "jsonrpc": "2.0", + "method": "bdev_crypto_create", + "id": 1 +} +~~~ + +Example response: + +~~~ +{ + + "jsonrpc": "2.0", + "id": 1, + "result": "my_crypto_bdev" +} +~~~ + +## bdev_crypto_delete {#rpc_bdev_crypto_delete} + +Delete a crypto bdev. + +### Parameters + +Name | Optional | Type | Description +----------------------- | -------- | ----------- | ----------- +name | Required | string | Name of the crypto bdev + +### Example + +Example request: + +~~~ +{ + "params": { + "name": "my_crypto_bdev" + }, + "jsonrpc": "2.0", + "method": "bdev_crypto_delete", + "id": 1 +} +~~~ + +Example response: + +~~~ +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +~~~ + ## bdev_ocf_create {#rpc_bdev_ocf_create} Construct new OCF bdev.