All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL for-1.7 0/2] Net patches
@ 2013-11-19 12:41 Stefan Hajnoczi
  2013-11-19 12:41 ` [Qemu-devel] [PULL for-1.7 1/2] smc91c111: Fix receive starvation Stefan Hajnoczi
  2013-11-19 12:41 ` [Qemu-devel] [PULL for-1.7 2/2] virtio-net: fix the memory leak in rxfilter_notify() Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2013-11-19 12:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Anthony Liguori

Bug fixes for QEMU 1.7.

The following changes since commit 5c5432e7d630592ddcc1876ac8a1505f8f14ef15:

  Merge remote-tracking branch 'luiz/queue/qmp' into staging (2013-11-13 11:49:27 -0800)

are available in the git repository at:


  git://github.com/stefanha/qemu.git net

for you to fetch changes up to 96e35046e4a97df5b4e1e24e217eb1e1701c7c71:

  virtio-net: fix the memory leak in rxfilter_notify() (2013-11-19 10:26:55 +0100)

----------------------------------------------------------------
Amos Kong (1):
      virtio-net: fix the memory leak in rxfilter_notify()

Sebastian Huber (1):
      smc91c111: Fix receive starvation

 hw/net/smc91c111.c  | 1 +
 hw/net/virtio-net.c | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

-- 
1.8.4.2

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

* [Qemu-devel] [PULL for-1.7 1/2] smc91c111: Fix receive starvation
  2013-11-19 12:41 [Qemu-devel] [PULL for-1.7 0/2] Net patches Stefan Hajnoczi
@ 2013-11-19 12:41 ` Stefan Hajnoczi
  2013-11-19 12:41 ` [Qemu-devel] [PULL for-1.7 2/2] virtio-net: fix the memory leak in rxfilter_notify() Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2013-11-19 12:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: Sebastian Huber, Stefan Hajnoczi, Anthony Liguori

From: Sebastian Huber <sebastian.huber@embedded-brains.de>

In case the smc91c111 interface signals that it cannot receive more
packets the packets are queued and further reception will be disabled.
In case the interface is again ready to receive packets notify the upper
layer.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/net/smc91c111.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
index f5963e2..a8e29b3 100644
--- a/hw/net/smc91c111.c
+++ b/hw/net/smc91c111.c
@@ -185,6 +185,7 @@ static void smc91c111_release_packet(smc91c111_state *s, int packet)
     s->allocated &= ~(1 << packet);
     if (s->tx_alloc == 0x80)
         smc91c111_tx_alloc(s);
+    qemu_flush_queued_packets(qemu_get_queue(s->nic));
 }
 
 /* Flush the TX FIFO.  */
-- 
1.8.4.2

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

* [Qemu-devel] [PULL for-1.7 2/2] virtio-net: fix the memory leak in rxfilter_notify()
  2013-11-19 12:41 [Qemu-devel] [PULL for-1.7 0/2] Net patches Stefan Hajnoczi
  2013-11-19 12:41 ` [Qemu-devel] [PULL for-1.7 1/2] smc91c111: Fix receive starvation Stefan Hajnoczi
@ 2013-11-19 12:41 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2013-11-19 12:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: Amos Kong, Stefan Hajnoczi, Anthony Liguori

From: Amos Kong <akong@redhat.com>

object_get_canonical_path() returns a gchar*, it should be freed by the
caller.

Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Vlad Yasevich <vyasevic@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/net/virtio-net.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 613f144..b75c753 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -200,16 +200,16 @@ static void rxfilter_notify(NetClientState *nc)
     VirtIONet *n = qemu_get_nic_opaque(nc);
 
     if (nc->rxfilter_notify_enabled) {
+        gchar *path = object_get_canonical_path(OBJECT(n->qdev));
         if (n->netclient_name) {
             event_data = qobject_from_jsonf("{ 'name': %s, 'path': %s }",
-                                    n->netclient_name,
-                                    object_get_canonical_path(OBJECT(n->qdev)));
+                                    n->netclient_name, path);
         } else {
-            event_data = qobject_from_jsonf("{ 'path': %s }",
-                                    object_get_canonical_path(OBJECT(n->qdev)));
+            event_data = qobject_from_jsonf("{ 'path': %s }", path);
         }
         monitor_protocol_event(QEVENT_NIC_RX_FILTER_CHANGED, event_data);
         qobject_decref(event_data);
+        g_free(path);
 
         /* disable event notification to avoid events flooding */
         nc->rxfilter_notify_enabled = 0;
-- 
1.8.4.2

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

end of thread, other threads:[~2013-11-19 12:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-19 12:41 [Qemu-devel] [PULL for-1.7 0/2] Net patches Stefan Hajnoczi
2013-11-19 12:41 ` [Qemu-devel] [PULL for-1.7 1/2] smc91c111: Fix receive starvation Stefan Hajnoczi
2013-11-19 12:41 ` [Qemu-devel] [PULL for-1.7 2/2] virtio-net: fix the memory leak in rxfilter_notify() Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.