All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] e1000: Never increment the RX undersize count register
@ 2019-04-04 15:21 Mark Kanda
  2019-04-05 10:31   ` Stefano Garzarella
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Kanda @ 2019-04-04 15:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: bhavesh.davda, Chris Kenna

From: Chris Kenna <chris.kenna@oracle.com>

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 <mark.kanda@oracle.com>
Reviewed-by: Bhavesh Davda <bhavesh.davda@oracle.com>
Signed-off-by: Chris Kenna <chris.kenna@oracle.com>
---
 hw/net/e1000.c | 1 -
 1 file changed, 1 deletion(-)

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;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] e1000: Never increment the RX undersize count register
@ 2019-04-05 10:31   ` Stefano Garzarella
  0 siblings, 0 replies; 7+ messages in thread
From: Stefano Garzarella @ 2019-04-05 10:31 UTC (permalink / raw)
  To: Mark Kanda; +Cc: Jason Wang, qemu-devel, bhavesh.davda, Chris Kenna

On Thu, Apr 04, 2019 at 10:21:26AM -0500, Mark Kanda wrote:
> From: Chris Kenna <chris.kenna@oracle.com>
> 
> 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 <mark.kanda@oracle.com>
> Reviewed-by: Bhavesh Davda <bhavesh.davda@oracle.com>
> Signed-off-by: Chris Kenna <chris.kenna@oracle.com>
> ---
>  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 <sgarzare@redhat.com>

Thanks,
Stefano

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] e1000: Never increment the RX undersize count register
@ 2019-04-05 10:31   ` Stefano Garzarella
  0 siblings, 0 replies; 7+ messages in thread
From: Stefano Garzarella @ 2019-04-05 10:31 UTC (permalink / raw)
  To: Mark Kanda; +Cc: Chris Kenna, Jason Wang, bhavesh.davda, qemu-devel

On Thu, Apr 04, 2019 at 10:21:26AM -0500, Mark Kanda wrote:
> From: Chris Kenna <chris.kenna@oracle.com>
> 
> 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 <mark.kanda@oracle.com>
> Reviewed-by: Bhavesh Davda <bhavesh.davda@oracle.com>
> Signed-off-by: Chris Kenna <chris.kenna@oracle.com>
> ---
>  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 <sgarzare@redhat.com>

Thanks,
Stefano


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] e1000: Never increment the RX undersize count register
@ 2019-04-15  3:29     ` Jason Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Jason Wang @ 2019-04-15  3:29 UTC (permalink / raw)
  To: Stefano Garzarella, Mark Kanda; +Cc: Chris Kenna, bhavesh.davda, qemu-devel


On 2019/4/5 下午6:31, Stefano Garzarella wrote:
> On Thu, Apr 04, 2019 at 10:21:26AM -0500, Mark Kanda wrote:
>> From: Chris Kenna <chris.kenna@oracle.com>
>>
>> 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 <mark.kanda@oracle.com>
>> Reviewed-by: Bhavesh Davda <bhavesh.davda@oracle.com>
>> Signed-off-by: Chris Kenna <chris.kenna@oracle.com>
>> ---
>>   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 <sgarzare@redhat.com>
>
> Thanks,
> Stefano
>

Applied.

Thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] e1000: Never increment the RX undersize count register
@ 2019-04-15  3:29     ` Jason Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Jason Wang @ 2019-04-15  3:29 UTC (permalink / raw)
  To: Stefano Garzarella, Mark Kanda; +Cc: bhavesh.davda, Chris Kenna, qemu-devel


On 2019/4/5 下午6:31, Stefano Garzarella wrote:
> On Thu, Apr 04, 2019 at 10:21:26AM -0500, Mark Kanda wrote:
>> From: Chris Kenna <chris.kenna@oracle.com>
>>
>> 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 <mark.kanda@oracle.com>
>> Reviewed-by: Bhavesh Davda <bhavesh.davda@oracle.com>
>> Signed-off-by: Chris Kenna <chris.kenna@oracle.com>
>> ---
>>   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 <sgarzare@redhat.com>
>
> Thanks,
> Stefano
>

Applied.

Thanks



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] e1000: Never increment the RX undersize count register
@ 2019-04-15  3:35       ` Jason Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Jason Wang @ 2019-04-15  3:35 UTC (permalink / raw)
  To: Stefano Garzarella, Mark Kanda; +Cc: Chris Kenna, bhavesh.davda, qemu-devel


On 2019/4/15 上午11:29, Jason Wang wrote:
>
> On 2019/4/5 下午6:31, Stefano Garzarella wrote:
>> On Thu, Apr 04, 2019 at 10:21:26AM -0500, Mark Kanda wrote:
>>> From: Chris Kenna <chris.kenna@oracle.com>
>>>
>>> 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 <mark.kanda@oracle.com>
>>> Reviewed-by: Bhavesh Davda <bhavesh.davda@oracle.com>
>>> Signed-off-by: Chris Kenna <chris.kenna@oracle.com>
>>> ---
>>>   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 <sgarzare@redhat.com>
>>
>> Thanks,
>> Stefano
>>
>
> Applied.
>
> Thanks


Actually queued for 4.1 consider it was not a series issue.

Thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] e1000: Never increment the RX undersize count register
@ 2019-04-15  3:35       ` Jason Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Jason Wang @ 2019-04-15  3:35 UTC (permalink / raw)
  To: Stefano Garzarella, Mark Kanda; +Cc: bhavesh.davda, Chris Kenna, qemu-devel


On 2019/4/15 上午11:29, Jason Wang wrote:
>
> On 2019/4/5 下午6:31, Stefano Garzarella wrote:
>> On Thu, Apr 04, 2019 at 10:21:26AM -0500, Mark Kanda wrote:
>>> From: Chris Kenna <chris.kenna@oracle.com>
>>>
>>> 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 <mark.kanda@oracle.com>
>>> Reviewed-by: Bhavesh Davda <bhavesh.davda@oracle.com>
>>> Signed-off-by: Chris Kenna <chris.kenna@oracle.com>
>>> ---
>>>   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 <sgarzare@redhat.com>
>>
>> Thanks,
>> Stefano
>>
>
> Applied.
>
> Thanks


Actually queued for 4.1 consider it was not a series issue.

Thanks



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-04-15  3:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-04 15:21 [Qemu-devel] [PATCH] e1000: Never increment the RX undersize count register Mark Kanda
2019-04-05 10:31 ` Stefano Garzarella
2019-04-05 10:31   ` Stefano Garzarella
2019-04-15  3:29   ` Jason Wang
2019-04-15  3:29     ` Jason Wang
2019-04-15  3:35     ` Jason Wang
2019-04-15  3:35       ` Jason Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.