[dpdk-dev] [PATCH] Unlink existing unused sockets at start up

Wang, Zhihong zhihong.wang at intel.com
Mon Dec 21 04:31:22 CET 2015



> -----Original Message-----
> From: Ilya Maximets [mailto:i.maximets at samsung.com]
> Sent: Friday, December 18, 2015 2:18 PM
> To: Wang, Zhihong <zhihong.wang at intel.com>; dev at dpdk.org
> Cc: p.fedin at samsung.com; yuanhan.liu at linux.intel.com; s.dyasly at samsung.com;
> Xie, Huawei <huawei.xie at intel.com>
> Subject: Re: [PATCH] Unlink existing unused sockets at start up
> 
> On 18.12.2015 05:39, Wang, Zhihong wrote:
> 
> > Yes ideally the underneath lib shouldn't meddle with the recovery logic.
> > But I do think we should at least put a warning in the lib function
> > said the app should make the path available. This is another topic though :-)
> Like we did in memcpy:
> > /**
> >  * Copy 16 bytes from one location to another,
> >  * locations should not overlap.
> >  */
> >
> 
> Isn't it enough to have an error in the log?

Function comments and function code are different things and are both necessary.
Also why wait till error occurs when a comment can warn the developer?

> 
> lib/librte_vhost/vhost_user/vhost-net-user.c:130:
> RTE_LOG(ERR, VHOST_CONFIG, "fail to bind fd:%d, remove file:%s and try
> again.\n",
> 
> Best regards, Ilya Maximets.


More information about the dev mailing list