From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-000f0801.pphosted.com (mx0a-000f0801.pphosted.com [67.231.144.122]) by dpdk.org (Postfix) with ESMTP id 85F31282 for ; Tue, 3 Jan 2017 14:52:53 +0100 (CET) Received: from pps.filterd (m0000542.ppops.net [127.0.0.1]) by mx0a-000f0801.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id v03DZV3Q024050; Tue, 3 Jan 2017 05:52:51 -0800 Received: from brmwp-exmb12.corp.brocade.com ([208.47.132.227]) by mx0a-000f0801.pphosted.com with ESMTP id 27pcy1q3gm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2017 05:52:51 -0800 Received: from [10.252.139.5] (10.252.139.5) by BRMWP-EXMB12.corp.brocade.com (172.16.59.130) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 3 Jan 2017 06:52:49 -0700 To: Yuanhan Liu References: <1483297317-20315-1-git-send-email-ciwillia@brocade.com> <20170103082215.GC21228@yliu-dev.sh.intel.com> CC: , From: "Charles (Chas) Williams" Message-ID: Date: Tue, 3 Jan 2017 08:52:48 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170103082215.GC21228@yliu-dev.sh.intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: hq1wp-excas12.corp.brocade.com (10.70.38.22) To BRMWP-EXMB12.corp.brocade.com (172.16.59.130) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-01-03_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1701030217 Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/vhost: create datagram sockets immediately 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: Tue, 03 Jan 2017 13:52:53 -0000 On 01/03/2017 03:22 AM, Yuanhan Liu wrote: > On Sun, Jan 01, 2017 at 02:01:56PM -0500, Charles (Chas) Williams wrote: >> If you create a vhost server device, it doesn't create the actual datagram >> socket until you call .dev_start(). If you call .dev_stop() is also >> deletes those sockets. For QEMU clients, this is a problem since QEMU >> doesn't know how to re-attach to datagram sockets that have gone away. >> >> To work around this, register and unregister the datagram sockets during > > I will not call it's a "workaround", instead, it's a "fix" to me. OK. >> device creation and removal. >> >> Fixes: ee584e9710b9 ("vhost: add driver on top of the library") >> >> Signed-off-by: Chas Williams >> --- >> drivers/net/vhost/rte_eth_vhost.c | 43 ++++++++++++++++----------------------- >> 1 file changed, 17 insertions(+), 26 deletions(-) >> >> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c >> index 60b0f51..6b11e40 100644 >> --- a/drivers/net/vhost/rte_eth_vhost.c >> +++ b/drivers/net/vhost/rte_eth_vhost.c >> @@ -114,8 +114,6 @@ struct pmd_internal { >> char *iface_name; >> uint16_t max_queues; >> uint64_t flags; > > I think the "flags" could also be dropped in this patch: no user any > more. Sorry, I hadn't noticed that -- Yes, it can go away.