From 630db8c2091a31d9f9db82a4871090b7d1a8857e Mon Sep 17 00:00:00 2001 From: Jacek Kalwas Date: Fri, 24 Sep 2021 14:50:33 -0400 Subject: [PATCH] nvmf: rm parse trtype in create transport rpc seems it is not required, string is used instead enum Signed-off-by: Jacek Kalwas Change-Id: Ic67af6cfa6f8e22a6593f904cd5b5c1b51cae6ec Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9623 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki Reviewed-by: Changpeng Liu --- lib/nvmf/nvmf_rpc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/nvmf/nvmf_rpc.c b/lib/nvmf/nvmf_rpc.c index 80f1ec0e6e..d4cec350b5 100644 --- a/lib/nvmf/nvmf_rpc.c +++ b/lib/nvmf/nvmf_rpc.c @@ -1922,7 +1922,6 @@ rpc_nvmf_create_transport(struct spdk_jsonrpc_request *request, const struct spdk_json_val *params) { struct nvmf_rpc_create_transport_ctx *ctx; - enum spdk_nvme_transport_type trtype; struct spdk_nvmf_tgt *tgt; ctx = calloc(1, sizeof(*ctx)); @@ -1950,14 +1949,6 @@ rpc_nvmf_create_transport(struct spdk_jsonrpc_request *request, 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 * parameters again to update any options passed in rpc create transport call. */