diff --git a/lib/nvmf/fc.c b/lib/nvmf/fc.c index 8aff65e84..9f42662eb 100644 --- a/lib/nvmf/fc.c +++ b/lib/nvmf/fc.c @@ -3,6 +3,7 @@ * * Copyright (c) 2018-2019 Broadcom. All Rights Reserved. * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. + * Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -2010,7 +2011,7 @@ nvmf_fc_create(struct spdk_nvmf_transport_opts *opts) } g_nvmf_ftransport->accept_poller = SPDK_POLLER_REGISTER(nvmf_fc_accept, - &g_nvmf_ftransport->transport, g_nvmf_ftransport->transport.opts.acceptor_poll_rate); + &g_nvmf_ftransport->transport, opts->acceptor_poll_rate); if (!g_nvmf_ftransport->accept_poller) { free(g_nvmf_ftransport); g_nvmf_ftransport = NULL; diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index b6eae7100..c20c9e0da 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -3,7 +3,7 @@ * * Copyright (c) Intel Corporation. All rights reserved. * Copyright (c) 2019-2021 Mellanox Technologies LTD. All rights reserved. - * Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * Copyright (c) 2021, 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -2460,7 +2460,7 @@ nvmf_rdma_create(struct spdk_nvmf_transport_opts *opts) } rtransport->accept_poller = SPDK_POLLER_REGISTER(nvmf_rdma_accept, &rtransport->transport, - rtransport->transport.opts.acceptor_poll_rate); + opts->acceptor_poll_rate); if (!rtransport->accept_poller) { nvmf_rdma_destroy(&rtransport->transport, NULL, NULL); return NULL; diff --git a/lib/nvmf/tcp.c b/lib/nvmf/tcp.c index e09d058b0..ebf47ba59 100644 --- a/lib/nvmf/tcp.c +++ b/lib/nvmf/tcp.c @@ -3,6 +3,7 @@ * * Copyright (c) Intel Corporation. All rights reserved. * Copyright (c) 2019, 2020 Mellanox Technologies LTD. All rights reserved. + * Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -675,8 +676,9 @@ nvmf_tcp_create(struct spdk_nvmf_transport_opts *opts) pthread_mutex_init(&ttransport->lock, NULL); ttransport->accept_poller = SPDK_POLLER_REGISTER(nvmf_tcp_accept, &ttransport->transport, - ttransport->transport.opts.acceptor_poll_rate); + opts->acceptor_poll_rate); if (!ttransport->accept_poller) { + pthread_mutex_destroy(&ttransport->lock); free(ttransport); return NULL; } diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c index b96a3312d..d3dd3e7fc 100644 --- a/lib/nvmf/vfio_user.c +++ b/lib/nvmf/vfio_user.c @@ -2,6 +2,7 @@ * BSD LICENSE * Copyright (c) Intel Corporation. All rights reserved. * Copyright (c) 2019, Nutanix Inc. All rights reserved. + * Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -612,7 +613,7 @@ nvmf_vfio_user_create(struct spdk_nvmf_transport_opts *opts) } vu_transport->accept_poller = SPDK_POLLER_REGISTER(nvmf_vfio_user_accept, &vu_transport->transport, - vu_transport->transport.opts.acceptor_poll_rate); + opts->acceptor_poll_rate); if (!vu_transport->accept_poller) { free(vu_transport); return NULL;