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 CF0811B03C for ; Fri, 8 Dec 2017 17:11:35 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 255B95BDF3; Fri, 8 Dec 2017 16:11:35 +0000 (UTC) Received: from [10.36.112.38] (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 00DDF92316; Fri, 8 Dec 2017 16:11:32 +0000 (UTC) To: Agota Benyhe , dev@dpdk.org Cc: Patrik Andersson R , Yuanhan Liu , Jianfeng Tan References: <1512464838-17300-1-git-send-email-agota.benyhe@ericsson.com> <1512473433-18170-1-git-send-email-agota.benyhe@ericsson.com> From: Maxime Coquelin Message-ID: <0d909636-0757-b028-85b3-5ee9e1d8e637@redhat.com> Date: Fri, 8 Dec 2017 17:11:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1512473433-18170-1-git-send-email-agota.benyhe@ericsson.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 08 Dec 2017 16:11:35 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v2] virtio_net: kick guest even when virtio queue is full 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, 08 Dec 2017 16:11:36 -0000 Hi Agota, Patrick, On 12/05/2017 12:30 PM, Agota Benyhe wrote: > From: Patrik Andersson R > > Changing the vring call file descriptor during virtio device enqueue > operation may lead to "kick" on a file descriptor that is closed. As > a consequence the guest might not be notified of new packets in the > enqueue. > > The suggested change will add some extra load on DPDK and on the > guest if the queue is frequently full. Any application using DPDK > should avoid attempting retransmissions when the zero packets are > enqueued. > > To overcome this problem, the kick operation in virtio_dev_merge_rx() > was excluded from the pkt_idx > 0 condition. A similar change was > done in virtio_dev_rx(). > > Signed-off-by: Patrik Andersson R > Signed-off-by: Agota Benyhe > --- > lib/librte_vhost/virtio_net.c | 23 +++++++++++++---------- > 1 file changed, 13 insertions(+), 10 deletions(-) We are working on a patch that protects enqueue & dequeue paths from vhost-user requests handling. For your case, it would protect call_fd to be changed while vring is being processed by the PMD thread. Do you think that would solve the problem you are facing? Regards, Maxime