qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/6] Net patches
@ 2015-02-06 14:10 Stefan Hajnoczi
  2015-02-06 16:10 ` Peter Maydell
  0 siblings, 1 reply; 22+ messages in thread
From: Stefan Hajnoczi @ 2015-02-06 14:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

The following changes since commit 16017c48547960539fcadb1f91d252124f442482:

  softfloat: Clarify license status (2015-01-29 16:45:45 +0000)

are available in the git repository at:

  git://github.com/stefanha/qemu.git tags/net-pull-request

for you to fetch changes up to 2c4681f512822b4aa35371683e164d4818f21dce:

  monitor: more accurate completion for host_net_remove() (2015-02-06 14:06:45 +0000)

----------------------------------------------------------------

----------------------------------------------------------------

Jason Wang (4):
  monitor: print hub port name during info network
  net: remove the wrong comment in net_init_hubport()
  net: del hub port when peer is deleted
  monitor: more accurate completion for host_net_remove()

Paolo Bonzini (1):
  rtl8139: simplify timer logic

Stefan Hajnoczi (1):
  MAINTAINERS: add Jason Wang as net subsystem maintainer

 MAINTAINERS      |  1 +
 hw/net/rtl8139.c | 77 ++++++++++++++++++++------------------------------------
 monitor.c        |  5 ++++
 net/hub.c        |  6 +++--
 net/net.c        |  2 ++
 5 files changed, 39 insertions(+), 52 deletions(-)

-- 
2.1.0

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2015-02-06 14:10 Stefan Hajnoczi
@ 2015-02-06 16:10 ` Peter Maydell
  0 siblings, 0 replies; 22+ messages in thread
From: Peter Maydell @ 2015-02-06 16:10 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers

On 6 February 2015 at 14:10, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 16017c48547960539fcadb1f91d252124f442482:
>
>   softfloat: Clarify license status (2015-01-29 16:45:45 +0000)
>
> are available in the git repository at:
>
>   git://github.com/stefanha/qemu.git tags/net-pull-request
>
> for you to fetch changes up to 2c4681f512822b4aa35371683e164d4818f21dce:
>
>   monitor: more accurate completion for host_net_remove() (2015-02-06 14:06:45 +0000)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

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

* [Qemu-devel] [PULL 0/6] Net patches
@ 2017-01-20  3:07 Jason Wang
  2017-01-20  3:07 ` [Qemu-devel] [PULL 1/6] docs: Fix description of the sentence Jason Wang
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Jason Wang @ 2017-01-20  3:07 UTC (permalink / raw)
  To: peter.maydell, qemu-devel; +Cc: Jason Wang

The following changes since commit 0f6bcf68a99efdc531b209551f2b760b0bdcc554:

  Merge remote-tracking branch 'remotes/artyom/tags/pull-sun4v-20170118' into staging (2017-01-19 18:34:13 +0000)

are available in the git repository at:

  https://github.com/jasowang/qemu.git tags/net-pull-request

for you to fetch changes up to fac7d7b1cdb21f921d7ac396365f5e920ef03096:

  tap: fix memory leak on failure in net_init_tap() (2017-01-20 10:58:26 +0800)

----------------------------------------------------------------

----------------------------------------------------------------
Alex Kompel (1):
      hw/pci: use-after-free in pci_nic_init_nofail when nic device fails to initialize

Ladi Prosek (1):
      net: optimize checksum computation

Peter Maydell (2):
      hw/net/dp8393x: Avoid unintentional sign extensions on addresses
      tap: fix memory leak on failure in net_init_tap()

Thomas Huth (1):
      m68k: QOMify the MCF Fast Ethernet Controller device

Zhang Chen (1):
      docs: Fix description of the sentence

 docs/colo-proxy.txt       |  4 +-
 hw/m68k/mcf5208.c         | 25 ++++++++++++-
 hw/net/dp8393x.c          | 95 +++++++++++++++++++++++++++++++++--------------
 hw/net/mcf_fec.c          | 71 ++++++++++++++++++++++++++---------
 hw/pci/pci.c              |  9 +----
 include/hw/m68k/mcf.h     |  4 --
 include/hw/m68k/mcf_fec.h | 13 +++++++
 net/checksum.c            | 21 +++++++----
 net/tap.c                 |  7 +++-
 9 files changed, 180 insertions(+), 69 deletions(-)
 create mode 100644 include/hw/m68k/mcf_fec.h

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

* [Qemu-devel] [PULL 1/6] docs: Fix description of the sentence
  2017-01-20  3:07 [Qemu-devel] [PULL 0/6] Net patches Jason Wang
@ 2017-01-20  3:07 ` Jason Wang
  2017-01-20  3:07 ` [Qemu-devel] [PULL 2/6] net: optimize checksum computation Jason Wang
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 22+ messages in thread
From: Jason Wang @ 2017-01-20  3:07 UTC (permalink / raw)
  To: peter.maydell, qemu-devel; +Cc: Zhang Chen, Eric Blake, Stefan Weil, Jason Wang

From: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>

Say it in another way to make it easier to understand.

Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 docs/colo-proxy.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/colo-proxy.txt b/docs/colo-proxy.txt
index 76767cb..c4941de 100644
--- a/docs/colo-proxy.txt
+++ b/docs/colo-proxy.txt
@@ -158,7 +158,9 @@ secondary.
 
 == Usage ==
 
-Here, we use demo ip and port discribe more clearly.
+Here is an example using demonstration IP and port addresses to more
+clearly describe the usage.
+
 Primary(ip:3.3.3.3):
 -netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
 -device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
-- 
2.7.4

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

* [Qemu-devel] [PULL 2/6] net: optimize checksum computation
  2017-01-20  3:07 [Qemu-devel] [PULL 0/6] Net patches Jason Wang
  2017-01-20  3:07 ` [Qemu-devel] [PULL 1/6] docs: Fix description of the sentence Jason Wang
@ 2017-01-20  3:07 ` Jason Wang
  2017-01-20  3:07 ` [Qemu-devel] [PULL 3/6] m68k: QOMify the MCF Fast Ethernet Controller device Jason Wang
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 22+ messages in thread
From: Jason Wang @ 2017-01-20  3:07 UTC (permalink / raw)
  To: peter.maydell, qemu-devel; +Cc: Ladi Prosek, Jason Wang

From: Ladi Prosek <lprosek@redhat.com>

Very simple loop optimization with a significant performance impact.

Microbenchmark results, modern x86-64:

buffer size | speed up
------------+---------
1500        | 1.7x
64          | 1.5x
8           | 1.15x

Microbenchmark results, POWER7:

buffer size | speed up
------------+---------
1500        | 5x
64          | 3.3x
8           | 1.13x

There is a lot of room for further improvement at the expense of
code complexity - aligned multibyte reads, LE/BE considerations,
architecture-specific optimizations, etc. This patch still keeps
things simple and readable.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 net/checksum.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/net/checksum.c b/net/checksum.c
index 23323b0..4da72a6 100644
--- a/net/checksum.c
+++ b/net/checksum.c
@@ -22,17 +22,22 @@
 
 uint32_t net_checksum_add_cont(int len, uint8_t *buf, int seq)
 {
-    uint32_t sum = 0;
+    uint32_t sum1 = 0, sum2 = 0;
     int i;
 
-    for (i = seq; i < seq + len; i++) {
-        if (i & 1) {
-            sum += (uint32_t)buf[i - seq];
-        } else {
-            sum += (uint32_t)buf[i - seq] << 8;
-        }
+    for (i = 0; i < len - 1; i += 2) {
+        sum1 += (uint32_t)buf[i];
+        sum2 += (uint32_t)buf[i + 1];
+    }
+    if (i < len) {
+        sum1 += (uint32_t)buf[i];
+    }
+
+    if (seq & 1) {
+        return sum1 + (sum2 << 8);
+    } else {
+        return sum2 + (sum1 << 8);
     }
-    return sum;
 }
 
 uint16_t net_checksum_finish(uint32_t sum)
-- 
2.7.4

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

* [Qemu-devel] [PULL 3/6] m68k: QOMify the MCF Fast Ethernet Controller device
  2017-01-20  3:07 [Qemu-devel] [PULL 0/6] Net patches Jason Wang
  2017-01-20  3:07 ` [Qemu-devel] [PULL 1/6] docs: Fix description of the sentence Jason Wang
  2017-01-20  3:07 ` [Qemu-devel] [PULL 2/6] net: optimize checksum computation Jason Wang
@ 2017-01-20  3:07 ` Jason Wang
  2017-01-20  3:07 ` [Qemu-devel] [PULL 4/6] hw/net/dp8393x: Avoid unintentional sign extensions on addresses Jason Wang
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 22+ messages in thread
From: Jason Wang @ 2017-01-20  3:07 UTC (permalink / raw)
  To: peter.maydell, qemu-devel; +Cc: Thomas Huth, Jason Wang

From: Thomas Huth <huth@tuxfamily.org>

When running qemu-system-m68k with the "-net" parameter (for example
simply "-net nic -net user"), there is currently a confusing warning
message saying:

 Warning: requested NIC (anonymous, model mcf_fec) was not created
 (not supported by this machine?)

This seems to happen because the MCF NIC has never been adapted to
the currently expected QEMU device behavior. Thus let's QOMify the
NIC now to get rid of the warning message.

Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 hw/m68k/mcf5208.c         | 25 ++++++++++++++++-
 hw/net/mcf_fec.c          | 71 +++++++++++++++++++++++++++++++++++------------
 include/hw/m68k/mcf.h     |  4 ---
 include/hw/m68k/mcf_fec.h | 13 +++++++++
 4 files changed, 90 insertions(+), 23 deletions(-)
 create mode 100644 include/hw/m68k/mcf_fec.h

diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index 3438314..bad1d33 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -11,6 +11,7 @@
 #include "cpu.h"
 #include "hw/hw.h"
 #include "hw/m68k/mcf.h"
+#include "hw/m68k/mcf_fec.h"
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
 #include "sysemu/sysemu.h"
@@ -18,6 +19,7 @@
 #include "net/net.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
+#include "hw/sysbus.h"
 #include "elf.h"
 #include "exec/address-spaces.h"
 
@@ -192,6 +194,26 @@ static void mcf5208_sys_init(MemoryRegion *address_space, qemu_irq *pic)
     }
 }
 
+static void mcf_fec_init(MemoryRegion *sysmem, NICInfo *nd, hwaddr base,
+                         qemu_irq *irqs)
+{
+    DeviceState *dev;
+    SysBusDevice *s;
+    int i;
+
+    qemu_check_nic_model(nd, TYPE_MCF_FEC_NET);
+    dev = qdev_create(NULL, TYPE_MCF_FEC_NET);
+    qdev_set_nic_properties(dev, nd);
+    qdev_init_nofail(dev);
+
+    s = SYS_BUS_DEVICE(dev);
+    for (i = 0; i < FEC_NUM_IRQ; i++) {
+        sysbus_connect_irq(s, i, irqs[i]);
+    }
+
+    memory_region_add_subregion(sysmem, base, sysbus_mmio_get_region(s, 0));
+}
+
 static void mcf5208evb_init(MachineState *machine)
 {
     ram_addr_t ram_size = machine->ram_size;
@@ -243,9 +265,10 @@ static void mcf5208evb_init(MachineState *machine)
         fprintf(stderr, "Too many NICs\n");
         exit(1);
     }
-    if (nd_table[0].used)
+    if (nd_table[0].used) {
         mcf_fec_init(address_space_mem, &nd_table[0],
                      0xfc030000, pic + 36);
+    }
 
     /*  0xfc000000 SCM.  */
     /*  0xfc004000 XBS.  */
diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c
index 4025eb3..a3eca7e 100644
--- a/hw/net/mcf_fec.c
+++ b/hw/net/mcf_fec.c
@@ -9,7 +9,9 @@
 #include "hw/hw.h"
 #include "net/net.h"
 #include "hw/m68k/mcf.h"
+#include "hw/m68k/mcf_fec.h"
 #include "hw/net/mii.h"
+#include "hw/sysbus.h"
 /* For crc32 */
 #include <zlib.h>
 #include "exec/address-spaces.h"
@@ -27,9 +29,10 @@ do { printf("mcf_fec: " fmt , ## __VA_ARGS__); } while (0)
 #define FEC_MAX_FRAME_SIZE 2032
 
 typedef struct {
-    MemoryRegion *sysmem;
+    SysBusDevice parent_obj;
+
     MemoryRegion iomem;
-    qemu_irq *irq;
+    qemu_irq irq[FEC_NUM_IRQ];
     NICState *nic;
     NICConf conf;
     uint32_t irq_state;
@@ -68,7 +71,6 @@ typedef struct {
 #define FEC_RESET   1
 
 /* Map interrupt flags onto IRQ lines.  */
-#define FEC_NUM_IRQ 13
 static const uint32_t mcf_fec_irq_map[FEC_NUM_IRQ] = {
     FEC_INT_TXF,
     FEC_INT_TXB,
@@ -208,8 +210,10 @@ static void mcf_fec_enable_rx(mcf_fec_state *s)
     }
 }
 
-static void mcf_fec_reset(mcf_fec_state *s)
+static void mcf_fec_reset(DeviceState *dev)
 {
+    mcf_fec_state *s = MCF_FEC_NET(dev);
+
     s->eir = 0;
     s->eimr = 0;
     s->rx_enabled = 0;
@@ -330,7 +334,7 @@ static void mcf_fec_write(void *opaque, hwaddr addr,
         s->ecr = value;
         if (value & FEC_RESET) {
             DPRINTF("Reset\n");
-            mcf_fec_reset(s);
+            mcf_fec_reset(opaque);
         }
         if ((s->ecr & FEC_EN) == 0) {
             s->rx_enabled = 0;
@@ -513,24 +517,55 @@ static NetClientInfo net_mcf_fec_info = {
     .receive = mcf_fec_receive,
 };
 
-void mcf_fec_init(MemoryRegion *sysmem, NICInfo *nd,
-                  hwaddr base, qemu_irq *irq)
+static void mcf_fec_realize(DeviceState *dev, Error **errp)
 {
-    mcf_fec_state *s;
+    mcf_fec_state *s = MCF_FEC_NET(dev);
+
+    s->nic = qemu_new_nic(&net_mcf_fec_info, &s->conf,
+                          object_get_typename(OBJECT(dev)), dev->id, s);
+    qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
+}
 
-    qemu_check_nic_model(nd, "mcf_fec");
+static void mcf_fec_instance_init(Object *obj)
+{
+    SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
+    mcf_fec_state *s = MCF_FEC_NET(obj);
+    int i;
+
+    memory_region_init_io(&s->iomem, obj, &mcf_fec_ops, s, "fec", 0x400);
+    sysbus_init_mmio(sbd, &s->iomem);
+    for (i = 0; i < FEC_NUM_IRQ; i++) {
+        sysbus_init_irq(sbd, &s->irq[i]);
+    }
+}
 
-    s = (mcf_fec_state *)g_malloc0(sizeof(mcf_fec_state));
-    s->sysmem = sysmem;
-    s->irq = irq;
+static Property mcf_fec_properties[] = {
+    DEFINE_NIC_PROPERTIES(mcf_fec_state, conf),
+    DEFINE_PROP_END_OF_LIST(),
+};
 
-    memory_region_init_io(&s->iomem, NULL, &mcf_fec_ops, s, "fec", 0x400);
-    memory_region_add_subregion(sysmem, base, &s->iomem);
+static void mcf_fec_class_init(ObjectClass *oc, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(oc);
 
-    s->conf.macaddr = nd->macaddr;
-    s->conf.peers.ncs[0] = nd->netdev;
+    set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
+    dc->realize = mcf_fec_realize;
+    dc->desc = "MCF Fast Ethernet Controller network device";
+    dc->reset = mcf_fec_reset;
+    dc->props = mcf_fec_properties;
+}
 
-    s->nic = qemu_new_nic(&net_mcf_fec_info, &s->conf, nd->model, nd->name, s);
+static const TypeInfo mcf_fec_info = {
+    .name          = TYPE_MCF_FEC_NET,
+    .parent        = TYPE_SYS_BUS_DEVICE,
+    .instance_size = sizeof(mcf_fec_state),
+    .instance_init = mcf_fec_instance_init,
+    .class_init    = mcf_fec_class_init,
+};
 
-    qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
+static void mcf_fec_register_types(void)
+{
+    type_register_static(&mcf_fec_info);
 }
+
+type_init(mcf_fec_register_types)
diff --git a/include/hw/m68k/mcf.h b/include/hw/m68k/mcf.h
index fdae229..bf43998 100644
--- a/include/hw/m68k/mcf.h
+++ b/include/hw/m68k/mcf.h
@@ -21,10 +21,6 @@ qemu_irq *mcf_intc_init(struct MemoryRegion *sysmem,
                         hwaddr base,
                         M68kCPU *cpu);
 
-/* mcf_fec.c */
-void mcf_fec_init(struct MemoryRegion *sysmem, NICInfo *nd,
-                  hwaddr base, qemu_irq *irq);
-
 /* mcf5206.c */
 qemu_irq *mcf5206_init(struct MemoryRegion *sysmem,
                        uint32_t base, M68kCPU *cpu);
diff --git a/include/hw/m68k/mcf_fec.h b/include/hw/m68k/mcf_fec.h
new file mode 100644
index 0000000..7f029f7
--- /dev/null
+++ b/include/hw/m68k/mcf_fec.h
@@ -0,0 +1,13 @@
+/*
+ * Definitions for the ColdFire Fast Ethernet Controller emulation.
+ *
+ * This code is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#define TYPE_MCF_FEC_NET "mcf-fec"
+#define MCF_FEC_NET(obj) OBJECT_CHECK(mcf_fec_state, (obj), TYPE_MCF_FEC_NET)
+
+#define FEC_NUM_IRQ 13
-- 
2.7.4

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

* [Qemu-devel] [PULL 4/6] hw/net/dp8393x: Avoid unintentional sign extensions on addresses
  2017-01-20  3:07 [Qemu-devel] [PULL 0/6] Net patches Jason Wang
                   ` (2 preceding siblings ...)
  2017-01-20  3:07 ` [Qemu-devel] [PULL 3/6] m68k: QOMify the MCF Fast Ethernet Controller device Jason Wang
@ 2017-01-20  3:07 ` Jason Wang
  2017-01-20  3:07 ` [Qemu-devel] [PULL 5/6] hw/pci: use-after-free in pci_nic_init_nofail when nic device fails to initialize Jason Wang
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 22+ messages in thread
From: Jason Wang @ 2017-01-20  3:07 UTC (permalink / raw)
  To: peter.maydell, qemu-devel; +Cc: Jason Wang

From: Peter Maydell <peter.maydell@linaro.org>

The dp8393x has several 32-bit values which are formed by concatenating
two 16 bit device register values. Attempting to do these inline
with ((s->reg[HI] << 16) | s->reg[LO]) can result in an unintended
sign extension because "x << 16" is of type 'int' even though s->reg
is unsigned, and so if the expression is used in a context where
it is cast to uint64_t the value is incorrectly sign-extended.
Fix this by using accessor functions with a uint32_t return type;
this also makes the code a bit easier to read.

This should fix Coverity issues 1307765, 1307766, 1307767, 1307768.

(To avoid having a ctda read function only used in a DPRINTF,
we move the DPRINTF down slightly so it can use the ttda function.)

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 hw/net/dp8393x.c | 95 ++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 68 insertions(+), 27 deletions(-)

diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 17f0338..efa33ad 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -174,6 +174,52 @@ typedef struct dp8393xState {
     AddressSpace as;
 } dp8393xState;
 
+/* Accessor functions for values which are formed by
+ * concatenating two 16 bit device registers. By putting these
+ * in their own functions with a uint32_t return type we avoid the
+ * pitfall of implicit sign extension where ((x << 16) | y) is a
+ * signed 32 bit integer that might get sign-extended to a 64 bit integer.
+ */
+static uint32_t dp8393x_cdp(dp8393xState *s)
+{
+    return (s->regs[SONIC_URRA] << 16) | s->regs[SONIC_CDP];
+}
+
+static uint32_t dp8393x_crba(dp8393xState *s)
+{
+    return (s->regs[SONIC_CRBA1] << 16) | s->regs[SONIC_CRBA0];
+}
+
+static uint32_t dp8393x_crda(dp8393xState *s)
+{
+    return (s->regs[SONIC_URDA] << 16) | s->regs[SONIC_CRDA];
+}
+
+static uint32_t dp8393x_rbwc(dp8393xState *s)
+{
+    return (s->regs[SONIC_RBWC1] << 16) | s->regs[SONIC_RBWC0];
+}
+
+static uint32_t dp8393x_rrp(dp8393xState *s)
+{
+    return (s->regs[SONIC_URRA] << 16) | s->regs[SONIC_RRP];
+}
+
+static uint32_t dp8393x_tsa(dp8393xState *s)
+{
+    return (s->regs[SONIC_TSA1] << 16) | s->regs[SONIC_TSA0];
+}
+
+static uint32_t dp8393x_ttda(dp8393xState *s)
+{
+    return (s->regs[SONIC_UTDA] << 16) | s->regs[SONIC_TTDA];
+}
+
+static uint32_t dp8393x_wt(dp8393xState *s)
+{
+    return s->regs[SONIC_WT1] << 16 | s->regs[SONIC_WT0];
+}
+
 static void dp8393x_update_irq(dp8393xState *s)
 {
     int level = (s->regs[SONIC_IMR] & s->regs[SONIC_ISR]) ? 1 : 0;
@@ -203,8 +249,7 @@ static void dp8393x_do_load_cam(dp8393xState *s)
 
     while (s->regs[SONIC_CDC] & 0x1f) {
         /* Fill current entry */
-        address_space_rw(&s->as,
-            (s->regs[SONIC_URRA] << 16) | s->regs[SONIC_CDP],
+        address_space_rw(&s->as, dp8393x_cdp(s),
             MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, size, 0);
         s->cam[index][0] = data[1 * width] & 0xff;
         s->cam[index][1] = data[1 * width] >> 8;
@@ -222,8 +267,7 @@ static void dp8393x_do_load_cam(dp8393xState *s)
     }
 
     /* Read CAM enable */
-    address_space_rw(&s->as,
-        (s->regs[SONIC_URRA] << 16) | s->regs[SONIC_CDP],
+    address_space_rw(&s->as, dp8393x_cdp(s),
         MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, size, 0);
     s->regs[SONIC_CE] = data[0 * width];
     DPRINTF("load cam done. cam enable mask 0x%04x\n", s->regs[SONIC_CE]);
@@ -242,8 +286,7 @@ static void dp8393x_do_read_rra(dp8393xState *s)
     /* Read memory */
     width = (s->regs[SONIC_DCR] & SONIC_DCR_DW) ? 2 : 1;
     size = sizeof(uint16_t) * 4 * width;
-    address_space_rw(&s->as,
-        (s->regs[SONIC_URRA] << 16) | s->regs[SONIC_RRP],
+    address_space_rw(&s->as, dp8393x_rrp(s),
         MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, size, 0);
 
     /* Update SONIC registers */
@@ -292,7 +335,7 @@ static void dp8393x_set_next_tick(dp8393xState *s)
         return;
     }
 
-    ticks = s->regs[SONIC_WT1] << 16 | s->regs[SONIC_WT0];
+    ticks = dp8393x_wt(s);
     s->wt_last_update = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
     delay = NANOSECONDS_PER_SECOND * ticks / 5000000;
     timer_mod(s->watchdog, s->wt_last_update + delay);
@@ -309,7 +352,7 @@ static void dp8393x_update_wt_regs(dp8393xState *s)
     }
 
     elapsed = s->wt_last_update - qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
-    val = s->regs[SONIC_WT1] << 16 | s->regs[SONIC_WT0];
+    val = dp8393x_wt(s);
     val -= elapsed / 5000000;
     s->regs[SONIC_WT1] = (val >> 16) & 0xffff;
     s->regs[SONIC_WT0] = (val >> 0)  & 0xffff;
@@ -356,12 +399,11 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
 
     while (1) {
         /* Read memory */
-        DPRINTF("Transmit packet at %08x\n",
-                (s->regs[SONIC_UTDA] << 16) | s->regs[SONIC_CTDA]);
         size = sizeof(uint16_t) * 6 * width;
         s->regs[SONIC_TTDA] = s->regs[SONIC_CTDA];
+        DPRINTF("Transmit packet at %08x\n", dp8393x_ttda(s));
         address_space_rw(&s->as,
-            ((s->regs[SONIC_UTDA] << 16) | s->regs[SONIC_TTDA]) + sizeof(uint16_t) * width,
+            dp8393x_ttda(s) + sizeof(uint16_t) * width,
             MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, size, 0);
         tx_len = 0;
 
@@ -386,8 +428,7 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
             if (tx_len + len > sizeof(s->tx_buffer)) {
                 len = sizeof(s->tx_buffer) - tx_len;
             }
-            address_space_rw(&s->as,
-                (s->regs[SONIC_TSA1] << 16) | s->regs[SONIC_TSA0],
+            address_space_rw(&s->as, dp8393x_tsa(s),
                 MEMTXATTRS_UNSPECIFIED, &s->tx_buffer[tx_len], len, 0);
             tx_len += len;
 
@@ -396,7 +437,7 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
                 /* Read next fragment details */
                 size = sizeof(uint16_t) * 3 * width;
                 address_space_rw(&s->as,
-                    ((s->regs[SONIC_UTDA] << 16) | s->regs[SONIC_TTDA]) + sizeof(uint16_t) * (4 + 3 * i) * width,
+                    dp8393x_ttda(s) + sizeof(uint16_t) * (4 + 3 * i) * width,
                     MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, size, 0);
                 s->regs[SONIC_TSA0] = data[0 * width];
                 s->regs[SONIC_TSA1] = data[1 * width];
@@ -430,14 +471,16 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
         data[0 * width] = s->regs[SONIC_TCR] & 0x0fff; /* status */
         size = sizeof(uint16_t) * width;
         address_space_rw(&s->as,
-            (s->regs[SONIC_UTDA] << 16) | s->regs[SONIC_TTDA],
+            dp8393x_ttda(s),
             MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, size, 1);
 
         if (!(s->regs[SONIC_CR] & SONIC_CR_HTX)) {
             /* Read footer of packet */
             size = sizeof(uint16_t) * width;
             address_space_rw(&s->as,
-                ((s->regs[SONIC_UTDA] << 16) | s->regs[SONIC_TTDA]) + sizeof(uint16_t) * (4 + 3 * s->regs[SONIC_TFC]) * width,
+                dp8393x_ttda(s) +
+                             sizeof(uint16_t) *
+                             (4 + 3 * s->regs[SONIC_TFC]) * width,
                 MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, size, 0);
             s->regs[SONIC_CTDA] = data[0 * width] & ~0x1;
             if (data[0 * width] & 0x1) {
@@ -700,7 +743,7 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
     if (s->regs[SONIC_LLFA] & 0x1) {
         /* Are we still in resource exhaustion? */
         size = sizeof(uint16_t) * 1 * width;
-        address = ((s->regs[SONIC_URDA] << 16) | s->regs[SONIC_CRDA]) + sizeof(uint16_t) * 5 * width;
+        address = dp8393x_crda(s) + sizeof(uint16_t) * 5 * width;
         address_space_rw(&s->as, address, MEMTXATTRS_UNSPECIFIED,
                          (uint8_t *)data, size, 0);
         if (data[0 * width] & 0x1) {
@@ -719,8 +762,8 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
     checksum = cpu_to_le32(crc32(0, buf, rx_len));
 
     /* Put packet into RBA */
-    DPRINTF("Receive packet at %08x\n", (s->regs[SONIC_CRBA1] << 16) | s->regs[SONIC_CRBA0]);
-    address = (s->regs[SONIC_CRBA1] << 16) | s->regs[SONIC_CRBA0];
+    DPRINTF("Receive packet at %08x\n", dp8393x_crba(s));
+    address = dp8393x_crba(s);
     address_space_rw(&s->as, address,
         MEMTXATTRS_UNSPECIFIED, (uint8_t *)buf, rx_len, 1);
     address += rx_len;
@@ -729,13 +772,13 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
     rx_len += 4;
     s->regs[SONIC_CRBA1] = address >> 16;
     s->regs[SONIC_CRBA0] = address & 0xffff;
-    available = (s->regs[SONIC_RBWC1] << 16) | s->regs[SONIC_RBWC0];
+    available = dp8393x_rbwc(s);
     available -= rx_len / 2;
     s->regs[SONIC_RBWC1] = available >> 16;
     s->regs[SONIC_RBWC0] = available & 0xffff;
 
     /* Update status */
-    if (((s->regs[SONIC_RBWC1] << 16) | s->regs[SONIC_RBWC0]) < s->regs[SONIC_EOBC]) {
+    if (dp8393x_rbwc(s) < s->regs[SONIC_EOBC]) {
         s->regs[SONIC_RCR] |= SONIC_RCR_LPKT;
     }
     s->regs[SONIC_RCR] |= packet_type;
@@ -746,20 +789,19 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
     }
 
     /* Write status to memory */
-    DPRINTF("Write status at %08x\n", (s->regs[SONIC_URDA] << 16) | s->regs[SONIC_CRDA]);
+    DPRINTF("Write status at %08x\n", dp8393x_crda(s));
     data[0 * width] = s->regs[SONIC_RCR]; /* status */
     data[1 * width] = rx_len; /* byte count */
     data[2 * width] = s->regs[SONIC_TRBA0]; /* pkt_ptr0 */
     data[3 * width] = s->regs[SONIC_TRBA1]; /* pkt_ptr1 */
     data[4 * width] = s->regs[SONIC_RSC]; /* seq_no */
     size = sizeof(uint16_t) * 5 * width;
-    address_space_rw(&s->as, (s->regs[SONIC_URDA] << 16) | s->regs[SONIC_CRDA],
+    address_space_rw(&s->as, dp8393x_crda(s),
         MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, size, 1);
 
     /* Move to next descriptor */
     size = sizeof(uint16_t) * width;
-    address_space_rw(&s->as,
-        ((s->regs[SONIC_URDA] << 16) | s->regs[SONIC_CRDA]) + sizeof(uint16_t) * 5 * width,
+    address_space_rw(&s->as, dp8393x_crda(s) + sizeof(uint16_t) * 5 * width,
         MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, size, 0);
     s->regs[SONIC_LLFA] = data[0 * width];
     if (s->regs[SONIC_LLFA] & 0x1) {
@@ -767,8 +809,7 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
         s->regs[SONIC_ISR] |= SONIC_ISR_RDE;
     } else {
         data[0 * width] = 0; /* in_use */
-        address_space_rw(&s->as,
-            ((s->regs[SONIC_URDA] << 16) | s->regs[SONIC_CRDA]) + sizeof(uint16_t) * 6 * width,
+        address_space_rw(&s->as, dp8393x_crda(s) + sizeof(uint16_t) * 6 * width,
             MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, sizeof(uint16_t), 1);
         s->regs[SONIC_CRDA] = s->regs[SONIC_LLFA];
         s->regs[SONIC_ISR] |= SONIC_ISR_PKTRX;
-- 
2.7.4

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

* [Qemu-devel] [PULL 5/6] hw/pci: use-after-free in pci_nic_init_nofail when nic device fails to initialize
  2017-01-20  3:07 [Qemu-devel] [PULL 0/6] Net patches Jason Wang
                   ` (3 preceding siblings ...)
  2017-01-20  3:07 ` [Qemu-devel] [PULL 4/6] hw/net/dp8393x: Avoid unintentional sign extensions on addresses Jason Wang
@ 2017-01-20  3:07 ` Jason Wang
  2017-01-20  3:07 ` [Qemu-devel] [PULL 6/6] tap: fix memory leak on failure in net_init_tap() Jason Wang
  2017-01-20 15:53 ` [Qemu-devel] [PULL 0/6] Net patches Peter Maydell
  6 siblings, 0 replies; 22+ messages in thread
From: Jason Wang @ 2017-01-20  3:07 UTC (permalink / raw)
  To: peter.maydell, qemu-devel; +Cc: Alex Kompel, Jason Wang

From: Alex Kompel <barbos@gmail.com>

object_property_set_bool(OBJECT(dev), true, "realized", &err) in
pci_nic_init_nofail may release the object if device fails to
initialize which leads to use-after-free in error handling block.
qdev_init_nofail does the same thing while holding the reference.

(gdb) run -net nic
qemu-system-x86_64: failed to find romfile "efi-e1000.rom"

Program received signal SIGSEGV, Segmentation fault.
object_unparent (obj=0x7fffe96a0010) at qom/object.c:440
440     in qom/object.c
(gdb) bt
<nd_table>, rootbus=0x5555567ed990, default_model=<optimized out>,
default_devaddr=<optimized out>) at hw/pci/pci.c:1812
pci_bus=0x5555567ed990) at hw/i386/pc.c:1634
pci_type=0x555555c1a523 "i440FX", host_type=0x555555ba564e
"i440FX-pcihost") at hw/i386/pc_piix.c:241
out>, envp=<optimized out>) at vl.c:4481

Signed-off-by: Alex Kompel <barbos@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 hw/pci/pci.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 637d545..fe9acec 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1779,7 +1779,6 @@ PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus,
                                const char *default_devaddr)
 {
     const char *devaddr = nd->devaddr ? nd->devaddr : default_devaddr;
-    Error *err = NULL;
     PCIBus *bus;
     PCIDevice *pci_dev;
     DeviceState *dev;
@@ -1805,13 +1804,7 @@ PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus,
     pci_dev = pci_create(bus, devfn, pci_nic_names[i]);
     dev = &pci_dev->qdev;
     qdev_set_nic_properties(dev, nd);
-
-    object_property_set_bool(OBJECT(dev), true, "realized", &err);
-    if (err) {
-        error_report_err(err);
-        object_unparent(OBJECT(dev));
-        exit(1);
-    }
+    qdev_init_nofail(dev);
 
     return pci_dev;
 }
-- 
2.7.4

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

* [Qemu-devel] [PULL 6/6] tap: fix memory leak on failure in net_init_tap()
  2017-01-20  3:07 [Qemu-devel] [PULL 0/6] Net patches Jason Wang
                   ` (4 preceding siblings ...)
  2017-01-20  3:07 ` [Qemu-devel] [PULL 5/6] hw/pci: use-after-free in pci_nic_init_nofail when nic device fails to initialize Jason Wang
@ 2017-01-20  3:07 ` Jason Wang
  2017-01-20 15:53 ` [Qemu-devel] [PULL 0/6] Net patches Peter Maydell
  6 siblings, 0 replies; 22+ messages in thread
From: Jason Wang @ 2017-01-20  3:07 UTC (permalink / raw)
  To: peter.maydell, qemu-devel; +Cc: Jason Wang

From: Peter Maydell <peter.maydell@linaro.org>

Commit 091a6b2ac fixed most of the memory leaks in failure
paths in net_init_tap() reported by Coverity (CID 1356216),
but missed one. Fix it by deferring the allocation of
fds and vhost_fds until after the error check.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 net/tap.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/tap.c b/net/tap.c
index b6896a7..6248e85 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -788,8 +788,8 @@ int net_init_tap(const Netdev *netdev, const char *name,
             return -1;
         }
     } else if (tap->has_fds) {
-        char **fds = g_new0(char *, MAX_TAP_QUEUES);
-        char **vhost_fds = g_new0(char *, MAX_TAP_QUEUES);
+        char **fds;
+        char **vhost_fds;
         int nfds, nvhosts;
 
         if (tap->has_ifname || tap->has_script || tap->has_downscript ||
@@ -801,6 +801,9 @@ int net_init_tap(const Netdev *netdev, const char *name,
             return -1;
         }
 
+        fds = g_new0(char *, MAX_TAP_QUEUES);
+        vhost_fds = g_new0(char *, MAX_TAP_QUEUES);
+
         nfds = get_fds(tap->fds, fds, MAX_TAP_QUEUES);
         if (tap->has_vhostfds) {
             nvhosts = get_fds(tap->vhostfds, vhost_fds, MAX_TAP_QUEUES);
-- 
2.7.4

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2017-01-20  3:07 [Qemu-devel] [PULL 0/6] Net patches Jason Wang
                   ` (5 preceding siblings ...)
  2017-01-20  3:07 ` [Qemu-devel] [PULL 6/6] tap: fix memory leak on failure in net_init_tap() Jason Wang
@ 2017-01-20 15:53 ` Peter Maydell
  6 siblings, 0 replies; 22+ messages in thread
From: Peter Maydell @ 2017-01-20 15:53 UTC (permalink / raw)
  To: Jason Wang; +Cc: QEMU Developers

On 20 January 2017 at 03:07, Jason Wang <jasowang@redhat.com> wrote:
> The following changes since commit 0f6bcf68a99efdc531b209551f2b760b0bdcc554:
>
>   Merge remote-tracking branch 'remotes/artyom/tags/pull-sun4v-20170118' into staging (2017-01-19 18:34:13 +0000)
>
> are available in the git repository at:
>
>   https://github.com/jasowang/qemu.git tags/net-pull-request
>
> for you to fetch changes up to fac7d7b1cdb21f921d7ac396365f5e920ef03096:
>
>   tap: fix memory leak on failure in net_init_tap() (2017-01-20 10:58:26 +0800)
>
> ----------------------------------------------------------------
>

Applied, thanks.

-- PMM

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

* [Qemu-devel] [PULL 0/6] Net patches
@ 2017-11-20  3:31 Jason Wang
  2017-11-20  3:44 ` no-reply
  2017-11-20 17:59 ` Peter Maydell
  0 siblings, 2 replies; 22+ messages in thread
From: Jason Wang @ 2017-11-20  3:31 UTC (permalink / raw)
  To: qemu-devel, peter.maydell; +Cc: Jason Wang

The following changes since commit 2e02083438962d26ef9dcc7100f3b378104183db:

  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-11-17 19:08:07 +0000)

are available in the git repository at:

  https://github.com/jasowang/qemu.git tags/net-pull-request

for you to fetch changes up to c527e0afcd7d719abc3a5ca5e4c8ac2fe48b999f:

  hw/net/vmxnet3: Fix code to work on big endian hosts, too (2017-11-20 11:08:00 +0800)

----------------------------------------------------------------

----------------------------------------------------------------
Ed Swierk (1):
      net: Transmit zero UDP checksum as 0xFFFF

Jason Wang (1):
      Revert "Add new PCI ID for i82559a"

Mao Zhongyi (1):
      colo-compare: fix the dangerous assignment

Stefan Weil (1):
      MAINTAINERS: Add missing entry for eepro100 emulation

Thomas Huth (2):
      hw/net/eepro100: Fix endianness problem on big endian hosts
      hw/net/vmxnet3: Fix code to work on big endian hosts, too

 MAINTAINERS            |   5 ++
 hw/net/e1000.c         |   2 +-
 hw/net/eepro100.c      |  17 +---
 hw/net/net_rx_pkt.c    |   2 +-
 hw/net/net_tx_pkt.c    |   2 +-
 hw/net/vmware_utils.h  |   6 ++
 hw/net/vmxnet3.c       |  49 ++++++++---
 hw/net/vmxnet3.h       | 230 ++++++++++++++++++++++++++++++-------------------
 include/hw/compat.h    |   4 -
 include/hw/pci/pci.h   |   1 -
 include/net/checksum.h |   6 ++
 net/colo-compare.c     |   2 +-
 qemu-options.hx        |   2 +-
 13 files changed, 201 insertions(+), 127 deletions(-)

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2017-11-20  3:31 Jason Wang
@ 2017-11-20  3:44 ` no-reply
  2017-11-20  4:39   ` Thomas Huth
  2017-11-20 17:59 ` Peter Maydell
  1 sibling, 1 reply; 22+ messages in thread
From: no-reply @ 2017-11-20  3:44 UTC (permalink / raw)
  To: jasowang; +Cc: famz, qemu-devel, peter.maydell

Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PULL 0/6] Net patches
Type: series
Message-id: 1511148687-24909-1-git-send-email-jasowang@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 t [tag update]            patchew/1510926167-23326-1-git-send-email-mark.cave-ayland@ilande.co.uk -> patchew/1510926167-23326-1-git-send-email-mark.cave-ayland@ilande.co.uk
 * [new tag]               patchew/1511148687-24909-1-git-send-email-jasowang@redhat.com -> patchew/1511148687-24909-1-git-send-email-jasowang@redhat.com
Switched to a new branch 'test'
6d998dcb3e hw/net/vmxnet3: Fix code to work on big endian hosts, too
e3b7d3045b net: Transmit zero UDP checksum as 0xFFFF
528693e2ba MAINTAINERS: Add missing entry for eepro100 emulation
434d3f0987 hw/net/eepro100: Fix endianness problem on big endian hosts
c2e0b52dd7 Revert "Add new PCI ID for i82559a"
3e70742c2d colo-compare: fix the dangerous assignment

=== OUTPUT BEGIN ===
Checking PATCH 1/6: colo-compare: fix the dangerous assignment...
Checking PATCH 2/6: Revert "Add new PCI ID for i82559a"...
Checking PATCH 3/6: hw/net/eepro100: Fix endianness problem on big endian hosts...
Checking PATCH 4/6: MAINTAINERS: Add missing entry for eepro100 emulation...
Checking PATCH 5/6: net: Transmit zero UDP checksum as 0xFFFF...
Checking PATCH 6/6: hw/net/vmxnet3: Fix code to work on big endian hosts, too...
ERROR: spaces required around that ':' (ctx:VxV)
#237: FILE: hw/net/vmxnet3.h:232:
+            u32 msscof:14;  /* MSS, checksum offset, flags */
                       ^

ERROR: spaces required around that ':' (ctx:VxV)
#238: FILE: hw/net/vmxnet3.h:233:
+            u32 ext1:1;
                     ^

ERROR: spaces required around that ':' (ctx:VxV)
#239: FILE: hw/net/vmxnet3.h:234:
+            u32 dtype:1;    /* descriptor type */
                      ^

ERROR: spaces required around that ':' (ctx:VxV)
#240: FILE: hw/net/vmxnet3.h:235:
+            u32 rsvd:1;
                     ^

ERROR: spaces required around that ':' (ctx:VxV)
#241: FILE: hw/net/vmxnet3.h:236:
+            u32 gen:1;      /* generation bit */
                    ^

ERROR: spaces required around that ':' (ctx:VxV)
#242: FILE: hw/net/vmxnet3.h:237:
+            u32 len:14;
                    ^

ERROR: spaces required around that ':' (ctx:VxV)
#250: FILE: hw/net/vmxnet3.h:239:
+            u32 len:14;
                    ^

ERROR: spaces required around that ':' (ctx:VxV)
#251: FILE: hw/net/vmxnet3.h:240:
+            u32 gen:1;      /* generation bit */
                    ^

ERROR: spaces required around that ':' (ctx:VxV)
#252: FILE: hw/net/vmxnet3.h:241:
+            u32 rsvd:1;
                     ^

ERROR: spaces required around that ':' (ctx:VxV)
#253: FILE: hw/net/vmxnet3.h:242:
+            u32 dtype:1;    /* descriptor type */
                      ^

ERROR: spaces required around that ':' (ctx:VxV)
#254: FILE: hw/net/vmxnet3.h:243:
+            u32 ext1:1;
                     ^

ERROR: spaces required around that ':' (ctx:VxV)
#255: FILE: hw/net/vmxnet3.h:244:
+            u32 msscof:14;  /* MSS, checksum offset, flags */
                       ^

ERROR: trailing whitespace
#261: FILE: hw/net/vmxnet3.h:249:
+    $

WARNING: architecture specific defines should be avoided
#310: FILE: hw/net/vmxnet3.h:306:
+#ifdef __BIG_ENDIAN_BITFIELD

WARNING: architecture specific defines should be avoided
#328: FILE: hw/net/vmxnet3.h:321:
+#ifdef __BIG_ENDIAN_BITFIELD

total: 13 errors, 2 warnings, 441 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2017-11-20  3:44 ` no-reply
@ 2017-11-20  4:39   ` Thomas Huth
  0 siblings, 0 replies; 22+ messages in thread
From: Thomas Huth @ 2017-11-20  4:39 UTC (permalink / raw)
  To: qemu-devel, no-reply, jasowang; +Cc: peter.maydell, famz

On 20.11.2017 04:44, no-reply@patchew.org wrote:
> Hi,
> 
> This series seems to have some coding style problems. See output below for
> more information:
> 
> Subject: [Qemu-devel] [PULL 0/6] Net patches
> Type: series
> Message-id: 1511148687-24909-1-git-send-email-jasowang@redhat.com
> 
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
> 
> BASE=base
> n=1
> total=$(git log --oneline $BASE.. | wc -l)
> failed=0
> 
> git config --local diff.renamelimit 0
> git config --local diff.renames True
> 
> commits="$(git log --format=%H --reverse $BASE..)"
> for c in $commits; do
>     echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
>     if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
>         failed=1
>         echo
>     fi
>     n=$((n+1))
> done
> 
> exit $failed
> === TEST SCRIPT END ===
> 
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> From https://github.com/patchew-project/qemu
>  t [tag update]            patchew/1510926167-23326-1-git-send-email-mark.cave-ayland@ilande.co.uk -> patchew/1510926167-23326-1-git-send-email-mark.cave-ayland@ilande.co.uk
>  * [new tag]               patchew/1511148687-24909-1-git-send-email-jasowang@redhat.com -> patchew/1511148687-24909-1-git-send-email-jasowang@redhat.com
> Switched to a new branch 'test'
> 6d998dcb3e hw/net/vmxnet3: Fix code to work on big endian hosts, too
> e3b7d3045b net: Transmit zero UDP checksum as 0xFFFF
> 528693e2ba MAINTAINERS: Add missing entry for eepro100 emulation
> 434d3f0987 hw/net/eepro100: Fix endianness problem on big endian hosts
> c2e0b52dd7 Revert "Add new PCI ID for i82559a"
> 3e70742c2d colo-compare: fix the dangerous assignment
> 
> === OUTPUT BEGIN ===
> Checking PATCH 1/6: colo-compare: fix the dangerous assignment...
> Checking PATCH 2/6: Revert "Add new PCI ID for i82559a"...
> Checking PATCH 3/6: hw/net/eepro100: Fix endianness problem on big endian hosts...
> Checking PATCH 4/6: MAINTAINERS: Add missing entry for eepro100 emulation...
> Checking PATCH 5/6: net: Transmit zero UDP checksum as 0xFFFF...
> Checking PATCH 6/6: hw/net/vmxnet3: Fix code to work on big endian hosts, too...
> ERROR: spaces required around that ':' (ctx:VxV)
> #237: FILE: hw/net/vmxnet3.h:232:
> +            u32 msscof:14;  /* MSS, checksum offset, flags */
>                        ^
> 
> ERROR: spaces required around that ':' (ctx:VxV)
> #238: FILE: hw/net/vmxnet3.h:233:
> +            u32 ext1:1;
>                      ^

Just for the records (again): These errors seem to be false positives
from checkpatch. I originally tried to add spaces to all changed
bitfields, but then checkpatch suddenly complains that spaces are not
allowed there...

 Thomas

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2017-11-20  3:31 Jason Wang
  2017-11-20  3:44 ` no-reply
@ 2017-11-20 17:59 ` Peter Maydell
  1 sibling, 0 replies; 22+ messages in thread
From: Peter Maydell @ 2017-11-20 17:59 UTC (permalink / raw)
  To: Jason Wang; +Cc: QEMU Developers

On 20 November 2017 at 03:31, Jason Wang <jasowang@redhat.com> wrote:
> The following changes since commit 2e02083438962d26ef9dcc7100f3b378104183db:
>
>   Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-11-17 19:08:07 +0000)
>
> are available in the git repository at:
>
>   https://github.com/jasowang/qemu.git tags/net-pull-request
>
> for you to fetch changes up to c527e0afcd7d719abc3a5ca5e4c8ac2fe48b999f:
>
>   hw/net/vmxnet3: Fix code to work on big endian hosts, too (2017-11-20 11:08:00 +0800)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------


Applied, thanks.

-- PMM

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

* [Qemu-devel] [PULL 0/6] Net patches
@ 2018-01-29  8:16 Jason Wang
  2018-01-29  8:25 ` no-reply
  2018-01-29 15:52 ` Peter Maydell
  0 siblings, 2 replies; 22+ messages in thread
From: Jason Wang @ 2018-01-29  8:16 UTC (permalink / raw)
  To: peter.maydell; +Cc: qemu-devel, Jason Wang

The following changes since commit e607bbee553cfe73072870cef458cfa4e78133e2:

  Merge remote-tracking branch 'remotes/edgar/tags/edgar/xilinx-next-2018-01-26.for-upstream' into staging (2018-01-26 14:24:25 +0000)

are available in the git repository at:

  https://github.com/jasowang/qemu.git tags/net-pull-request

for you to fetch changes up to bf4835a4d5338bb7424827715df22570a8adc67c:

  MAINTAINERS: update Dmitry Fleytman email (2018-01-29 16:05:38 +0800)

----------------------------------------------------------------

----------------------------------------------------------------
Mao Zhongyi (2):
      colo: modified the payload compare function
      colo: compare the packet based on the tcp sequence number

Philippe Mathieu-Daudé (1):
      MAINTAINERS: update Dmitry Fleytman email

Thomas Huth (3):
      net: Allow hubports to connect to other netdevs
      net: Allow netdevs to be used with 'hostfwd_add' and 'hostfwd_remove'
      qemu-doc: Get rid of "vlan=X" example in the documentation

 MAINTAINERS        |   8 +-
 hmp-commands.hx    |   4 +-
 net/colo-compare.c | 411 +++++++++++++++++++++++++++++++++--------------------
 net/colo.c         |   9 ++
 net/colo.h         |  15 ++
 net/hub.c          |  27 +++-
 net/hub.h          |   3 +-
 net/net.c          |   2 +-
 net/slirp.c        |  33 +++--
 net/trace-events   |   2 +-
 qapi/net.json      |   4 +-
 qemu-options.hx    |  12 +-
 12 files changed, 347 insertions(+), 183 deletions(-)

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2018-01-29  8:16 Jason Wang
@ 2018-01-29  8:25 ` no-reply
  2018-01-29 10:02   ` Jason Wang
  2018-01-29 15:52 ` Peter Maydell
  1 sibling, 1 reply; 22+ messages in thread
From: no-reply @ 2018-01-29  8:25 UTC (permalink / raw)
  To: jasowang; +Cc: famz, peter.maydell, qemu-devel

Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 1517213825-24085-1-git-send-email-jasowang@redhat.com
Subject: [Qemu-devel] [PULL 0/6] Net patches

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/1517213825-24085-1-git-send-email-jasowang@redhat.com -> patchew/1517213825-24085-1-git-send-email-jasowang@redhat.com
Switched to a new branch 'test'
f599bb830a MAINTAINERS: update Dmitry Fleytman email
d7e337961c qemu-doc: Get rid of "vlan=X" example in the documentation
b7bc06c0f4 net: Allow netdevs to be used with 'hostfwd_add' and 'hostfwd_remove'
85b4cac4ac net: Allow hubports to connect to other netdevs
b4a35413c4 colo: compare the packet based on the tcp sequence number
f6781da302 colo: modified the payload compare function

=== OUTPUT BEGIN ===
Checking PATCH 1/6: colo: modified the payload compare function...
Checking PATCH 2/6: colo: compare the packet based on the tcp sequence number...
Checking PATCH 3/6: net: Allow hubports to connect to other netdevs...
Checking PATCH 4/6: net: Allow netdevs to be used with 'hostfwd_add' and 'hostfwd_remove'...
ERROR: consider using qemu_strtol in preference to strtol
#72: FILE: net/slirp.c:414:
+            nc = net_hub_find_client_by_name(strtol(hub_id, NULL, 0), name);

total: 1 errors, 0 warnings, 73 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 5/6: qemu-doc: Get rid of "vlan=X" example in the documentation...
Checking PATCH 6/6: MAINTAINERS: update Dmitry Fleytman email...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2018-01-29  8:25 ` no-reply
@ 2018-01-29 10:02   ` Jason Wang
  2018-01-29 10:58     ` Thomas Huth
  0 siblings, 1 reply; 22+ messages in thread
From: Jason Wang @ 2018-01-29 10:02 UTC (permalink / raw)
  To: qemu-devel, Thomas Huth; +Cc: famz, peter.maydell



On 2018年01月29日 16:25, no-reply@patchew.org wrote:
> Hi,
>
> This series seems to have some coding style problems. See output below for
> more information:
>
> Type: series
> Message-id: 1517213825-24085-1-git-send-email-jasowang@redhat.com
> Subject: [Qemu-devel] [PULL 0/6] Net patches
>
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
>
> BASE=base
> n=1
> total=$(git log --oneline $BASE.. | wc -l)
> failed=0
>
> git config --local diff.renamelimit 0
> git config --local diff.renames True
>
> commits="$(git log --format=%H --reverse $BASE..)"
> for c in $commits; do
>      echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
>      if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
>          failed=1
>          echo
>      fi
>      n=$((n+1))
> done
>
> exit $failed
> === TEST SCRIPT END ===
>
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
>  From https://github.com/patchew-project/qemu
>   * [new tag]               patchew/1517213825-24085-1-git-send-email-jasowang@redhat.com -> patchew/1517213825-24085-1-git-send-email-jasowang@redhat.com
> Switched to a new branch 'test'
> f599bb830a MAINTAINERS: update Dmitry Fleytman email
> d7e337961c qemu-doc: Get rid of "vlan=X" example in the documentation
> b7bc06c0f4 net: Allow netdevs to be used with 'hostfwd_add' and 'hostfwd_remove'
> 85b4cac4ac net: Allow hubports to connect to other netdevs
> b4a35413c4 colo: compare the packet based on the tcp sequence number
> f6781da302 colo: modified the payload compare function
>
> === OUTPUT BEGIN ===
> Checking PATCH 1/6: colo: modified the payload compare function...
> Checking PATCH 2/6: colo: compare the packet based on the tcp sequence number...
> Checking PATCH 3/6: net: Allow hubports to connect to other netdevs...
> Checking PATCH 4/6: net: Allow netdevs to be used with 'hostfwd_add' and 'hostfwd_remove'...
> ERROR: consider using qemu_strtol in preference to strtol
> #72: FILE: net/slirp.c:414:
> +            nc = net_hub_find_client_by_name(strtol(hub_id, NULL, 0), name);
>
> total: 1 errors, 0 warnings, 73 lines checked
>
> Your patch has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
>
> Checking PATCH 5/6: qemu-doc: Get rid of "vlan=X" example in the documentation...
> Checking PATCH 6/6: MAINTAINERS: update Dmitry Fleytman email...
> === OUTPUT END ===
>
> Test command exited with code: 1

Thomas, want to send a v2 for this patch?

Thanks

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2018-01-29 10:02   ` Jason Wang
@ 2018-01-29 10:58     ` Thomas Huth
  2018-01-29 12:30       ` Jason Wang
  0 siblings, 1 reply; 22+ messages in thread
From: Thomas Huth @ 2018-01-29 10:58 UTC (permalink / raw)
  To: Jason Wang, qemu-devel; +Cc: famz, peter.maydell

On 29.01.2018 11:02, Jason Wang wrote:
> 
> 
> On 2018年01月29日 16:25, no-reply@patchew.org wrote:
>> Hi,
>>
>> This series seems to have some coding style problems. See output below
>> for
>> more information:
>>
>> Type: series
>> Message-id: 1517213825-24085-1-git-send-email-jasowang@redhat.com
>> Subject: [Qemu-devel] [PULL 0/6] Net patches
>>
>> === TEST SCRIPT BEGIN ===
>> #!/bin/bash
>>
>> BASE=base
>> n=1
>> total=$(git log --oneline $BASE.. | wc -l)
>> failed=0
>>
>> git config --local diff.renamelimit 0
>> git config --local diff.renames True
>>
>> commits="$(git log --format=%H --reverse $BASE..)"
>> for c in $commits; do
>>      echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
>>      if ! git show $c --format=email | ./scripts/checkpatch.pl
>> --mailback -; then
>>          failed=1
>>          echo
>>      fi
>>      n=$((n+1))
>> done
>>
>> exit $failed
>> === TEST SCRIPT END ===
>>
>> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
>>  From https://github.com/patchew-project/qemu
>>   * [new tag]              
>> patchew/1517213825-24085-1-git-send-email-jasowang@redhat.com ->
>> patchew/1517213825-24085-1-git-send-email-jasowang@redhat.com
>> Switched to a new branch 'test'
>> f599bb830a MAINTAINERS: update Dmitry Fleytman email
>> d7e337961c qemu-doc: Get rid of "vlan=X" example in the documentation
>> b7bc06c0f4 net: Allow netdevs to be used with 'hostfwd_add' and
>> 'hostfwd_remove'
>> 85b4cac4ac net: Allow hubports to connect to other netdevs
>> b4a35413c4 colo: compare the packet based on the tcp sequence number
>> f6781da302 colo: modified the payload compare function
>>
>> === OUTPUT BEGIN ===
>> Checking PATCH 1/6: colo: modified the payload compare function...
>> Checking PATCH 2/6: colo: compare the packet based on the tcp sequence
>> number...
>> Checking PATCH 3/6: net: Allow hubports to connect to other netdevs...
>> Checking PATCH 4/6: net: Allow netdevs to be used with 'hostfwd_add'
>> and 'hostfwd_remove'...
>> ERROR: consider using qemu_strtol in preference to strtol
>> #72: FILE: net/slirp.c:414:
>> +            nc = net_hub_find_client_by_name(strtol(hub_id, NULL, 0),
>> name);
>>
>> total: 1 errors, 0 warnings, 73 lines checked
>>
>> Your patch has style problems, please review.  If any of these errors
>> are false positives report them to the maintainer, see
>> CHECKPATCH in MAINTAINERS.
>>
>> Checking PATCH 5/6: qemu-doc: Get rid of "vlan=X" example in the
>> documentation...
>> Checking PATCH 6/6: MAINTAINERS: update Dmitry Fleytman email...
>> === OUTPUT END ===
>>
>> Test command exited with code: 1
> 
> Thomas, want to send a v2 for this patch?

No, that strtol was already there in the code before my patch, I just
changed the indentation. If we decide that we want to replace it, this
should be done by a separate patch instead. Question is: Do we really
want to replace it here? (the error message is saying "consider ..." -
so maybe that should also rather be a warning instead of an error message?)

 Thomas

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2018-01-29 10:58     ` Thomas Huth
@ 2018-01-29 12:30       ` Jason Wang
  0 siblings, 0 replies; 22+ messages in thread
From: Jason Wang @ 2018-01-29 12:30 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: peter.maydell, famz



On 2018年01月29日 18:58, Thomas Huth wrote:
> On 29.01.2018 11:02, Jason Wang wrote:
>>
>> On 2018年01月29日 16:25, no-reply@patchew.org wrote:
>>> Hi,
>>>
>>> This series seems to have some coding style problems. See output below
>>> for
>>> more information:
>>>
>>> Type: series
>>> Message-id: 1517213825-24085-1-git-send-email-jasowang@redhat.com
>>> Subject: [Qemu-devel] [PULL 0/6] Net patches
>>>
>>> === TEST SCRIPT BEGIN ===
>>> #!/bin/bash
>>>
>>> BASE=base
>>> n=1
>>> total=$(git log --oneline $BASE.. | wc -l)
>>> failed=0
>>>
>>> git config --local diff.renamelimit 0
>>> git config --local diff.renames True
>>>
>>> commits="$(git log --format=%H --reverse $BASE..)"
>>> for c in $commits; do
>>>       echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
>>>       if ! git show $c --format=email | ./scripts/checkpatch.pl
>>> --mailback -; then
>>>           failed=1
>>>           echo
>>>       fi
>>>       n=$((n+1))
>>> done
>>>
>>> exit $failed
>>> === TEST SCRIPT END ===
>>>
>>> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
>>>   From https://github.com/patchew-project/qemu
>>>    * [new tag]
>>> patchew/1517213825-24085-1-git-send-email-jasowang@redhat.com ->
>>> patchew/1517213825-24085-1-git-send-email-jasowang@redhat.com
>>> Switched to a new branch 'test'
>>> f599bb830a MAINTAINERS: update Dmitry Fleytman email
>>> d7e337961c qemu-doc: Get rid of "vlan=X" example in the documentation
>>> b7bc06c0f4 net: Allow netdevs to be used with 'hostfwd_add' and
>>> 'hostfwd_remove'
>>> 85b4cac4ac net: Allow hubports to connect to other netdevs
>>> b4a35413c4 colo: compare the packet based on the tcp sequence number
>>> f6781da302 colo: modified the payload compare function
>>>
>>> === OUTPUT BEGIN ===
>>> Checking PATCH 1/6: colo: modified the payload compare function...
>>> Checking PATCH 2/6: colo: compare the packet based on the tcp sequence
>>> number...
>>> Checking PATCH 3/6: net: Allow hubports to connect to other netdevs...
>>> Checking PATCH 4/6: net: Allow netdevs to be used with 'hostfwd_add'
>>> and 'hostfwd_remove'...
>>> ERROR: consider using qemu_strtol in preference to strtol
>>> #72: FILE: net/slirp.c:414:
>>> +            nc = net_hub_find_client_by_name(strtol(hub_id, NULL, 0),
>>> name);
>>>
>>> total: 1 errors, 0 warnings, 73 lines checked
>>>
>>> Your patch has style problems, please review.  If any of these errors
>>> are false positives report them to the maintainer, see
>>> CHECKPATCH in MAINTAINERS.
>>>
>>> Checking PATCH 5/6: qemu-doc: Get rid of "vlan=X" example in the
>>> documentation...
>>> Checking PATCH 6/6: MAINTAINERS: update Dmitry Fleytman email...
>>> === OUTPUT END ===
>>>
>>> Test command exited with code: 1
>> Thomas, want to send a v2 for this patch?
> No, that strtol was already there in the code before my patch, I just
> changed the indentation. If we decide that we want to replace it, this
> should be done by a separate patch instead. Question is: Do we really
> want to replace it here? (the error message is saying "consider ..." -
> so maybe that should also rather be a warning instead of an error message?)
>
>   Thomas
>

I see, then I'm fine to keep it as is. Any changes could be done on top.

Thanks

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2018-01-29  8:16 Jason Wang
  2018-01-29  8:25 ` no-reply
@ 2018-01-29 15:52 ` Peter Maydell
  1 sibling, 0 replies; 22+ messages in thread
From: Peter Maydell @ 2018-01-29 15:52 UTC (permalink / raw)
  To: Jason Wang; +Cc: QEMU Developers

On 29 January 2018 at 08:16, Jason Wang <jasowang@redhat.com> wrote:
> The following changes since commit e607bbee553cfe73072870cef458cfa4e78133e2:
>
>   Merge remote-tracking branch 'remotes/edgar/tags/edgar/xilinx-next-2018-01-26.for-upstream' into staging (2018-01-26 14:24:25 +0000)
>
> are available in the git repository at:
>
>   https://github.com/jasowang/qemu.git tags/net-pull-request
>
> for you to fetch changes up to bf4835a4d5338bb7424827715df22570a8adc67c:
>
>   MAINTAINERS: update Dmitry Fleytman email (2018-01-29 16:05:38 +0800)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
> Mao Zhongyi (2):
>       colo: modified the payload compare function
>       colo: compare the packet based on the tcp sequence number
>
> Philippe Mathieu-Daudé (1):
>       MAINTAINERS: update Dmitry Fleytman email
>
> Thomas Huth (3):
>       net: Allow hubports to connect to other netdevs
>       net: Allow netdevs to be used with 'hostfwd_add' and 'hostfwd_remove'
>       qemu-doc: Get rid of "vlan=X" example in the documentation
>

Applied, thanks.

-- PMM

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

* [Qemu-devel] [PULL 0/6] Net patches
@ 2018-04-10  3:39 Jason Wang
  2018-04-10 13:04 ` Peter Maydell
  0 siblings, 1 reply; 22+ messages in thread
From: Jason Wang @ 2018-04-10  3:39 UTC (permalink / raw)
  To: qemu-devel, peter.maydell; +Cc: Jason Wang

The following changes since commit 915d34c5f99b0ab91517c69f54272bfdb6ca2b32:

  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2018-04-09 17:29:10 +0100)

are available in the git repository at:

  https://github.com/jasowang/qemu.git tags/net-pull-request

for you to fetch changes up to 5f523530915e57a14ffb8c00e22252bfa557441c:

  e1000: Old machine types, turn new subsection off (2018-04-10 11:30:04 +0800)

----------------------------------------------------------------

A series from David that switches to use subsection instead of version
bumping for e1000 to keep migration compatibility for old
versions. This will ease the downstream maintaining.

Please merge.

Thanks

----------------------------------------------------------------
Dr. David Alan Gilbert (6):
      e1000: Convert v3 fields to subsection
      e1000: Dupe offload data on reading old stream
      e1000: wire new subsection to property
      e1000: Migrate props via a temporary structure
      e1000: Choose which set of props to migrate
      e1000: Old machine types, turn new subsection off

 hw/net/e1000.c      | 103 ++++++++++++++++++++++++++++++++++++++++------------
 include/hw/compat.h |   4 ++
 2 files changed, 84 insertions(+), 23 deletions(-)

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

* Re: [Qemu-devel] [PULL 0/6] Net patches
  2018-04-10  3:39 Jason Wang
@ 2018-04-10 13:04 ` Peter Maydell
  0 siblings, 0 replies; 22+ messages in thread
From: Peter Maydell @ 2018-04-10 13:04 UTC (permalink / raw)
  To: Jason Wang; +Cc: QEMU Developers

On 10 April 2018 at 04:39, Jason Wang <jasowang@redhat.com> wrote:
> The following changes since commit 915d34c5f99b0ab91517c69f54272bfdb6ca2b32:
>
>   Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2018-04-09 17:29:10 +0100)
>
> are available in the git repository at:
>
>   https://github.com/jasowang/qemu.git tags/net-pull-request
>
> for you to fetch changes up to 5f523530915e57a14ffb8c00e22252bfa557441c:
>
>   e1000: Old machine types, turn new subsection off (2018-04-10 11:30:04 +0800)
>
> ----------------------------------------------------------------
>
> A series from David that switches to use subsection instead of version
> bumping for e1000 to keep migration compatibility for old
> versions. This will ease the downstream maintaining.
>
> Please merge.
>
> Thanks
>
> ----------------------------------------------------------------
> Dr. David Alan Gilbert (6):
>       e1000: Convert v3 fields to subsection
>       e1000: Dupe offload data on reading old stream
>       e1000: wire new subsection to property
>       e1000: Migrate props via a temporary structure
>       e1000: Choose which set of props to migrate
>       e1000: Old machine types, turn new subsection off
>
>  hw/net/e1000.c      | 103 ++++++++++++++++++++++++++++++++++++++++------------
>  include/hw/compat.h |   4 ++
>  2 files changed, 84 insertions(+), 23 deletions(-)

Applied, thanks.

-- PMM

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

end of thread, other threads:[~2018-04-10 13:04 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-20  3:07 [Qemu-devel] [PULL 0/6] Net patches Jason Wang
2017-01-20  3:07 ` [Qemu-devel] [PULL 1/6] docs: Fix description of the sentence Jason Wang
2017-01-20  3:07 ` [Qemu-devel] [PULL 2/6] net: optimize checksum computation Jason Wang
2017-01-20  3:07 ` [Qemu-devel] [PULL 3/6] m68k: QOMify the MCF Fast Ethernet Controller device Jason Wang
2017-01-20  3:07 ` [Qemu-devel] [PULL 4/6] hw/net/dp8393x: Avoid unintentional sign extensions on addresses Jason Wang
2017-01-20  3:07 ` [Qemu-devel] [PULL 5/6] hw/pci: use-after-free in pci_nic_init_nofail when nic device fails to initialize Jason Wang
2017-01-20  3:07 ` [Qemu-devel] [PULL 6/6] tap: fix memory leak on failure in net_init_tap() Jason Wang
2017-01-20 15:53 ` [Qemu-devel] [PULL 0/6] Net patches Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2018-04-10  3:39 Jason Wang
2018-04-10 13:04 ` Peter Maydell
2018-01-29  8:16 Jason Wang
2018-01-29  8:25 ` no-reply
2018-01-29 10:02   ` Jason Wang
2018-01-29 10:58     ` Thomas Huth
2018-01-29 12:30       ` Jason Wang
2018-01-29 15:52 ` Peter Maydell
2017-11-20  3:31 Jason Wang
2017-11-20  3:44 ` no-reply
2017-11-20  4:39   ` Thomas Huth
2017-11-20 17:59 ` Peter Maydell
2015-02-06 14:10 Stefan Hajnoczi
2015-02-06 16:10 ` Peter Maydell

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).