e1000: Never increment the RX undersize count register
PATCH 1/1 e1000: Never increment the RX undersize count register
From: Chris Kenna <[email protected]>
In situations where e1000 receives an undersized Ethernet frame, QEMU increments the emulated "Receive Undersize Count (RUC)" register when padding the frame.
This is incorrect because this an expected scenario (e.g. with VLAN tag stripping) and not an error. As such, QEMU should not increment the emulated RUC.
--- hw/net/e1000.c | 1 - 1 file changed, 1 deletion(-)
hw/net/e1000.c +0 -1
@@ -901,7 +901,6 @@ e1000_receive_iov(NetClientState *nc, const struct iovec *iov, int iovcnt)if (size <sizeof (min_buf)) {iov_to_buf (iov, iovcnt,0 , min_buf, size);memset (&min_buf[size],0 ,sizeof (min_buf) - size); -e1000x_inc_reg_if_not_full (s->mac_reg,RUC ); min_iov.iov_base = filter_buf = min_buf; min_iov.iov_len = size =sizeof (min_buf); iovcnt =1 ;
Signature · 1 line
1.8.3.1
Quoted 10 lines · Mark Kanda
From: Chris Kenna <[email protected]>
In situations where e1000 receives an undersized Ethernet frame, QEMU increments the emulated "Receive Undersize Count (RUC)" register when padding the frame.
This is incorrect because this an expected scenario (e.g. with VLAN tag stripping) and not an error. As such, QEMU should not increment the emulated RUC.
Quoted 8 lines
Fixes 3b2743017749 ("e1000: Implementing various counters")Reviewed-by Mark Kanda <[email protected]>Reviewed-by Bhavesh Davda <[email protected]>Signed-off-by Chris Kenna <[email protected]>--- hw/net/e1000.c | 1 - 1 file changed, 1 deletion(-)
CCing Jason.
LGTM, if we don't discard it, we shouldn't increase the RUC counter.
Thanks,
Stefano
Jason Wang
AppliedQuoted 19 lines · Stefano Garzarella
Quoted 10 lines · Mark Kanda
From: Chris Kenna <[email protected]>
In situations where e1000 receives an undersized Ethernet frame, QEMU increments the emulated "Receive Undersize Count (RUC)" register when padding the frame.
This is incorrect because this an expected scenario (e.g. with VLAN tag stripping) and not an error. As such, QEMU should not increment the emulated RUC.
Quoted 8 lines
Fixes 3b2743017749 ("e1000: Implementing various counters")Reviewed-by Mark Kanda <[email protected]>Reviewed-by Bhavesh Davda <[email protected]>Signed-off-by Chris Kenna <[email protected]>--- hw/net/e1000.c | 1 - 1 file changed, 1 deletion(-)
Quoted 9 lines
CCing Jason.
LGTM, if we don't discard it, we shouldn't increase the RUC counter.
Reviewed-by Stefano Garzarella <[email protected]>Thanks,
Stefano
Applied.
Thanks
Quoted 27 lines · Jason Wang
Quoted 25 lines · Stefano Garzarella
Quoted 10 lines · Mark Kanda
From: Chris Kenna <[email protected]>
In situations where e1000 receives an undersized Ethernet frame, QEMU increments the emulated "Receive Undersize Count (RUC)" register when padding the frame.
This is incorrect because this an expected scenario (e.g. with VLAN tag stripping) and not an error. As such, QEMU should not increment the emulated RUC.
Quoted 8 lines
Fixes 3b2743017749 ("e1000: Implementing various counters")Reviewed-by Mark Kanda <[email protected]>Reviewed-by Bhavesh Davda <[email protected]>Signed-off-by Chris Kenna <[email protected]>---
hw/net/e1000.c| 1 -1 file changed, 1 deletion(-)CCing Jason.
LGTM, if we don't discard it, we shouldn't increase the RUC counter.
Reviewed-by Stefano Garzarella <[email protected]>
Quoted 7 lines
Quoted 3 lines
Thanks,
StefanoApplied.
Thanks
Actually queued for 4.1 consider it was not a series issue.
Thanks