test/env_dpdk_post_init: Use spdk_nvme_detach_async()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I7d78cc1a5ab1d696abcba9cd83aeac913ea101de Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8472 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
9a99ff90f9
commit
2184410027
@ -95,6 +95,7 @@ main(int argc, char **argv)
|
||||
{
|
||||
int ret;
|
||||
int i;
|
||||
struct spdk_nvme_detach_ctx *detach_ctx = NULL;
|
||||
|
||||
printf("Starting DPDK initialization...\n");
|
||||
ret = rte_eal_init(argc, argv);
|
||||
@ -119,7 +120,11 @@ main(int argc, char **argv)
|
||||
printf("Cleaning up...\n");
|
||||
for (i = 0; i < g_num_devs; i++) {
|
||||
struct dev *dev = &g_nvme_devs[i];
|
||||
spdk_nvme_detach(dev->ctrlr);
|
||||
spdk_nvme_detach_async(dev->ctrlr, &detach_ctx);
|
||||
}
|
||||
|
||||
if (detach_ctx) {
|
||||
spdk_nvme_detach_poll(detach_ctx);
|
||||
}
|
||||
|
||||
return g_failed;
|
||||
|
Loading…
Reference in New Issue
Block a user