qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1192464] [NEW] udp checksum computed as 0 not converted to 0xffff, from guest os that share a common linux bridge among multiple guest os
@ 2013-06-19  7:14 bk.rakesh
  2019-10-23  7:58 ` [Bug 1192464] " Thomas Huth
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bk.rakesh @ 2013-06-19  7:14 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

UDP checksum computed as '0' during transmission of packets that uses
e1000 NIC in the Guest as well as emulated h/w in the qemu layer, That
needs to be converted to 0xffff, This occurs only when Hardware checksum
offload is been set in the guest OS NIC and made it as a transmitter.
The guest O.S use the N/W interface that is been shared to the linux
brige created in the host (used source=<bridge>) in the xml tags of
libvirt.

As per RFC768(http://tools.ietf.org/html/rfc768 [^]), If the computed
checksum is zero, it is transmitted as all ones (the equivalent in one's
complement arithmetic). An all zero transmitted checksum value means
that the transmitter generated no checksum (for debugging or for higher
level protocols that don't care).

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1192464

Title:
  udp checksum computed as 0 not converted to 0xffff, from guest os that
  share a common linux bridge among multiple guest os

Status in QEMU:
  New

Bug description:
  UDP checksum computed as '0' during transmission of packets that uses
  e1000 NIC in the Guest as well as emulated h/w in the qemu layer, That
  needs to be converted to 0xffff, This occurs only when Hardware
  checksum offload is been set in the guest OS NIC and made it as a
  transmitter. The guest O.S use the N/W interface that is been shared
  to the linux brige created in the host (used source=<bridge>) in the
  xml tags of libvirt.

  As per RFC768(http://tools.ietf.org/html/rfc768 [^]), If the computed
  checksum is zero, it is transmitted as all ones (the equivalent in
  one's complement arithmetic). An all zero transmitted checksum value
  means that the transmitter generated no checksum (for debugging or for
  higher level protocols that don't care).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1192464/+subscriptions

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

* [Bug 1192464] Re: udp checksum computed as 0 not converted to 0xffff,  from guest os that share a common linux bridge among multiple guest os
  2013-06-19  7:14 [Qemu-devel] [Bug 1192464] [NEW] udp checksum computed as 0 not converted to 0xffff, from guest os that share a common linux bridge among multiple guest os bk.rakesh
@ 2019-10-23  7:58 ` Thomas Huth
  2019-10-23  7:59 ` Thomas Huth
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2019-10-23  7:58 UTC (permalink / raw)
  To: qemu-devel

Triaging old buck tickets ... can you still reproduce this issue with
the latest version of QEMU? Is it only happening with e1000 or also with
other NICs? What kind of network backend are you using (--netdev user ?
tap ? ....). Could you please provide the full command line that you use
to run QEMU? Thanks!

** Changed in: qemu
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1192464

Title:
  udp checksum computed as 0 not converted to 0xffff, from guest os that
  share a common linux bridge among multiple guest os

Status in QEMU:
  Incomplete

Bug description:
  UDP checksum computed as '0' during transmission of packets that uses
  e1000 NIC in the Guest as well as emulated h/w in the qemu layer, That
  needs to be converted to 0xffff, This occurs only when Hardware
  checksum offload is been set in the guest OS NIC and made it as a
  transmitter. The guest O.S use the N/W interface that is been shared
  to the linux brige created in the host (used source=<bridge>) in the
  xml tags of libvirt.

  As per RFC768(http://tools.ietf.org/html/rfc768 [^]), If the computed
  checksum is zero, it is transmitted as all ones (the equivalent in
  one's complement arithmetic). An all zero transmitted checksum value
  means that the transmitter generated no checksum (for debugging or for
  higher level protocols that don't care).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1192464/+subscriptions


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

* [Bug 1192464] Re: udp checksum computed as 0 not converted to 0xffff,  from guest os that share a common linux bridge among multiple guest os
  2013-06-19  7:14 [Qemu-devel] [Bug 1192464] [NEW] udp checksum computed as 0 not converted to 0xffff, from guest os that share a common linux bridge among multiple guest os bk.rakesh
  2019-10-23  7:58 ` [Bug 1192464] " Thomas Huth
@ 2019-10-23  7:59 ` Thomas Huth
  2019-10-23  8:50 ` Michal Suchanek
  2019-10-23 11:33 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2019-10-23  7:59 UTC (permalink / raw)
  To: qemu-devel

Sorry, I meant "bug tickets", of course, not "buck tickets" ... need
more coffee...

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1192464

Title:
  udp checksum computed as 0 not converted to 0xffff, from guest os that
  share a common linux bridge among multiple guest os

Status in QEMU:
  Incomplete

Bug description:
  UDP checksum computed as '0' during transmission of packets that uses
  e1000 NIC in the Guest as well as emulated h/w in the qemu layer, That
  needs to be converted to 0xffff, This occurs only when Hardware
  checksum offload is been set in the guest OS NIC and made it as a
  transmitter. The guest O.S use the N/W interface that is been shared
  to the linux brige created in the host (used source=<bridge>) in the
  xml tags of libvirt.

  As per RFC768(http://tools.ietf.org/html/rfc768 [^]), If the computed
  checksum is zero, it is transmitted as all ones (the equivalent in
  one's complement arithmetic). An all zero transmitted checksum value
  means that the transmitter generated no checksum (for debugging or for
  higher level protocols that don't care).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1192464/+subscriptions


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

* [Bug 1192464] Re: udp checksum computed as 0 not converted to 0xffff,  from guest os that share a common linux bridge among multiple guest os
  2013-06-19  7:14 [Qemu-devel] [Bug 1192464] [NEW] udp checksum computed as 0 not converted to 0xffff, from guest os that share a common linux bridge among multiple guest os bk.rakesh
  2019-10-23  7:58 ` [Bug 1192464] " Thomas Huth
  2019-10-23  7:59 ` Thomas Huth
@ 2019-10-23  8:50 ` Michal Suchanek
  2019-10-23 11:33 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 5+ messages in thread
From: Michal Suchanek @ 2019-10-23  8:50 UTC (permalink / raw)
  To: qemu-devel

Question is where is this zero checksum observed which is not clear from
the report.

If in the guest it is certainly correct.

If in the host it is correct so long as the bridge appears to have
checksum offloading as well. If whatever interface the guest packets
appear to come from is not set up with checksum offloading this is a bug
which should be fixed by setting the offload flags to match the guest.

If outside the host this is a problem.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1192464

Title:
  udp checksum computed as 0 not converted to 0xffff, from guest os that
  share a common linux bridge among multiple guest os

Status in QEMU:
  Incomplete

Bug description:
  UDP checksum computed as '0' during transmission of packets that uses
  e1000 NIC in the Guest as well as emulated h/w in the qemu layer, That
  needs to be converted to 0xffff, This occurs only when Hardware
  checksum offload is been set in the guest OS NIC and made it as a
  transmitter. The guest O.S use the N/W interface that is been shared
  to the linux brige created in the host (used source=<bridge>) in the
  xml tags of libvirt.

  As per RFC768(http://tools.ietf.org/html/rfc768 [^]), If the computed
  checksum is zero, it is transmitted as all ones (the equivalent in
  one's complement arithmetic). An all zero transmitted checksum value
  means that the transmitter generated no checksum (for debugging or for
  higher level protocols that don't care).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1192464/+subscriptions


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

* [Bug 1192464] Re: udp checksum computed as 0 not converted to 0xffff,  from guest os that share a common linux bridge among multiple guest os
  2013-06-19  7:14 [Qemu-devel] [Bug 1192464] [NEW] udp checksum computed as 0 not converted to 0xffff, from guest os that share a common linux bridge among multiple guest os bk.rakesh
                   ` (2 preceding siblings ...)
  2019-10-23  8:50 ` Michal Suchanek
@ 2019-10-23 11:33 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-10-23 11:33 UTC (permalink / raw)
  To: qemu-devel

Fixed:

commit 0dacea92d26c31d453c58de2e99c178fee554166
Author: Ed Swierk <eswierk@skyportsystems.com>
Date:   Thu Nov 16 06:06:06 2017 -0800

    net: Transmit zero UDP checksum as 0xFFFF
    
    The checksum algorithm used by IPv4, TCP and UDP allows a zero value
    to be represented by either 0x0000 and 0xFFFF. But per RFC 768, a zero
    UDP checksum must be transmitted as 0xFFFF because 0x0000 is a special
    value meaning no checksum.
    
    Substitute 0xFFFF whenever a checksum is computed as zero when
    modifying a UDP datagram header. Doing this on IPv4 and TCP checksums
    is unnecessary but legal. Add a wrapper for net_checksum_finish() that
    makes the substitution.
    
    (We can't just change net_checksum_finish(), as that function is also
    used by receivers to verify checksums, and in that case the expected
    value is always 0x0000.)
    
    Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>

** Changed in: qemu
       Status: Incomplete => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1192464

Title:
  udp checksum computed as 0 not converted to 0xffff, from guest os that
  share a common linux bridge among multiple guest os

Status in QEMU:
  Fix Released

Bug description:
  UDP checksum computed as '0' during transmission of packets that uses
  e1000 NIC in the Guest as well as emulated h/w in the qemu layer, That
  needs to be converted to 0xffff, This occurs only when Hardware
  checksum offload is been set in the guest OS NIC and made it as a
  transmitter. The guest O.S use the N/W interface that is been shared
  to the linux brige created in the host (used source=<bridge>) in the
  xml tags of libvirt.

  As per RFC768(http://tools.ietf.org/html/rfc768 [^]), If the computed
  checksum is zero, it is transmitted as all ones (the equivalent in
  one's complement arithmetic). An all zero transmitted checksum value
  means that the transmitter generated no checksum (for debugging or for
  higher level protocols that don't care).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1192464/+subscriptions


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

end of thread, other threads:[~2019-10-23 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-19  7:14 [Qemu-devel] [Bug 1192464] [NEW] udp checksum computed as 0 not converted to 0xffff, from guest os that share a common linux bridge among multiple guest os bk.rakesh
2019-10-23  7:58 ` [Bug 1192464] " Thomas Huth
2019-10-23  7:59 ` Thomas Huth
2019-10-23  8:50 ` Michal Suchanek
2019-10-23 11:33 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).