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 E91171E20; Fri, 24 Nov 2017 19:08:39 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E82FB356D3; Fri, 24 Nov 2017 18:08:38 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-22.ams2.redhat.com [10.36.112.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DB8A614F3; Fri, 24 Nov 2017 18:08:33 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, yliu@fridaylinux.org, tiwei.bie@intel.com, jianfeng.tan@intel.com, vkaplans@redhat.com Cc: stable@dpdk.org, jfreiman@redhat.com, Maxime Coquelin Date: Fri, 24 Nov 2017 19:08:23 +0100 Message-Id: <20171124180826.18439-1-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 24 Nov 2017 18:08:38 +0000 (UTC) Subject: [dpdk-dev] [PATCH v2 0/3] vhost: MQ live-migration fixes 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, 24 Nov 2017 18:08:40 -0000 Sorry, posted the wrong version. Only patch 2 changes in the v2, the log_lock is read-locked is moved after the VHOST_F_LOG_ALL feature check, so that it does not degrade performance when not doing the live-migration. This 3 patches series fixes issues met when doing live-migration with multiple queue pairs. Patch 1 is theorical and unlikely to be reproduced in real use-cases, so it may be safe not to pick it in stable trees. Patch 2 reproduces quite often when lots of packets are being processed. Easiest way to reproduce it is to run DPDK in guest and perform IO loopback with testpmd. This patch targets both v16.11 & v17.11 stable trees, and will require a rework for v16.11 as some dirty logging functions moved from virtio-net.c to vhost.h. I'm not sure of the process here, but I can provide the v16.11 backport if needed. Patch 3 is a regression introduced in v17.11. For a reason I have yet to understand, QEMU sends VHOST_USER_SET_VRING_ADDR requests when live-migration is initiated. The problem is that the vhost-user protocol thread has no way to be sure the PMD threads are accessing the rings or not. As the new addresses sent by QEMU are the same it sent intially, this patch just ignores them. Regards, Maxime Maxime Coquelin (3): vhost: fix fd leak in VHOST_USER_SET_LOG_BASE vhost: protect dirty logging against logging base change vhost: don't invalidate vrings if new addresses are identical lib/librte_vhost/vhost.c | 2 ++ lib/librte_vhost/vhost.h | 14 +++++++++++--- lib/librte_vhost/vhost_user.c | 32 ++++++++++++++++++++++++++++---- 3 files changed, 41 insertions(+), 7 deletions(-) -- 2.14.3