diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-03-28 17:36:25 +0100 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2018-04-10 11:29:35 +0800 |
commit | 4ae4bf5bb16bd8e5b94433db9fe8265d30c53ba3 (patch) | |
tree | a8956a5b45681d9d8aa4fc123abbaf5b925d4061 | |
parent | 915d34c5f99b0ab91517c69f54272bfdb6ca2b32 (diff) |
e1000: Convert v3 fields to subsection
A bunch of new TSO fields were introduced by d62644b4 and this bumped
the VMState version; however it's easier for those trying to keep
backwards migration compatibility if these fields are added in a
subsection instead.
Move the new fields to a subsection.
Since this was added after 2.11, this change will only affect
compatbility with 2.12-rc0.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
-rw-r--r-- | hw/net/e1000.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/hw/net/e1000.c b/hw/net/e1000.c index c7f1695f57..24e9a4ab40 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1433,9 +1433,29 @@ static const VMStateDescription vmstate_e1000_full_mac_state = { } }; +static const VMStateDescription vmstate_e1000_tx_tso_state = { + .name = "e1000/tx_tso_state", + .version_id = 1, + .minimum_version_id = 1, + .fields = (VMStateField[]) { + VMSTATE_UINT8(tx.tso_props.ipcss, E1000State), + VMSTATE_UINT8(tx.tso_props.ipcso, E1000State), + VMSTATE_UINT16(tx.tso_props.ipcse, E1000State), + VMSTATE_UINT8(tx.tso_props.tucss, E1000State), + VMSTATE_UINT8(tx.tso_props.tucso, E1000State), + VMSTATE_UINT16(tx.tso_props.tucse, E1000State), + VMSTATE_UINT32(tx.tso_props.paylen, E1000State), + VMSTATE_UINT8(tx.tso_props.hdr_len, E1000State), + VMSTATE_UINT16(tx.tso_props.mss, E1000State), + VMSTATE_INT8(tx.tso_props.ip, E1000State), + VMSTATE_INT8(tx.tso_props.tcp, E1000State), + VMSTATE_END_OF_LIST() + } +}; + static const VMStateDescription vmstate_e1000 = { .name = "e1000", - .version_id = 3, + .version_id = 2, .minimum_version_id = 1, .pre_save = e1000_pre_save, .post_load = e1000_post_load, @@ -1508,22 +1528,12 @@ static const VMStateDescription vmstate_e1000 = { VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, RA, 32), VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, MTA, 128), VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, VFTA, 128), - VMSTATE_UINT8_V(tx.tso_props.ipcss, E1000State, 3), - VMSTATE_UINT8_V(tx.tso_props.ipcso, E1000State, 3), - VMSTATE_UINT16_V(tx.tso_props.ipcse, E1000State, 3), - VMSTATE_UINT8_V(tx.tso_props.tucss, E1000State, 3), - VMSTATE_UINT8_V(tx.tso_props.tucso, E1000State, 3), - VMSTATE_UINT16_V(tx.tso_props.tucse, E1000State, 3), - VMSTATE_UINT32_V(tx.tso_props.paylen, E1000State, 3), - VMSTATE_UINT8_V(tx.tso_props.hdr_len, E1000State, 3), - VMSTATE_UINT16_V(tx.tso_props.mss, E1000State, 3), - VMSTATE_INT8_V(tx.tso_props.ip, E1000State, 3), - VMSTATE_INT8_V(tx.tso_props.tcp, E1000State, 3), VMSTATE_END_OF_LIST() }, .subsections = (const VMStateDescription*[]) { &vmstate_e1000_mit_state, &vmstate_e1000_full_mac_state, + &vmstate_e1000_tx_tso_state, NULL } }; |