qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 5d6172: rtl8139: remove duplicate net/eth.h d


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 5d6172: rtl8139: remove duplicate net/eth.h definitions
Date: Thu, 03 Sep 2015 04:30:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 5d61721a621ef28d2f43fb5008afd38376be552b
      
https://github.com/qemu/qemu/commit/5d61721a621ef28d2f43fb5008afd38376be552b
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-09-02 (Wed, 02 Sep 2015)

  Changed paths:
    M hw/net/rtl8139.c

  Log Message:
  -----------
  rtl8139: remove duplicate net/eth.h definitions

The transmit offload features inspect Ethernet, IP, TCP, and UDP
headers.  Avoid redefining these net/eth.h structs.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Jason Wang <address@hidden>
Message-id: address@hidden


  Commit: 1bf11332c4770e2750247733c713a4e771047282
      
https://github.com/qemu/qemu/commit/1bf11332c4770e2750247733c713a4e771047282
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-09-02 (Wed, 02 Sep 2015)

  Changed paths:
    M hw/net/rtl8139.c

  Log Message:
  -----------
  rtl8139: use net/eth.h macros instead of custom macros

Eliminate the following "custom" macros since they are just duplicates
of net/eth.h macros under a different name:

  ETHER_ADDR_LEN -> ETH_ALEN
  ETH_P_8021Q -> ETH_P_VLAN
  IP_HEADER_LENGTH -> IP_HDR_GET_LEN
  TCP_FLAG_FIN -> TH_FIN
  TCP_FLAG_PUSH -> TH_PUSH

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Jason Wang <address@hidden>
Message-id: address@hidden


  Commit: 26c0114d3f69c3accaf83d56ff1d850bd0213b58
      
https://github.com/qemu/qemu/commit/26c0114d3f69c3accaf83d56ff1d850bd0213b58
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-09-02 (Wed, 02 Sep 2015)

  Changed paths:
    M hw/net/rtl8139.c

  Log Message:
  -----------
  rtl8139: use ldl/stl wrapper for unaligned 32-bit access

The tx offload feature accesses a 16-bit aligned TCP header struct.  The
32-bit fields must be accessed using ldl/stl wrappers since some host
architectures fault on unaligned access.

Suggested-by: Peter Maydell <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Jason Wang <address@hidden>
Message-id: address@hidden


  Commit: fabdcd3392f16fc666b1d04fc1bbe5f1dbbf10a4
      
https://github.com/qemu/qemu/commit/fabdcd3392f16fc666b1d04fc1bbe5f1dbbf10a4
  Author: Vladislav Yasevich <address@hidden>
  Date:   2015-09-02 (Wed, 02 Sep 2015)

  Changed paths:
    M hw/net/rtl8139.c

  Log Message:
  -----------
  rtl8139: Fix receive buffer overflow check

rtl8139_do_receive() tries to check for the overflow condition
by making sure that packet_size + 8 does not exceed the
available buffer space.  The issue here is that RxBuffAddr,
used to calculate available buffer space, is aligned to a
a 4 byte boundry after every update.  So it is possible that
every packet ends up being slightly padded when written
to the receive buffer.  This padding is not taken into
account when checking for overflow and we may end up missing
the overflow condition can causing buffer overwrite.

This patch takes alignment into consideration when
checking for overflow condition.

Signed-off-by: Vladislav Yasevich <address@hidden>
Reviewed-by: Jason Wang <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 26c4e7ca72d970d120f0f51244bc8d37458512a0
      
https://github.com/qemu/qemu/commit/26c4e7ca72d970d120f0f51244bc8d37458512a0
  Author: Vladislav Yasevich <address@hidden>
  Date:   2015-09-02 (Wed, 02 Sep 2015)

  Changed paths:
    M hw/net/rtl8139.c

  Log Message:
  -----------
  rtl8139: Do not consume the packet during overflow in standard mode.

When operation in standard mode, we currently return the size
of packet during buffer overflow.  This consumes the overflow
packet.  Return 0 instead so we can re-process the overflow packet
when we have room.

This fixes issues with lost/dropped fragments of large messages.

Signed-off-by: Vladislav Yasevich <address@hidden>
Reviewed-by: Jason Wang <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 2734a20b8161831ba68c9166014e00522599d1e2
      
https://github.com/qemu/qemu/commit/2734a20b8161831ba68c9166014e00522599d1e2
  Author: Fam Zheng <address@hidden>
  Date:   2015-09-02 (Wed, 02 Sep 2015)

  Changed paths:
    M hw/net/vmxnet3.c

  Log Message:
  -----------
  vmxnet3: Drop net_vmxnet3_info.can_receive

Commit 6e99c63 ("net/socket: Drop net_socket_can_send") changed the
semantics around .can_receive for sockets to now require the device to
flush queued pkts when transitioning to a .can_receive=true state. But
it's OK to drop incoming packets when the link is not active.

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: c5a93780453e6da919287c17e873c843544ef2a3
      
https://github.com/qemu/qemu/commit/c5a93780453e6da919287c17e873c843544ef2a3
  Author: Fam Zheng <address@hidden>
  Date:   2015-09-02 (Wed, 02 Sep 2015)

  Changed paths:
    M hw/net/ne2000-isa.c
    M hw/net/ne2000.c
    M hw/net/ne2000.h

  Log Message:
  -----------
  ne2000: Drop ne2000_can_receive

ne2000_receive already checks the same conditions and drops the packet
if it's not ready, removing the .can_receive callback avoids the
necessity to add explicit flushes when the conditions turn true (which
is required by the new semantics of .can_receive since 6e99c63
"net/socket: Drop net_socket_can_send").

Plus the "return 1" if E8390_STOP is also suspicious.

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 654cd2c5841d70e8053b39fb1a9162d5c113326b
      
https://github.com/qemu/qemu/commit/654cd2c5841d70e8053b39fb1a9162d5c113326b
  Author: Peter Maydell <address@hidden>
  Date:   2015-09-03 (Thu, 03 Sep 2015)

  Changed paths:
    M hw/net/ne2000-isa.c
    M hw/net/ne2000.c
    M hw/net/ne2000.h
    M hw/net/rtl8139.c
    M hw/net/vmxnet3.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into 
staging

# gpg: Signature made Wed 02 Sep 2015 17:14:40 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg:                 aka "Stefan Hajnoczi <address@hidden>"

* remotes/stefanha/tags/net-pull-request:
  ne2000: Drop ne2000_can_receive
  vmxnet3: Drop net_vmxnet3_info.can_receive
  rtl8139: Do not consume the packet during overflow in standard mode.
  rtl8139: Fix receive buffer overflow check
  rtl8139: use ldl/stl wrapper for unaligned 32-bit access
  rtl8139: use net/eth.h macros instead of custom macros
  rtl8139: remove duplicate net/eth.h definitions

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/0eac5986fc4c...654cd2c5841d

reply via email to

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