From patchwork Fri Jun 17 16:31:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Vrabel X-Patchwork-Id: 9184739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9ABA26075D for ; Fri, 17 Jun 2016 17:51:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8362026538 for ; Fri, 17 Jun 2016 17:51:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 780642837E; Fri, 17 Jun 2016 17:51:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F41D526538 for ; Fri, 17 Jun 2016 17:51:49 +0000 (UTC) Received: from localhost ([::1]:59451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDxvp-0006bi-4o for patchwork-qemu-devel@patchwork.kernel.org; Fri, 17 Jun 2016 13:51:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDwgM-0003Wx-WD for qemu-devel@nongnu.org; Fri, 17 Jun 2016 12:31:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDwgJ-0002Q7-MB for qemu-devel@nongnu.org; Fri, 17 Jun 2016 12:31:46 -0400 Received: from smtp.citrix.com ([66.165.176.89]:26370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDwgJ-0002PQ-Ew for qemu-devel@nongnu.org; Fri, 17 Jun 2016 12:31:43 -0400 X-IronPort-AV: E=Sophos;i="5.26,484,1459814400"; d="scan'208";a="361191426" From: David Vrabel To: Date: Fri, 17 Jun 2016 17:31:30 +0100 Message-ID: <1466181090-30169-1-git-send-email-david.vrabel@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 Subject: [Qemu-devel] [PATCHv1] rtl8139: save/load RxMulOk counter (again) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Vrabel Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Commit 9d29cdeaaca3a0383af764000b71492c4fc67c6e (rtl8139: port TallyCounters to vmstate) introduced in incompatibility in the v4 format as it omitted the RxOkMul counter. There are presumably no users that were impacted by the v4 to v4' breakage, so increase the save version to 5 and re-add the field, keeping backward compatibility with v4'. Signed-off-by: David Vrabel --- hw/net/rtl8139.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 562c1fd..243dcd4 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -1369,6 +1369,7 @@ static const VMStateDescription vmstate_tally_counters = { VMSTATE_UINT32(TxMCol, RTL8139TallyCounters), VMSTATE_UINT64(RxOkPhy, RTL8139TallyCounters), VMSTATE_UINT64(RxOkBrd, RTL8139TallyCounters), + VMSTATE_UINT32_V(RxOkMul, RTL8139TallyCounters, 5), VMSTATE_UINT16(TxAbt, RTL8139TallyCounters), VMSTATE_UINT16(TxUndrn, RTL8139TallyCounters), VMSTATE_END_OF_LIST() @@ -3222,7 +3223,7 @@ static void rtl8139_pre_save(void *opaque) static const VMStateDescription vmstate_rtl8139 = { .name = "rtl8139", - .version_id = 4, + .version_id = 5, .minimum_version_id = 3, .post_load = rtl8139_post_load, .pre_save = rtl8139_pre_save,