From patchwork Thu Dec 26 04:36:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuri Benditovich X-Patchwork-Id: 11310341 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F64F14E3 for ; Thu, 26 Dec 2019 04:38:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13D792075E for ; Thu, 26 Dec 2019 04:38:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=daynix-com.20150623.gappssmtp.com header.i=@daynix-com.20150623.gappssmtp.com header.b="BqZJWxaj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13D792075E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=daynix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikKv0-0002NR-89 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 Dec 2019 23:38:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54036) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikKtQ-0000AV-P7 for qemu-devel@nongnu.org; Wed, 25 Dec 2019 23:37:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ikKtP-0002tZ-Bk for qemu-devel@nongnu.org; Wed, 25 Dec 2019 23:37:00 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:36350) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ikKtP-0002t3-5q for qemu-devel@nongnu.org; Wed, 25 Dec 2019 23:36:59 -0500 Received: by mail-wr1-x441.google.com with SMTP id z3so22819671wru.3 for ; Wed, 25 Dec 2019 20:36:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YtUVsfYfPI32c80SGOAiyBMd/9ynOy9lw1vc9As+J08=; b=BqZJWxajH6ROdydX7EYEwrlQ8jSQL79WW2XjmQNV/SWH0JfYy2dzHdOc1X9rBLiJtj OEHJSCztzVwTaZSVp3+L4mhFjM2U4rGP9xcVEM65wHHN+an1vsXeM1fr+lGjkmnWCaWW glN53a5nhkLcF+piRVY8wOvtvlEF11pxcl6PlmfJcGs3rGwDl5LnXxRvnUQwVoSAon52 PzTpQXyMOU0RW7AoBGmsr0o+nyWKEIVqyuOMuu+35AS460nZ7wJZCvFcry6XKUzQFomS b5zigwX1BhA2E2neMiC1H+V5v3Y/wXIOJSyheu7AqIw5C7/gftplzU2C13iO4fi9q5Qx 1kvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YtUVsfYfPI32c80SGOAiyBMd/9ynOy9lw1vc9As+J08=; b=YzZoBq30FGPyNoJNnFnM9g/Gaw27qHDRXPCY4f9ZLYZL2R2x7+7fWLJ32QScfI+oMA E/HFgOjpe0o4jEx3S8FPvHUnLPPRH96ShSkdAjebnFD2cgIHlnIP4EMlCytF1G3Okg4z luOvifxX8KpTxXzPOVV5iwO0CHLH2SFnC99l3+yajt3ksi9peqIaxVM8WZTGzCpqjHHX YjG7XYrb0eYS40HBgp66ryaVL+kPg7RpTBKRXjUP6I7xFVdQVtLEbOZwTozzn5fODkpa AyRCi13nHIuWyHHQZ+8NDnJqMTp1xqk7nU25eEA4PGV6ylATQbkl/LOIrjADryi6/lfN 0gew== X-Gm-Message-State: APjAAAWmYsHKY1oQCTTOL1C4fztjpHC0bIUK+I/taHtHqmMSPSEzwY0k zZpAz7i0D189wCWR1DYI8Tf/Tw== X-Google-Smtp-Source: APXvYqyLBhd5NfXP9oNc9d+bZVOqm62zi5BuCfLtRl6g4V/Gij3u12N1FrZ4Yj95j7roYACYL4lKlA== X-Received: by 2002:a5d:4847:: with SMTP id n7mr43129899wrs.30.1577335018238; Wed, 25 Dec 2019 20:36:58 -0800 (PST) Received: from f2.redhat.com (bzq-79-182-106-171.red.bezeqint.net. [79.182.106.171]) by smtp.gmail.com with ESMTPSA id a1sm29428800wrr.80.2019.12.25.20.36.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Dec 2019 20:36:57 -0800 (PST) From: Yuri Benditovich To: mst@redhat.com, jasowang@redhat.com, qemu-devel@nongnu.org Subject: [PATCH 2/2] virtio-net: delete also control queue when TX/RX deleted Date: Thu, 26 Dec 2019 06:36:49 +0200 Message-Id: <20191226043649.14481-3-yuri.benditovich@daynix.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191226043649.14481-1-yuri.benditovich@daynix.com> References: <20191226043649.14481-1-yuri.benditovich@daynix.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yan@daynix.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" https://bugzilla.redhat.com/show_bug.cgi?id=1708480 If the control queue is not deleted together with TX/RX, it later will be ignored in freeing cache resources and hot unplug will not be completed. Signed-off-by: Yuri Benditovich --- hw/net/virtio-net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index db3d7c38e6..f325440d01 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3101,7 +3101,8 @@ static void virtio_net_device_unrealize(DeviceState *dev, Error **errp) for (i = 0; i < max_queues; i++) { virtio_net_del_queue(n, i); } - + /* delete also control vq */ + virtio_del_queue(vdev, max_queues * 2); qemu_announce_timer_del(&n->announce_timer, false); g_free(n->vqs); qemu_del_nic(n->nic);