qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-7.2 v3 2/3] rtl8139: keep Tx command mode 0 and 1 separat


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH for-7.2 v3 2/3] rtl8139: keep Tx command mode 0 and 1 separate
Date: Fri, 18 Nov 2022 08:25:30 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 17/11/22 17:55, Stefan Hajnoczi wrote:
There are two Tx Descriptor formats called mode 0 and mode 1. The mode
is determined by the Large Send bit.

CP_TX_IPCS (bit 18) is defined in mode 1 but the code checks the bit
unconditionally. In mode 0 bit 18 is part of the Large Send MSS value.

Explicitly check the Large Send bit to distinguish Tx command modes.
This avoids bugs where modes are confused. Note that I didn't find any
actual bugs aside from needlessly computing the IP checksum when the
Large Send bit is enabled.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
  hw/net/rtl8139.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]