[ovs-dev] 答复: Re: 答复: Re: 答复: Re: [ovs-dev, CudaMailTagged] netdev-dpdk: unlink socket file when constructing vhostuser.

xu.binbin1 at zte.com.cn xu.binbin1 at zte.com.cn
Fri Aug 5 00:31:32 UTC 2016


My opinion is that, the 'kill -9' signal can't be captured. 
The patch described in 
http://openvswitch.org/pipermail/dev/2016-February/065470.html can't fix 
the issue perfectly. 

Do we allow sb use 'kill -9' to kill OVS?? 


Ilya Maximets <i.maximets at samsung.com> 写于 2016/08/04 20:01:50:

> 发件人:  Ilya Maximets <i.maximets at samsung.com>
> 收件人:  xu.binbin1 at zte.com.cn, 
> 抄送: Ben Pfaff <blp at ovn.org>, dev at openvswitch.org, Heetae Ahn 
> <heetae82.ahn at samsung.com>, Dyasly Sergey <s.dyasly at samsung.com>
> 日期:  2016/08/04 20:02
> 主题: Re: 答复: Re: 答复: Re: [ovs-dev, CudaMailTagged] netdev-
> dpdk: unlink socket file when constructing vhostuser.
> 
> On 04.08.2016 14:52, xu.binbin1 at zte.com.cn wrote:
> > Thank you.
> > 
> > I saw the patch in the link: http://openvswitch.org/pipermail/dev/
> 2016-February/065556.html
> > 
> > But in the latest code of OVS, I can't find this path??
> 
> Did you read the whole discussion?
> 
> > By the way, should I keep the mode of 'lib/netdev-dpdk.c' file?
> 
> Definitely. But I don't think you should send second version if
> you don't have very strong arguments for such solution.
> 
> > Ilya Maximets <i.maximets at samsung.com> 写于 2016/08/04 19:33:58:
> > 
> >> 发件人:  Ilya Maximets <i.maximets at samsung.com>
> >> 收件人:  xu.binbin1 at zte.com.cn,
> >> 抄送: Ben Pfaff <blp at ovn.org>, dev at openvswitch.org, Heetae Ahn
> >> <heetae82.ahn at samsung.com>, Dyasly Sergey <s.dyasly at samsung.com>
> >> 日期:  2016/08/04 19:34
> >> 主题: Re: 答复: Re: [ovs-dev, CudaMailTagged] netdev-dpdk: unlink
> >> socket file when constructing vhostuser.
> >>
> >> On 04.08.2016 14:05, xu.binbin1 at zte.com.cn wrote:
> >> > I get the source code clone from branch origin/master in the 
github.
> >>
> >> Sorry. All is OK, but you changed the mode of 'lib/netdev-dpdk.c' 
file.
> >>
> >> > In fact, I killed ovs-vswitchd process and then start it again.
> >> > In this case, sockets left on the filesystem.
> >>
> >> That is normal. Why you using hard untrappable signals? There will be
> >> no issues in normal case (even SIGTERM or SIGINT).
> >>
> >> There are few discussions about this in mail-list. That's an old 
topic.
> >> Some links:
> >>     http://openvswitch.org/pipermail/dev/2016-February/065556.html
> >>     http://openvswitch.org/pipermail/dev/2016-February/065470.html
> >>
> >>
> >> > Sorry for my description in the commit msg, it may be a puzzle to 
you.
> >> >
> >> >
> >> >
> >> >
> >> > 发件人:         Ilya Maximets <i.maximets at samsung.com>
> >> > 收件人:         xu.binbin1 at zte.com.cn, dev at openvswitch.org,
> >> > 抄送:        Ben Pfaff <blp at ovn.org>, Dyasly Sergey
> >> <s.dyasly at samsung.com>, Heetae Ahn <heetae82.ahn at 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.binbin1 at 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.binbin1 at 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",
> >> >>
> >> >



More information about the dev mailing list