aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-05-24 13:47:33 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-05-24 13:47:33 -0500
commit4a542df0910dff2caf17d6bb76bbf3704197db42 (patch)
tree0e59ee63f12613fdfaebc9f6fac5b3314607f046
parent4c5dad040bce8f8c9924dc72cfac9380e4ffdc26 (diff)
parent00b7ade807b5ce6779ddd86ce29c5521ec5c529a (diff)
Merge remote-tracking branch 'stefanha/net' into staging
# By Alasdair McLeay (1) and Stefan Hajnoczi (1) # Via Stefan Hajnoczi * stefanha/net: rtl8139: flush queued packets when RxBufPtr is written net: support for bridged networking on Mac OS X Message-id: 1369406295-20411-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/net/rtl8139.c3
-rw-r--r--net/tap-bsd.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 9369507422..7993f9f5b9 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -2575,6 +2575,9 @@ static void rtl8139_RxBufPtr_write(RTL8139State *s, uint32_t val)
/* this value is off by 16 */
s->RxBufPtr = MOD2(val + 0x10, s->RxBufferSize);
+ /* more buffer space may be available so try to receive */
+ qemu_flush_queued_packets(qemu_get_queue(s->nic));
+
DPRINTF(" CAPR write: rx buffer length %d head 0x%04x read 0x%04x\n",
s->RxBufferSize, s->RxBufAddr, s->RxBufPtr);
}
diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index bcdb2682b5..f61d580963 100644
--- a/net/tap-bsd.c
+++ b/net/tap-bsd.c
@@ -44,7 +44,8 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
struct stat s;
#endif
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__OpenBSD__) || defined(__APPLE__)
/* if no ifname is given, always start the search from tap0/tun0. */
int i;
char dname[100];