Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request'…
Browse files Browse the repository at this point in the history
… into staging

# gpg: Signature made Mon 11 Jan 2016 05:22:16 GMT using RSA key ID 398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request: (24 commits)
  ether/slirp: Avoid redefinition of the same constants
  l2tpv3: fix cookie decoding
  net: ne2000: fix bounds check in ioport operations
  net: rocker: fix an incorrect array bounds check
  vmxnet3: Introduce 'x-disable-pcie' back-compat property
  vmxnet3: Report the Device Serial Number capability
  vmxnet3: The vmxnet3 device is a PCIE endpoint
  vmxnet3: coding: Introduce VMXNET3Class
  vmxnet3: Introduce 'x-old-msi-offsets' back-compat property
  vmxnet3: Change the offset of the MSIX PBA table
  vmxnet3: Change offsets of msi/msix pci capabilities
  net/filter: fix nf->netdev_id leak
  net/dump: fix nfds->filename leak
  net/vmxnet3: rename VMXNET3_DEVICE_VERSION to VMXNET3_UPT_REVISION
  net/vmxnet3: return 0 on unknown command
  net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO
  net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command
  net/vmxnet3: return 1 on device activation failure
  MAINTAINERS: Add an entry for the net/slirp.c file
  net: vmxnet3: avoid memory leakage in activate_device
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Jan 11, 2016
2 parents 10e1b75 + 9c7ffe2 commit cc06ca4
Show file tree
Hide file tree
Showing 13 changed files with 274 additions and 97 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Expand Up @@ -1199,6 +1199,7 @@ SLIRP
M: Jan Kiszka <jan.kiszka@siemens.com>
S: Maintained
F: slirp/
F: net/slirp.c
T: git git://git.kiszka.org/qemu.git queues/slirp

Tracing
Expand Down
10 changes: 6 additions & 4 deletions hw/net/ne2000.c
Expand Up @@ -467,8 +467,9 @@ static inline void ne2000_mem_writel(NE2000State *s, uint32_t addr,
uint32_t val)
{
addr &= ~1; /* XXX: check exact behaviour if not even */
if (addr < 32 ||
(addr >= NE2000_PMEM_START && addr < NE2000_MEM_SIZE)) {
if (addr < 32
|| (addr >= NE2000_PMEM_START
&& addr + sizeof(uint32_t) <= NE2000_MEM_SIZE)) {
stl_le_p(s->mem + addr, val);
}
}
Expand Down Expand Up @@ -497,8 +498,9 @@ static inline uint32_t ne2000_mem_readw(NE2000State *s, uint32_t addr)
static inline uint32_t ne2000_mem_readl(NE2000State *s, uint32_t addr)
{
addr &= ~1; /* XXX: check exact behaviour if not even */
if (addr < 32 ||
(addr >= NE2000_PMEM_START && addr < NE2000_MEM_SIZE)) {
if (addr < 32
|| (addr >= NE2000_PMEM_START
&& addr + sizeof(uint32_t) <= NE2000_MEM_SIZE)) {
return ldl_le_p(s->mem + addr);
} else {
return 0xffffffff;
Expand Down
8 changes: 4 additions & 4 deletions hw/net/rocker/rocker.c
Expand Up @@ -232,6 +232,9 @@ static int tx_consume(Rocker *r, DescInfo *info)
frag_addr = rocker_tlv_get_le64(tlvs[ROCKER_TLV_TX_FRAG_ATTR_ADDR]);
frag_len = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_FRAG_ATTR_LEN]);

if (iovcnt >= ROCKER_TX_FRAGS_MAX) {
goto err_too_many_frags;
}
iov[iovcnt].iov_len = frag_len;
iov[iovcnt].iov_base = g_malloc(frag_len);
if (!iov[iovcnt].iov_base) {
Expand All @@ -244,10 +247,7 @@ static int tx_consume(Rocker *r, DescInfo *info)
err = -ROCKER_ENXIO;
goto err_bad_io;
}

if (++iovcnt > ROCKER_TX_FRAGS_MAX) {
goto err_too_many_frags;
}
iovcnt++;
}

if (iovcnt) {
Expand Down
1 change: 0 additions & 1 deletion hw/net/rtl8139.c
Expand Up @@ -74,7 +74,6 @@
( ( input ) & ( size - 1 ) )

#define ETHER_TYPE_LEN 2
#define ETH_HLEN (ETH_ALEN * 2 + ETHER_TYPE_LEN)
#define ETH_MTU 1500

#define VLAN_TCI_LEN 2
Expand Down
5 changes: 1 addition & 4 deletions hw/net/vmware_utils.h
Expand Up @@ -18,10 +18,7 @@
#define VMWARE_UTILS_H

#include "qemu/range.h"

#ifndef VMW_SHPRN
#define VMW_SHPRN(fmt, ...) do {} while (0)
#endif
#include "vmxnet_debug.h"

/*
* Shared memory access functions with byte swap support
Expand Down

0 comments on commit cc06ca4

Please sign in to comment.