I get the source code clone from branch origin/master in the github. 

In fact, I killed ovs-vswitchd process and then start it again. In this 
case, sockets left on the filesystem.

Sorry for my description in the commit msg, it may be a puzzle to you.




发件人:         Ilya Maximets <i.maxim...@samsung.com>
收件人:         xu.binb...@zte.com.cn, dev@openvswitch.org, 
抄送:   Ben Pfaff <b...@ovn.org>, Dyasly Sergey <s.dya...@samsung.com>, 
Heetae Ahn <heetae82....@samsung.com>
日期:   2016/08/04 18:42
主题:   Re: [ovs-dev, CudaMailTagged] netdev-dpdk: unlink socket file when 
constructing vhostuser.



Oh, again...

1. This patch not for upstream version of OVS. (I guess your OVS patched
   at least with vHost client support).

2. If you will restart OVS properly (even by SIGTERM or SIGINT) socket
   will be removed inside 'rte_vhost_driver_unregister()' or inside
   fatal_signal handler. Are you sure that it's the issue of upstream
   OVS and not your local patches?

3. Segmentation fault or another hard failure is the only reason to
   sockets left on the filesystem.

Best regards, Ilya Maximets.

On 04.08.2016 23:31, xu.binb...@zte.com.cn wrote:
> Work with DPDK 16.07, a UNIX socket will be created when we
> add vhostuser port. After that, the restarting of ovs-vswitchd
> leads to the failure of socket binding, so the vhostuser port
> can't be created successfully.
> 
> This commit unlink socket file before creating UNIX socket to
> avoid failure of socket binding.
> 
> Signed-off-by: Binbin Xu <xu.binb...@zte.com.cn>
> ---
>  lib/netdev-dpdk.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>  mode change 100644 => 100755 lib/netdev-dpdk.c
> 
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> old mode 100644
> new mode 100755
> index aaac0d1..95cf7c3
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -885,7 +885,10 @@ netdev_dpdk_vhost_user_construct(struct netdev 
*netdev)
>       */
>      snprintf(dev->vhost_id, sizeof(dev->vhost_id), "%s/%s",
>               vhost_sock_dir, name);
> -
> + 
> +    if (!(flags & RTE_VHOST_USER_CLIENT)) {
> +        unlink(dev->vhost_id);
> +    }
>      err = rte_vhost_driver_register(dev->vhost_id, flags);
>      if (err) {
>          VLOG_ERR("vhost-user socket device setup failure for socket 
%s\n",
> 


_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to