From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: Gellert Babel <gellert.babel@ericsson.com>,
"yliu@fridaylinux.org" <yliu@fridaylinux.org>,
"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Jan Wickbom <jan.wickbom@ericsson.com>
Subject: Re: [dpdk-dev] [PATCH] vhost user: unlink sockaddr when poll sched fails
Date: Mon, 20 Nov 2017 09:18:18 +0000 [thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E365135AB19@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1511161153-5127-1-git-send-email-gellert.babel@ericsson.com>
Hi,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Gellert Babel
> Sent: Monday, November 20, 2017 2:59 PM
> To: yliu@fridaylinux.org; maxime.coquelin@redhat.com
> Cc: dev@dpdk.org; Jan Wickbom; Gellert Babel
> Subject: [dpdk-dev] [PATCH] vhost user: unlink sockaddr when poll sched
> fails
>
> From: Jan Wickbom <jan.wickbom@ericsson.com>
>
> Issue:
>
> Vhost user socket addresses left in /var/run/openvswitch.
> This will lead to failure to add vhost user ports with names that
> already exist in this directory.
>
> When there is a failure to add a vhost user socket file descriptor to
> the file descriptor set using fdset_add() in
> rte_vhost_driver_register() the address bound to the socket is not
> released.
>
> Solution:
> Add unlink of the file path corresponding to the socket address.
I'm afraid this overkills. Suppose we have an existing port binding on path1; and we (wrongly) add another port path1. This patch would remove the previous socket on path1.
Thanks,
Jianfeng
>
> Signed-off-by: Jan Wickbom <jan.wickbom@ericsson.com>
> Signed-off-by: Gellert Babel <gellert.babel@ericsson.com>
> ---
> lib/librte_vhost/socket.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
> index 41aa3f9..eb9dae2 100644
> --- a/lib/librte_vhost/socket.c
> +++ b/lib/librte_vhost/socket.c
> @@ -352,6 +352,7 @@ struct vhost_user {
>
> err:
> close(fd);
> + unlink(path);
> return -1;
> }
>
> --
> 1.9.1
next prev parent reply other threads:[~2017-11-20 9:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 6:59 Gellert Babel
2017-11-20 9:18 ` Tan, Jianfeng [this message]
[not found] ` <CGME20171120130713eucas1p21960847cb6dd2927200d623d4fcf27b8@eucas1p2.samsung.com>
2017-11-20 13:07 ` Ilya Maximets
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=ED26CBA2FAD1BF48A8719AEF02201E365135AB19@SHSMSX103.ccr.corp.intel.com \
--to=jianfeng.tan@intel.com \
--cc=dev@dpdk.org \
--cc=gellert.babel@ericsson.com \
--cc=jan.wickbom@ericsson.com \
--cc=maxime.coquelin@redhat.com \
--cc=yliu@fridaylinux.org \
/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).