nvmf: rm parse trtype in create transport rpc
seems it is not required, string is used instead enum Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com> Change-Id: Ic67af6cfa6f8e22a6593f904cd5b5c1b51cae6ec Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9623 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
a3d93c468c
commit
630db8c209
@ -1922,7 +1922,6 @@ rpc_nvmf_create_transport(struct spdk_jsonrpc_request *request,
|
|||||||
const struct spdk_json_val *params)
|
const struct spdk_json_val *params)
|
||||||
{
|
{
|
||||||
struct nvmf_rpc_create_transport_ctx *ctx;
|
struct nvmf_rpc_create_transport_ctx *ctx;
|
||||||
enum spdk_nvme_transport_type trtype;
|
|
||||||
struct spdk_nvmf_tgt *tgt;
|
struct spdk_nvmf_tgt *tgt;
|
||||||
|
|
||||||
ctx = calloc(1, sizeof(*ctx));
|
ctx = calloc(1, sizeof(*ctx));
|
||||||
@ -1950,14 +1949,6 @@ rpc_nvmf_create_transport(struct spdk_jsonrpc_request *request,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spdk_nvme_transport_id_parse_trtype(&trtype, ctx->trtype)) {
|
|
||||||
SPDK_ERRLOG("Invalid transport type '%s'\n", ctx->trtype);
|
|
||||||
spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
|
||||||
"Invalid transport type '%s'", ctx->trtype);
|
|
||||||
nvmf_rpc_create_transport_ctx_free(ctx);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize all the transport options (based on transport type) and decode the
|
/* Initialize all the transport options (based on transport type) and decode the
|
||||||
* parameters again to update any options passed in rpc create transport call.
|
* parameters again to update any options passed in rpc create transport call.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user