From 427ceb0fecf7afcfd76ae65f7197188b2842d385 Mon Sep 17 00:00:00 2001 From: Chris Kenna Date: Thu, 4 Apr 2019 10:21:26 -0500 Subject: e1000: Never increment the RX undersize count register 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. Fixes: 3b2743017749 ("e1000: Implementing various counters") Reviewed-by: Mark Kanda Reviewed-by: Bhavesh Davda Reviewed-by: Stefano Garzarella Signed-off-by: Chris Kenna Signed-off-by: Jason Wang --- hw/net/e1000.c | 1 - 1 file changed, 1 deletion(-) (limited to 'hw/net/e1000.c') diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 9b39bcc..121452d 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -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; -- cgit v1.1