From: Yajun Wu <yajunw@nvidia.com>
To: <matan@nvidia.com>, Maxime Coquelin <maxime.coquelin@redhat.com>,
"Chenbo Xia" <chenbo.xia@intel.com>,
Chengchang Tang <tangchengchang@huawei.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>
Subject: [PATCH] examples/vdpa: fix devices cleanup
Date: Mon, 26 Dec 2022 14:51:06 +0800 [thread overview]
Message-ID: <20221226065105.2480103-1-yajunw@nvidia.com> (raw)
Move rte_eal_cleanup to function vdpa_sample_quit which
handling all example app quit.
Otherwise rte_eal_cleanup won't be called on receiving signal
like SIGINT(control + c).
Fixes: 10aa3757 ("examples: add eal cleanup to examples")
Cc: stable@dpdk.org
Signed-off-by: Yajun Wu <yajunw@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
examples/vdpa/main.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/examples/vdpa/main.c b/examples/vdpa/main.c
index 4c7e81d7b6..9149b66538 100644
--- a/examples/vdpa/main.c
+++ b/examples/vdpa/main.c
@@ -287,6 +287,8 @@ vdpa_sample_quit(void)
if (vports[i].ifname[0] != '\0')
close_vdpa(&vports[i]);
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
}
static void
@@ -633,8 +635,5 @@ main(int argc, char *argv[])
vdpa_sample_quit();
}
- /* clean up the EAL */
- rte_eal_cleanup();
-
return 0;
}
--
2.27.0
next reply other threads:[~2022-12-26 6:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-26 6:51 Yajun Wu [this message]
2022-12-26 18:05 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2022-12-26 6:25 Yajun Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221226065105.2480103-1-yajunw@nvidia.com \
--to=yajunw@nvidia.com \
--cc=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=tangchengchang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).