Skip to contentSkip to conversation

rtl8139: save/load RxMulOk counter (again)

PATCH Superseded David Vrabel 2 participants 2 messages Jun 17, 2016 – Jun 20, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtl8139: save/load RxMulOk counter (again)

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'.

---
 hw/net/rtl8139.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/net/rtl8139.c +2 -1
index 562c1fd..243dcd4 100644
@@ -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,
Signature · 1 line
2.1.4
#1 lore raw
Quoted 4 lines · David Vrabel

Commit 9d29cdeaaca3a0383af764000b71492c4fc67c6e (rtl8139: port TallyCounters to vmstate) introduced in incompatibility in the v4 format as it omitted the RxOkMul counter.

Quoted 8 lines

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'.

---
 hw/net/rtl8139.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

CCed Jason Wang, net maintainer.

David: Please CC maintainers so that your patch gets attention. You can use scripts/get_maintainer.pl -f hw/net/rtl8139.c to list maintainers.

Quoted 26 lines
hw/net/rtl8139.c +2 -1
index 562c1fd..243dcd4 100644
@@ -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,
Signature · 1 line
2.1.4