From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bprlB-00038f-Rj for qemu-devel@nongnu.org; Fri, 30 Sep 2016 02:57:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bprl6-0003B6-9J for qemu-devel@nongnu.org; Fri, 30 Sep 2016 02:57:28 -0400 Received: from [59.151.112.132] (port=35338 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bprl5-0003Ai-QH for qemu-devel@nongnu.org; Fri, 30 Sep 2016 02:57:24 -0400 References: <1473839464-8670-1-git-send-email-caoj.fnst@cn.fujitsu.com> <1473839464-8670-9-git-send-email-caoj.fnst@cn.fujitsu.com> <87k2du7oo7.fsf@dusky.pond.sub.org> From: Cao jin Message-ID: <57EE0CFB.4070002@cn.fujitsu.com> Date: Fri, 30 Sep 2016 14:58:03 +0800 MIME-Version: 1.0 In-Reply-To: <87k2du7oo7.fsf@dusky.pond.sub.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 8/8] vmxnet3: remove unnecessary internal msix state flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Dmitry Fleytman , Marcel Apfelbaum , Jason Wang , "Michael S. Tsirkin" On 09/29/2016 10:42 PM, Markus Armbruster wrote: > Cao jin writes: > >> static int vmxnet3_post_load(void *opaque, int version_id) >> { >> VMXNET3State *s = opaque; >> - PCIDevice *d = PCI_DEVICE(s); >> >> net_tx_pkt_init(&s->tx_pkt, PCI_DEVICE(s), >> s->max_tx_frags, s->peer_has_vhdr); >> net_rx_pkt_init(&s->rx_pkt, s->peer_has_vhdr); >> >> - if (s->msix_used) { >> - if (!vmxnet3_use_msix_vectors(s, VMXNET3_MAX_INTRS)) { >> - VMW_WRPRN("Failed to re-use MSI-X vectors"); >> - msix_uninit(d, &s->msix_bar, &s->msix_bar); >> - s->msix_used = false; >> - return -1; >> - } >> - } >> - >> vmxnet3_validate_queues(s); >> vmxnet3_validate_interrupts(s); > > This hunk isn't obvious. Can you explain the change? > flag msix_used is used in VMStateDescription.post_Load(). 1st, I think msix's code here is not necessary, because in destination, device has been realized before incoming migration, So I don't know why re-use MSI-X vectors here. Dmitry, could help to explain? 2nd, this patch is going to remove this flag, so I removed the hunk. -- Yours Sincerely, Cao jin