+12
−6
Loading
Currently, nvmf_tcp_listen() only supports SPDK_NVMF_ADRFAM_IPV4 and SPDK_NVMF_ADRFAM_IPV6, and will fail early if the socket type is unsupported. Therefore, nvmf_tcp_qpair_get_trid() should never encounter a socket type that is not SPDK_NVMF_ADRFAM_IPV4 or SPDK_NVMF_ADRFAM_IPV6. This patch changes the return type to void and replaces the default case with an SPDK_ERRLOG and assert(false) to catch unreachable code paths. Change-Id: Ib673373fb2b60152cf44d95507671999c669498a Signed-off-by:Kaiqi Chen <kaiqi.chen@smartx.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26353 Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Community-CI: Mellanox Build Bot Reviewed-by:
Vasuki Manikarnike <vasuki.manikarnike@hpe.com> Reviewed-by:
GangCao <gang.cao@intel.com> Reviewed-by:
Konrad Sztyber <ksztyber@nvidia.com>