From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9F267D08E for ; Thu, 27 Apr 2017 10:32:44 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CC85E81F03; Thu, 27 Apr 2017 08:32:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CC85E81F03 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=maxime.coquelin@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CC85E81F03 Received: from [10.36.112.43] (ovpn-112-43.ams2.redhat.com [10.36.112.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C08B99466; Thu, 27 Apr 2017 08:32:42 +0000 (UTC) To: "Yang, Zhiyong" , "dev@dpdk.org" Cc: "yuanhan.liu@linux.intel.com" , "Loftus, Ciara" , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= References: <1493274893-40764-1-git-send-email-zhiyong.yang@intel.com> <57212715-6192-dba2-418a-2418a5d14953@redhat.com> <92318dc5-ad68-fa83-cea4-0b739a12a97f@redhat.com> From: Maxime Coquelin Message-ID: Date: Thu, 27 Apr 2017 10:32:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 27 Apr 2017 08:32:44 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] vhost: fix MQ fails to startup 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, 27 Apr 2017 08:32:45 -0000 On 04/27/2017 10:24 AM, Yang, Zhiyong wrote: > Hi, Maxime: > >> -----Original Message----- >> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com] >> Sent: Thursday, April 27, 2017 4:05 PM >> To: Yang, Zhiyong ; dev@dpdk.org >> Cc: yuanhan.liu@linux.intel.com; Loftus, Ciara ; Marc- >> André Lureau >> Subject: Re: [PATCH] vhost: fix MQ fails to startup >> >> >> >> On 04/27/2017 09:56 AM, Maxime Coquelin wrote: >>> Hi Zhiyong, >>> >>> +Marc-André >>> >>> On 04/27/2017 08:34 AM, Zhiyong Yang wrote: >>>> vhost since dpdk17.02 + qemu2.7 and above will cause failures of new >>>> connection when negotiating to set MQ. (one queue pair works >>>> well).Because there exist some bugs in qemu code when introducing >>>> VHOST_USER_PROTOCOL_F_REPLY_ACK to qemu. when dealing with the >> vhost >>>> message VHOST_USER_SET_MEM_TABLE for the second time, qemu indeed >>>> doesn't send the messge (The message needs to be sent only once)but >>>> still will be waiting for dpdk's reply ack, then, qemu is always >>>> freezing. DPDK code works in the right way. >>> >>> I'm looking at Qemu's vhost_user_set_mem_table() function, but fail to >>> see how it could wait for the reply-ack if it didn't send the >>> VHOST_USER_SET_MEM_TABLE request before. >> >> Oh, sorry, I get it now. >> Are you working for a fix in Qemu, or have you already reported the problem? > > I will send bug fix patch to Qemu. > The same wrong code has also been used when Qemu2.9 introduce the MTU negotiation with DPDK. > I will fix them at the same time in qemu. I think the problem must be fixed generally and not per request. Maybe in vhost_user_write() if one-time request, just clear the VHOST_USER_NEED_REPLY flag. Then, in process_message_reply(), return early if this flag isn't set. But that is not enough because as said, even if fixed, the backend has no way to know about it. > Thanks > Zhiyong > >> >> Thanks, >> Maxime