diff options
author | Ed Swierk via Qemu-devel <qemu-devel@nongnu.org> | 2017-11-14 15:23:33 -0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2017-12-22 09:53:23 +0800 |
commit | 7d08c73e7bdc39b10e5f2f5acdce700f17ffe962 (patch) | |
tree | 0fd1481f29ca9201afd24c30a6f500e554ded42e /hw/net/e1000e.c | |
parent | 43ab9a5376c95c61ae898a222c4d04bdf60e239b (diff) |
e1000, e1000e: Move per-packet TX offload flags out of context state
sum_needed and cptse flags are received from the guest within each
transmit data descriptor. They are not part of the offload context;
instead, they determine how to apply a previously received context to
the packet being transmitted:
- If cptse is set, perform both segmentation and checksum offload
using the parameters in the TSO context; otherwise just do checksum
offload. (Currently the e1000 device incorrectly stores only one
context, which will be fixed in a subsequent patch.)
- Depending on the bits set in sum_needed, possibly perform L4
checksum offload and/or IP checksum offload, using the parameters in
the appropriate context.
Move these flags out of struct e1000x_txd_props, which is otherwise
dedicated to storing values from a context descriptor, and into the
per-packet TX struct.
Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/e1000e.c')
-rw-r--r-- | hw/net/e1000e.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index f1af279e8d..191398a3d5 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -556,7 +556,7 @@ static const VMStateDescription e1000e_vmstate_tx = { .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_UINT8(props.sum_needed, struct e1000e_tx), + VMSTATE_UINT8(sum_needed, struct e1000e_tx), VMSTATE_UINT8(props.ipcss, struct e1000e_tx), VMSTATE_UINT8(props.ipcso, struct e1000e_tx), VMSTATE_UINT16(props.ipcse, struct e1000e_tx), @@ -569,7 +569,7 @@ static const VMStateDescription e1000e_vmstate_tx = { VMSTATE_INT8(props.ip, struct e1000e_tx), VMSTATE_INT8(props.tcp, struct e1000e_tx), VMSTATE_BOOL(props.tse, struct e1000e_tx), - VMSTATE_BOOL(props.cptse, struct e1000e_tx), + VMSTATE_BOOL(cptse, struct e1000e_tx), VMSTATE_BOOL(skip_cp, struct e1000e_tx), VMSTATE_END_OF_LIST() } |