nvmf: Use acceptor_poll_rate value from func args
Acceptor poller is registered using rate value from transport opts structure, but this structure is initialized on generic transport layer when create() function completes, so at this time acceptor poll rate is 0. Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Change-Id: I2138825f3ff9dd3cc0ccaa65e8d5c23aab338ad4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11095 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: Jim Harris <james.r.harris@intel.com> Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
4a15c5fd5d
commit
355806b5d5
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user