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 D65F53977 for ; Thu, 29 Dec 2016 16:58:15 +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 uBTFcqq4015865; Thu, 29 Dec 2016 07:58:15 -0800 Received: from brmwp-exmb11.corp.brocade.com ([208.47.132.227]) by mx0a-000f0801.pphosted.com with ESMTP id 27kxevna8g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 29 Dec 2016 07:58:14 -0800 Received: from [10.252.139.5] (10.252.139.5) by BRMWP-EXMB11.corp.brocade.com (172.16.59.77) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 29 Dec 2016 08:58:13 -0700 To: Yuanhan Liu References: <1482959452-18486-1-git-send-email-ciwillia@brocade.com> <1482959452-18486-2-git-send-email-ciwillia@brocade.com> <20161229085238.GD21789@yliu-dev.sh.intel.com> From: "Charles (Chas) Williams" CC: , Message-ID: Date: Thu, 29 Dec 2016 10:58:11 -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: <20161229085238.GD21789@yliu-dev.sh.intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: hq1wp-excas14.corp.brocade.com (10.70.38.103) To BRMWP-EXMB11.corp.brocade.com (172.16.59.77) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-12-29_11:, , 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-1612290241 Subject: Re: [dpdk-dev] [PATCH 2/2] vhost: start vhost servers once 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: Thu, 29 Dec 2016 15:58:16 -0000 On 12/29/2016 03:52 AM, Yuanhan Liu wrote: > On Wed, Dec 28, 2016 at 04:10:52PM -0500, Charles (Chas) Williams wrote: >> Start a vhost server once during devinit instead of during device start >> and stop. Some vhost clients, QEMU, don't re-attaching to sockets when >> the vhost server is stopped and later started. Preserve existing behavior >> for vhost clients. > > I didn't quite get the idea what you are going to fix. The issue I am trying to fix is QEMU interaction when DPDK's vhost is acting as a server to QEMU vhost clients. 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, this is a problem since QEMU doesn't know how to re-attach to datagram sockets that have gone away. .dev_start()/.dev_stop() seems to roughly means link up and link down so I understand why you might want to add/remove the datagram sockets. However, in practice, this doesn't seem to make much sense for a DPDK vhost server. This doesn't seem like the right way to indicate link status to vhost clients. It seems like it would just be easier to do this for both clients and servers, but I don't know why it was done this way originally so I choose to keep the client behavior.