From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 8F3B1A49C for ; Fri, 2 Feb 2018 16:47:14 +0100 (CET) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180202154712euoutp025b7dcbf462cc39b8b6a24e94598b977c~PjNHXkTHo3159831598euoutp02C; Fri, 2 Feb 2018 15:47:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180202154712euoutp025b7dcbf462cc39b8b6a24e94598b977c~PjNHXkTHo3159831598euoutp02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1517586432; bh=GxMw8pX3QzT6H5TDIXmdq/P9IPZPOz8AnkuPnKomuRs=; h=Subject:To:Cc:From:Date:In-reply-to:References:From; b=g1uBfZzdpJZacPtrs1FFUukIqcn7tg3eOuq1rbTWD7beY9OMARX8s31HQVPXOslA9 o/bLa9JvNqMse+gOLZwQlGt4cy9shVC4BqzMa018o27W+EwQaYTCXIqdky8EzjTggp YLP0VdYDoYdbrVnj/xN6e+8zbPv+ivV7bteZTCJY= Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180202154711eucas1p1bfd9b9bc2cd973bf8520dfa5129e859e~PjNGhIHso0804608046eucas1p1q; Fri, 2 Feb 2018 15:47:11 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges4.samsung.com (EUCPMTA) with SMTP id 20.8B.30163.FF7847A5; Fri, 2 Feb 2018 15:47:11 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180202154710eucas1p12c512371abe604d4c60a6d536d88ff3f~PjNFz_r0j2118621186eucas1p1J; Fri, 2 Feb 2018 15:47:10 +0000 (GMT) X-AuditID: cbfec7f4-f790c6d0000075d3-84-5a7487ff8a3e Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 08.16.18832.EF7847A5; Fri, 2 Feb 2018 15:47:10 +0000 (GMT) Received: from [106.109.129.180] by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P3J001ND56LF410@eusync1.samsung.com>; Fri, 02 Feb 2018 15:47:10 +0000 (GMT) To: "Richardson, Bruce" , "Yang, Zhiyong" , "dev@dpdk.org" Cc: "yliu@fridaylinux.org" , "maxime.coquelin@redhat.com" From: Ilya Maximets Message-id: Date: Fri, 02 Feb 2018 18:47:08 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-version: 1.0 In-reply-to: <59AF69C657FD0841A61C55336867B5B0722435EE@IRSMSX103.ger.corp.intel.com> Content-type: text/plain; charset="utf-8" Content-language: en-GB Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFKsWRmVeSWpSXmKPExsWy7djPc7r/20uiDK53sFvcWGVv8e7TdiaL K+0/2S2Ode5hsWhZspPJYv7y3cwObB6/Fixl9bjx7xabx+I9L5k83u+7yubRt2UVYwBrFJdN SmpOZllqkb5dAlfGjF6dgn+CFT1v3zI1MF7k62Lk5JAQMJHYs3gHO4QtJnHh3nq2LkYuDiGB pYwS/Qvfs0M4nxklOtcdZoHpuL/mLlTVMkaJWYuXQ1W9YJSYtK+VEaRKWMBZYv+0GWBzRQTq JWZvewoWZxbIk/j64gUbiM0moCNxavURsDivgJ3Ei+UvweIsAqoSK/Z8ZAKxRQUiJLqe7WKF qBGU+DH5HtgVnAJhEv+ebWeHmKkp8eLLJBYIW1zi2P2bULvkJTavecsMcpyEwAk2iQmv3kO9 4CIxed5UKFtY4tXxLdAAkJHo7DjIBNHQzC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6vm6B2KeC4JBnfxg4zd62VDn6JZ1h9rxjtviYZNAcXtba6sqnnxYbXZOad7ns/Mt9GY+f y+0veP/WM27bg+1TZFs5U+I22h2+EK2R3Cvqorw1/+b8e/N9p1xb0PA81lz/1uUD+l0GLm9u 6OutPtQU/PjsSdOb19huv16xveZfZu+XTQ/MjB4qsRRnJBpqMRcVJwIAwbLbGH8CAAA= X-CMS-MailID: 20180202154710eucas1p12c512371abe604d4c60a6d536d88ff3f X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180202152959eucas1p29e4663da3740566114fdb82045ee3caf X-RootMTR: 20180202152959eucas1p29e4663da3740566114fdb82045ee3caf References: <20180202083914.37584-1-zhiyong.yang@intel.com> <8dda4863-b45a-7f71-1c2d-7df6e67b05b0@samsung.com> <59AF69C657FD0841A61C55336867B5B0722435EE@IRSMSX103.ger.corp.intel.com> Subject: Re: [dpdk-dev] vhost: unlink existing file for server mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Feb 2018 15:47:14 -0000 On 02.02.2018 18:38, Richardson, Bruce wrote: > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ilya Maximets >> Sent: Friday, February 2, 2018 3:30 PM >> To: Yang, Zhiyong ; dev@dpdk.org >> Cc: yliu@fridaylinux.org; maxime.coquelin@redhat.com >> Subject: Re: [dpdk-dev] vhost: unlink existing file for server mode >> >> Oh. >> >> It's such a game: twice a year someone sends this patch to mail list. >> >> I have another one for you: >> * Find all the patches equal to this one in archives. >> * Read all the discussions. >> * Come back if you have some new ideas, not already discussed many times >> here. >> >> Sorry for my sarcasm. >> NACK for this, as usual. >> >> Best regards, Ilya Maximets. > > Surely the fact of repeated patches is an indication that this should be > explicitly called out at appropriately places in the code via comments. > Far easier to provide people the info in the code they are changing than > expecting them to trawl through historical mailing list entries. > > Regards, > /Bruce > Yes, you're right. We just discussed the situation locally in the office and came to the exactly same conclusion. We definitely need the comment here to prevent future unlink related patches. >> >> On 02.02.2018 11:39, Zhiyong Yang wrote: >>> Vhost-user startup will fail based on server mode, if the specified >>> socket file has already existed. The patch introduces function >>> unlink() to remove the possible existing file. >>> >>> Cc: yliu@fridaylinux.org >>> Cc: maxime.coquelin@redhat.com >>> >>> Signed-off-by: Zhiyong Yang >>> --- >>> 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 6e3857e7a..324a24f4e 100644 >>> --- a/lib/librte_vhost/socket.c >>> +++ b/lib/librte_vhost/socket.c >>> @@ -315,6 +315,7 @@ vhost_user_start_server(struct vhost_user_socket >> *vsocket) >>> int fd = vsocket->socket_fd; >>> const char *path = vsocket->path; >>> >>> + unlink(path); >>> ret = bind(fd, (struct sockaddr *)&vsocket->un, sizeof(vsocket- >>> un)); >>> if (ret < 0) { >>> RTE_LOG(ERR, VHOST_CONFIG, >>>