Skip to contentSkip to conversation

Some networking code re-organization

PATCH Superseded Mark McLoughlin 2 participants 22 messages Oct 22, 2009 – Oct 23, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Some networking code re-organization

Hey,
We've been meaning to split net.c up for quite a while now,
so here goes with a first cut at.

There shouldn't be anything too controversial here, apart
from CONFIG_LINUX maybe.

I've build tested this on F11, F12 and mingw and also done
some basic runtime testing.

Building on e.g. *BSD, Solaris and AIX hasn't been tested.
I wouldn't be surprised if I've broken the build there despite all my efforts but, if I have, it should be trivial to fix back up.

This isn't the end of the cleanups; obviously the other
backends could be split out too, we could use module construtors, etc.

Cheers,
Mark.

#1 lore raw

PATCH 1/15 net: move net-queue.[ch] under net/

---
 Makefile    |    6 +-
 net-queue.c |  260 -----------------------------------------------------------
 net-queue.h |   71 ----------------
 net.h       |    2 +-
 net/queue.c |  260 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 net/queue.h |   71 ++++++++++++++++
 6 files changed, 337 insertions(+), 333 deletions(-)
 delete mode 100644 net-queue.c
 delete mode 100644 net-queue.h
 create mode 100644 net/queue.c
 create mode 100644 net/queue.h
Makefile +5 -1
index e78a3d0..6fb89fb 100644
@@ -86,6 +86,10 @@ block-nested-$(CONFIG_CURL) += curl.o
 
 block-obj-y +=  $(addprefix block/, $(block-nested-y))
 
+net-obj-y = net.o
+net-nested-y = queue.o
+net-obj-y += $(addprefix net/, $(net-nested-y))
+
 ######################################################################
 # libqemu_common.a: Target independent part of system emulation. The
 # long term path is to suppress *all* target specific code in case of
@@ -93,6 +97,7 @@ block-obj-y +=  $(addprefix block/, $(block-nested-y))
 # CPUs and machines.
 
 obj-y = $(block-obj-y)
+obj-y += $(net-obj-y)
 obj-y += readline.o console.o
 
 obj-y += tcg-runtime.o host-utils.o
@@ -121,7 +126,6 @@ obj-$(CONFIG_SD) += sd.o
 obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
 obj-y += bt-hci-csr.o
 obj-y += buffered_file.o migration.o migration-tcp.o qemu-sockets.o
-obj-y += net.o net-queue.o
 obj-y += qemu-char.o aio.o net-checksum.o savevm.o
 obj-y += msmouse.o ps2.o
 obj-y += qdev.o qdev-properties.o
net-queue.c deleted +0 -260

260 lines not on this page · raw message

net-queue.h deleted +0 -71

71 lines not on this page · raw message

net.h +1 -1
index 7e6cbf4..9ebb978 100644
@@ -5,7 +5,7 @@
 #include "qemu-common.h"
 #include "qdict.h"
 #include "qemu-option.h"
-#include "net-queue.h"
+#include "net/queue.h"
 
 /* VLANs support */
 
net/queue.c new file +260 -0

260 lines not on this page · raw message

net/queue.h new file +71 -0

71 lines not on this page · raw message

Signature · 1 line
1.6.2.5
#2 lore raw

PATCH v2 1/15 net: move net-queue.[ch] under net/

[v2: handle building in a separate dir]

---
 Makefile                   |   10 +++++++---
 configure                  |    2 +-
 net.h                      |    2 +-
 net-queue.c => net/queue.c |    2 +-
 net-queue.h => net/queue.h |    0
 5 files changed, 10 insertions(+), 6 deletions(-)
 rename net-queue.c => net/queue.c (99%)
 rename net-queue.h => net/queue.h (100%)
Makefile +7 -3
index e78a3d0..aea7756 100644
@@ -86,6 +86,10 @@ block-nested-$(CONFIG_CURL) += curl.o
 
 block-obj-y +=  $(addprefix block/, $(block-nested-y))
 
+net-obj-y = net.o
+net-nested-y = queue.o
+net-obj-y += $(addprefix net/, $(net-nested-y))
+
 ######################################################################
 # libqemu_common.a: Target independent part of system emulation. The
 # long term path is to suppress *all* target specific code in case of
@@ -93,6 +97,7 @@ block-obj-y +=  $(addprefix block/, $(block-nested-y))
 # CPUs and machines.
 
 obj-y = $(block-obj-y)
+obj-y += $(net-obj-y)
 obj-y += readline.o console.o
 
 obj-y += tcg-runtime.o host-utils.o
@@ -121,7 +126,6 @@ obj-$(CONFIG_SD) += sd.o
 obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
 obj-y += bt-hci-csr.o
 obj-y += buffered_file.o migration.o migration-tcp.o qemu-sockets.o
-obj-y += net.o net-queue.o
 obj-y += qemu-char.o aio.o net-checksum.o savevm.o
 obj-y += msmouse.o ps2.o
 obj-y += qdev.o qdev-properties.o
@@ -220,7 +224,7 @@ clean:
 # avoid old build problems by removing potentially incorrect old files
 	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
 	rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
-	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
+	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d
 	rm -f qemu-img-cmds.h
 	$(MAKE) -C tests clean
 	for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser; do \
@@ -404,4 +408,4 @@ tarbin:
 	$(mandir)/man8/qemu-nbd.8
 
 # Include automatically generated dependency files
--include $(wildcard *.d audio/*.d slirp/*.d block/*.d)
+-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d)
configure +1 -1
index 43d87c5..6b4faf6 100755
@@ -2529,7 +2529,7 @@ done # for target in $targets
 
 # build tree in object directory if source path is different from current one
 if test "$source_path_used" = "yes" ; then
-    DIRS="tests tests/cris slirp audio block pc-bios/optionrom"
+    DIRS="tests tests/cris slirp audio block net pc-bios/optionrom"
     DIRS="$DIRS roms/pcbios roms/seabios roms/vgabios"
     FILES="Makefile tests/Makefile"
     FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"
net.h +1 -1
index 7e6cbf4..9ebb978 100644
@@ -5,7 +5,7 @@
 #include "qemu-common.h"
 #include "qdict.h"
 #include "qemu-option.h"
-#include "net-queue.h"
+#include "net/queue.h"
 
 /* VLANs support */
 
net/queue.c renamed from net-queue.c +1 -1
similarity index 99%
rename from net-queue.c
rename to net/queue.c
index f6b01e9..e91a9a5 100644
@@ -21,7 +21,7 @@
  * THE SOFTWARE.
  */
 
-#include "net-queue.h"
+#include "net/queue.h"
 #include "qemu-queue.h"
 
 /* The delivery handler may only return zero if it will call
net/queue.h renamed from net-queue.h +0 -0
similarity index 100%
rename from net-queue.h
rename to net/queue.h
Signature · 1 line
1.6.2.5
#3 lore raw

PATCH 2/15 net: move net-checksum.c under net/

In reply to Mark McLoughlin

Also add a new net/checksum.h header

---
 Makefile        |    4 +-
 hw/e1000.c      |    1 +
 hw/virtio-net.c |    1 +
 hw/xen_nic.c    |    1 +
 net-checksum.c  |   86 -------------------------------------------------------
 net.h           |    7 ----
 net/checksum.c  |   85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 net/checksum.h  |   29 ++++++++++++++++++
 8 files changed, 119 insertions(+), 95 deletions(-)
 delete mode 100644 net-checksum.c
 create mode 100644 net/checksum.c
 create mode 100644 net/checksum.h
Makefile +2 -2
index 6fb89fb..c8c0b18 100644
@@ -87,7 +87,7 @@ block-nested-$(CONFIG_CURL) += curl.o
 block-obj-y +=  $(addprefix block/, $(block-nested-y))
 
 net-obj-y = net.o
-net-nested-y = queue.o
+net-nested-y = queue.o checksum.o
 net-obj-y += $(addprefix net/, $(net-nested-y))
 
 ######################################################################
@@ -126,7 +126,7 @@ obj-$(CONFIG_SD) += sd.o
 obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
 obj-y += bt-hci-csr.o
 obj-y += buffered_file.o migration.o migration-tcp.o qemu-sockets.o
-obj-y += qemu-char.o aio.o net-checksum.o savevm.o
+obj-y += qemu-char.o aio.o savevm.o
 obj-y += msmouse.o ps2.o
 obj-y += qdev.o qdev-properties.o
 obj-y += qint.o qstring.o qdict.o qlist.o qemu-config.o
hw/e1000.c +1 -0
index f123bda..bf753f2 100644
@@ -25,6 +25,7 @@
 #include "hw.h"
 #include "pci.h"
 #include "net.h"
+#include "net/checksum.h"
 
 #include "e1000_hw.h"
 
hw/virtio-net.c +1 -0
index 15b6f45..9e0acaf 100644
@@ -13,6 +13,7 @@
 
 #include "virtio.h"
 #include "net.h"
+#include "net/checksum.h"
 #include "qemu-timer.h"
 #include "virtio-net.h"
 
hw/xen_nic.c +1 -0
index 75599d6..bcf161c 100644
@@ -40,6 +40,7 @@
 
 #include "hw.h"
 #include "net.h"
+#include "net/checksum.h"
 #include "qemu-char.h"
 #include "xen_backend.h"
 
net-checksum.c deleted +0 -86

86 lines not on this page · raw message

net.h +0 -7
index 9ebb978..86eb200 100644
@@ -128,13 +128,6 @@ struct HCIInfo {
 
 struct HCIInfo *qemu_next_hci(void);
 
-/* checksumming functions (net-checksum.c) */
-uint32_t net_checksum_add(int len, uint8_t *buf);
-uint16_t net_checksum_finish(uint32_t sum);
-uint16_t net_checksum_tcpudp(uint16_t length, uint16_t proto,
-                             uint8_t *addrs, uint8_t *buf);
-void net_checksum_calculate(uint8_t *data, int length);
-
 /* from net.c */
 extern const char *legacy_tftp_prefix;
 extern const char *legacy_bootp_filename;
net/checksum.c new file +85 -0

85 lines not on this page · raw message

net/checksum.h new file +29 -0
new file mode 100644
index 0000000..1f05298
@@ -0,0 +1,29 @@
+/*
+ *  IP checksumming functions.
+ *  (c) 2008 Gerd Hoffmann <[email protected]>
+ *
+ *  This program 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; under version 2 of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef QEMU_NET_CHECKSUM_H
+#define QEMU_NET_CHECKSUM_H
+
+#include <stdint.h>
+
+uint32_t net_checksum_add(int len, uint8_t *buf);
+uint16_t net_checksum_finish(uint32_t sum);
+uint16_t net_checksum_tcpudp(uint16_t length, uint16_t proto,
+                             uint8_t *addrs, uint8_t *buf);
+void net_checksum_calculate(uint8_t *data, int length);
+
+#endif /* QEMU_NET_CHECKSUM_H */
Signature · 1 line
1.6.2.5
#4 lore raw

PATCH 3/15 net: move tap-win32.c under net/

In reply to Mark McLoughlin
---
 Makefile        |    2 +-
 net/tap-win32.c |  690 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tap-win32.c     |  690 -------------------------------------------------------
 3 files changed, 691 insertions(+), 691 deletions(-)
 create mode 100644 net/tap-win32.c
 delete mode 100644 tap-win32.c
Makefile +1 -1
index c8c0b18..a49177f 100644
@@ -88,6 +88,7 @@ block-obj-y +=  $(addprefix block/, $(block-nested-y))
 
 net-obj-y = net.o
 net-nested-y = queue.o checksum.o
+net-nested-$(CONFIG_WIN32) += tap-win32.o
 net-obj-y += $(addprefix net/, $(net-nested-y))
 
 ######################################################################
@@ -132,7 +133,6 @@ obj-y += qdev.o qdev-properties.o
 obj-y += qint.o qstring.o qdict.o qlist.o qemu-config.o
 
 obj-$(CONFIG_BRLAPI) += baum.o
-obj-$(CONFIG_WIN32) += tap-win32.o
 obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
 
 audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
net/tap-win32.c new file +690 -0

690 lines not on this page · raw message

tap-win32.c deleted +0 -690

690 lines not on this page · raw message

Signature · 1 line
1.6.2.5
#5 lore raw

PATCH 4/15 net: move more stuff into net/tap-win32.c, add net/tap.h

In reply to Mark McLoughlin
---
 hw/virtio-net.c |    1 +
 net.c           |   75 ++++++++----------------------------------------------
 net.h           |    5 ---
 net/tap-win32.c |   48 +++++++++++++++++++++++++++++++++-
 net/tap.h       |   42 ++++++++++++++++++++++++++++++
 sysemu.h        |    4 ---
 6 files changed, 100 insertions(+), 75 deletions(-)
 create mode 100644 net/tap.h
hw/virtio-net.c +1 -0
index 9e0acaf..7ee393b 100644
@@ -14,6 +14,7 @@
 #include "virtio.h"
 #include "net.h"
 #include "net/checksum.h"
+#include "net/tap.h"
 #include "qemu-timer.h"
 #include "virtio-net.h"
 
net.c +11 -64

132 lines not on this page · raw message

net.h +0 -5
index 86eb200..1a907c7 100644
@@ -161,9 +161,4 @@ VLANClientState *qdev_get_vlan_client(DeviceState *dev,
                                       NetCleanup *cleanup,
                                       void *opaque);
 
-int tap_has_ufo(VLANClientState *vc);
-int tap_has_vnet_hdr(VLANClientState *vc);
-void tap_using_vnet_hdr(VLANClientState *vc, int using_vnet_hdr);
-void tap_set_offload(VLANClientState *vc, int csum, int tso4, int tso6, int ecn, int ufo);
-
 #endif
net/tap-win32.c +46 -2

63 lines not on this page · raw message

net/tap.h new file +42 -0

42 lines not on this page · raw message

sysemu.h +0 -4
index 763861d..05822dc 100644
@@ -88,10 +88,6 @@ int qemu_add_wait_object(HANDLE handle, WaitObjectFunc *func, void *opaque);
 void qemu_del_wait_object(HANDLE handle, WaitObjectFunc *func, void *opaque);
 #endif
 
-/* TAP win32 */
-int tap_win32_init(VLANState *vlan, const char *model,
-                   const char *name, const char *ifname);
-
 /* SLIRP */
 void do_info_slirp(Monitor *mon);
 
Signature · 1 line
1.6.2.5
#6 lore raw

PATCH 5/15 net: move tap-linux.h under net/

In reply to Mark McLoughlin
---
 net.c           |    2 +-
 net/tap-linux.h |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tap-linux.h     |   51 ---------------------------------------------------
 3 files changed, 52 insertions(+), 52 deletions(-)
 create mode 100644 net/tap-linux.h
 delete mode 100644 tap-linux.h
net.c +1 -1
index 2f31562..3225dcd 100644
@@ -46,7 +46,7 @@
 #include <net/if_tap.h>
 #endif
 #ifdef __linux__
-#include "tap-linux.h"
+#include "net/tap-linux.h"
 #endif
 #include <arpa/inet.h>
 #include <dirent.h>
net/tap-linux.h new file +51 -0

51 lines not on this page · raw message

tap-linux.h deleted +0 -51

51 lines not on this page · raw message

Signature · 1 line
1.6.2.5
#7 lore raw

PATCH 6/15 net: split all the tap code out into net/tap.c

In reply to Mark McLoughlin
---
 Makefile  |    1 +
 net.c     |  692 +-------------------------------------------------------
 net.h     |    2 +
 net/tap.c |  759 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 763 insertions(+), 691 deletions(-)
 create mode 100644 net/tap.c
Makefile +1 -0
index a49177f..69ead10 100644
@@ -88,6 +88,7 @@ block-obj-y +=  $(addprefix block/, $(block-nested-y))
 
 net-obj-y = net.o
 net-nested-y = queue.o checksum.o
+net-nested-$(CONFIG_POSIX) += tap.o
 net-nested-$(CONFIG_WIN32) += tap-win32.o
 net-obj-y += $(addprefix net/, $(net-nested-y))
 
net.c +1 -691

716 lines not on this page · raw message

net.h +2 -0
index 1a907c7..8074c66 100644
@@ -161,4 +161,6 @@ VLANClientState *qdev_get_vlan_client(DeviceState *dev,
                                       NetCleanup *cleanup,
                                       void *opaque);
 
+int net_handle_fd_param(Monitor *mon, const char *param);
+
 #endif
net/tap.c new file +759 -0

759 lines not on this page · raw message

Signature · 1 line
1.6.2.5
#8 lore raw

PATCH 7/15 net: split BSD tap_open() out into net/tap-bsd.c

In reply to Mark McLoughlin
---
 Makefile      |    1 +
 net/tap-bsd.c |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 net/tap.c     |   50 +++------------------------------------------
 net/tap.h     |    2 +
 4 files changed, 69 insertions(+), 46 deletions(-)
 create mode 100644 net/tap-bsd.c
Makefile +1 -0
index 69ead10..a29c486 100644
@@ -90,6 +90,7 @@ net-obj-y = net.o
 net-nested-y = queue.o checksum.o
 net-nested-$(CONFIG_POSIX) += tap.o
 net-nested-$(CONFIG_WIN32) += tap-win32.o
+net-nested-$(CONFIG_BSD) += tap-bsd.o
 net-obj-y += $(addprefix net/, $(net-nested-y))
 
 ######################################################################
net/tap-bsd.c new file +62 -0

62 lines not on this page · raw message

net/tap.c +4 -46

79 lines not on this page · raw message

net/tap.h +2 -0
index 53952a1..5d32de5 100644
@@ -34,6 +34,8 @@
 
 int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan);
 
+int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required);
+
 int tap_has_ufo(VLANClientState *vc);
 int tap_has_vnet_hdr(VLANClientState *vc);
 void tap_using_vnet_hdr(VLANClientState *vc, int using_vnet_hdr);
Signature · 1 line
1.6.2.5
#9 lore raw

PATCH 8/15 net: move solaris code to net/tap-solaris.c

In reply to Mark McLoughlin
---
 Makefile          |    1 +
 net/tap-solaris.c |  185 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 net/tap.c         |  168 +-----------------------------------------------
 net/tap.h         |    2 +
 4 files changed, 191 insertions(+), 165 deletions(-)
 create mode 100644 net/tap-solaris.c
Makefile +1 -0
index a29c486..5918213 100644
@@ -91,6 +91,7 @@ net-nested-y = queue.o checksum.o
 net-nested-$(CONFIG_POSIX) += tap.o
 net-nested-$(CONFIG_WIN32) += tap-win32.o
 net-nested-$(CONFIG_BSD) += tap-bsd.o
+net-nested-$(CONFIG_SOLARIS) += tap-solaris.o
 net-obj-y += $(addprefix net/, $(net-nested-y))
 
 ######################################################################
net/tap-solaris.c new file +185 -0

185 lines not on this page · raw message

net/tap.c +3 -165

186 lines not on this page · raw message

net/tap.h +2 -0
index 5d32de5..5648ddd 100644
@@ -36,6 +36,8 @@ int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan
 
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required);
 
+ssize_t tap_read_packet(int tapfd, uint8_t *buf, int maxlen);
+
 int tap_has_ufo(VLANClientState *vc);
 int tap_has_vnet_hdr(VLANClientState *vc);
 void tap_using_vnet_hdr(VLANClientState *vc, int using_vnet_hdr);
Signature · 1 line
1.6.2.5
#10 lore raw

PATCH 9/15 net: move AIX code into net/tap-aix.c

In reply to Mark McLoughlin

Okay, this makes the tap options available on AIX even though there's no support, but if we want to do it right we should have not compile the tap code at all on AIX using e.g. CONFIG_TAP.

---
 Makefile      |    1 +
 net.c         |    2 --
 net/tap-aix.c |   32 ++++++++++++++++++++++++++++++++
 net/tap.c     |   12 ------------
 4 files changed, 33 insertions(+), 14 deletions(-)
 create mode 100644 net/tap-aix.c
Makefile +1 -0
index 5918213..b9ff2eb 100644
@@ -92,6 +92,7 @@ net-nested-$(CONFIG_POSIX) += tap.o
 net-nested-$(CONFIG_WIN32) += tap-win32.o
 net-nested-$(CONFIG_BSD) += tap-bsd.o
 net-nested-$(CONFIG_SOLARIS) += tap-solaris.o
+net-nested-$(CONFIG_AIX) += tap-aix.o
 net-obj-y += $(addprefix net/, $(net-nested-y))
 
 ######################################################################
net.c +0 -2
index 365305a..661bbc1 100644
@@ -2425,7 +2425,6 @@ static struct {
             { /* end of list */ }
         },
 #endif
-#ifndef _AIX
     }, {
         .type = "tap",
         .init = net_init_tap,
@@ -2461,7 +2460,6 @@ static struct {
 #endif /* _WIN32 */
             { /* end of list */ }
         },
-#endif /* _AIX */
     }, {
         .type = "socket",
         .init = net_init_socket,
net/tap-aix.c new file +32 -0
new file mode 100644
index 0000000..5ec3b2c
@@ -0,0 +1,32 @@
+/*
+ * QEMU System Emulator
+ *
+ * Copyright (c) 2003-2008 Fabrice Bellard
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "net/tap.h"
+#include <stdio.h>
+
+int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required)
+{
+    fprintf(stderr, "no tap on AIX\n");
+    return -1;
+}
net/tap.c +0 -12
index 056fefe..560e0e4 100644
@@ -42,8 +42,6 @@
 #include "net/tap-linux.h"
 #endif
 
-#if !defined(_AIX)
-
 /* Maximum GSO packet size (64k) plus plenty of room for
  * the ethernet and virtio_net headers
  */
@@ -349,13 +347,6 @@ static TAPState *net_tap_fd_init(VLANState *vlan,
     return s;
 }
 
-#ifdef _AIX
-int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required)
-{
-    fprintf (stderr, "no tap on AIX\n");
-    return -1;
-}
-#else
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required)
 {
     struct ifreq ifr;
@@ -400,7 +391,6 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
     fcntl(fd, F_SETFL, O_NONBLOCK);
     return fd;
 }
-#endif
 
 static int launch_script(const char *setup_script, const char *ifname, int fd)
 {
@@ -551,5 +541,3 @@ int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan
 
     return 0;
 }
-
-#endif /* !defined(_AIX) */
Signature · 1 line
1.6.2.5
#11 lore raw

PATCH 10/15 build: add CONFIG_LINUX

In reply to Mark McLoughlin

So I can add a tap-linux.c and use CONFIG_LINUX to pull it in in Makefile

---
 configure |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
configure +4 -0
index 43d87c5..4ccdebe 100755
@@ -1897,6 +1897,10 @@ else
   echo "CONFIG_POSIX=y" >> $config_host_mak
 fi
 
+if test "$linux" = "yes" ; then
+  echo "CONFIG_LINUX=y" >> $config_host_mak
+fi
+
 if test "$darwin" = "yes" ; then
   echo "CONFIG_DARWIN=y" >> $config_host_mak
 fi
Signature · 1 line
1.6.2.5
#12 lore raw

PATCH 11/15 net: move linux code into net/tap-linux.c

In reply to Mark McLoughlin
---
 Makefile        |    1 +
 net/tap-linux.c |   78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 net/tap.c       |   47 ---------------------------------
 3 files changed, 79 insertions(+), 47 deletions(-)
 create mode 100644 net/tap-linux.c
Makefile +1 -0
index b9ff2eb..44bd7ef 100644
@@ -89,6 +89,7 @@ block-obj-y +=  $(addprefix block/, $(block-nested-y))
 net-obj-y = net.o
 net-nested-y = queue.o checksum.o
 net-nested-$(CONFIG_POSIX) += tap.o
+net-nested-$(CONFIG_LINUX) += tap-linux.o
 net-nested-$(CONFIG_WIN32) += tap-win32.o
 net-nested-$(CONFIG_BSD) += tap-bsd.o
 net-nested-$(CONFIG_SOLARIS) += tap-solaris.o
net/tap-linux.c new file +78 -0

78 lines not on this page · raw message

net/tap.c +0 -47

60 lines not on this page · raw message

Signature · 1 line
1.6.2.5
#13 lore raw

PATCH 12/15 net: move tap_set_sndbuf() to tap-linux.c

In reply to Mark McLoughlin

TUNSETSNDBUF is only available on linux

---
 net/tap-aix.c     |    6 ++++++
 net/tap-bsd.c     |    5 +++++
 net/tap-linux.c   |   23 +++++++++++++++++++++++
 net/tap-solaris.c |    5 +++++
 net/tap.c         |   25 +------------------------
 net/tap.h         |    2 ++
 6 files changed, 42 insertions(+), 24 deletions(-)
net/tap-aix.c +6 -0
index 5ec3b2c..3f9ccdd 100644
@@ -30,3 +30,9 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
     fprintf(stderr, "no tap on AIX\n");
     return -1;
 }
+
+int tap_set_sndbuf(int fd, QemuOpts *opts)
+{
+    return 0;
+}
+
net/tap-bsd.c +5 -0
index 6940434..e28615f 100644
@@ -60,3 +60,8 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
     fcntl(fd, F_SETFL, O_NONBLOCK);
     return fd;
 }
+
+int tap_set_sndbuf(int fd, QemuOpts *opts)
+{
+    return 0;
+}
net/tap-linux.c +23 -0
index c6f751e..6c3b6e3 100644
@@ -76,3 +76,26 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
     fcntl(fd, F_SETFL, O_NONBLOCK);
     return fd;
 }
+
+/* sndbuf should be set to a value lower than the tx queue
+ * capacity of any destination network interface.
+ * Ethernet NICs generally have txqueuelen=1000, so 1Mb is
+ * a good default, given a 1500 byte MTU.
+ */
+#define TAP_DEFAULT_SNDBUF 1024*1024
+
+int tap_set_sndbuf(int fd, QemuOpts *opts)
+{
+    int sndbuf;
+
+    sndbuf = qemu_opt_get_size(opts, "sndbuf", TAP_DEFAULT_SNDBUF);
+    if (!sndbuf) {
+        sndbuf = INT_MAX;
+    }
+
+    if (ioctl(fd, TUNSETSNDBUF, &sndbuf) == -1 && qemu_opt_get(opts, "sndbuf")) {
+        qemu_error("TUNSETSNDBUF ioctl failed: %s\n", strerror(errno));
+        return -1;
+    }
+    return 0;
+}
net/tap-solaris.c +5 -0
index 0dd5b68..de5855a 100644
@@ -183,3 +183,8 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
     fcntl(fd, F_SETFL, O_NONBLOCK);
     return fd;
 }
+
+int tap_set_sndbuf(int fd, QemuOpts *opts)
+{
+    return 0;
+}
net/tap.c +1 -24
index 5392937..df2cfbe 100644
@@ -209,29 +209,6 @@ static void tap_send(void *opaque)
     } while (size > 0);
 }
 
-/* sndbuf should be set to a value lower than the tx queue
- * capacity of any destination network interface.
- * Ethernet NICs generally have txqueuelen=1000, so 1Mb is
- * a good default, given a 1500 byte MTU.
- */
-#define TAP_DEFAULT_SNDBUF 1024*1024
-
-static int tap_set_sndbuf(TAPState *s, QemuOpts *opts)
-{
-    int sndbuf;
-
-    sndbuf = qemu_opt_get_size(opts, "sndbuf", TAP_DEFAULT_SNDBUF);
-    if (!sndbuf) {
-        sndbuf = INT_MAX;
-    }
-
-    if (ioctl(s->fd, TUNSETSNDBUF, &sndbuf) == -1 && qemu_opt_get(opts, "sndbuf")) {
-        qemu_error("TUNSETSNDBUF ioctl failed: %s\n", strerror(errno));
-        return -1;
-    }
-    return 0;
-}
-
 int tap_has_ufo(VLANClientState *vc)
 {
     TAPState *s = vc->opaque;
@@ -465,7 +442,7 @@ int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan
         return -1;
     }
 
-    if (tap_set_sndbuf(s, opts) < 0) {
+    if (tap_set_sndbuf(s->fd, opts) < 0) {
         return -1;
     }
 
net/tap.h +2 -0
index 5648ddd..0d67c24 100644
@@ -43,4 +43,6 @@ int tap_has_vnet_hdr(VLANClientState *vc);
 void tap_using_vnet_hdr(VLANClientState *vc, int using_vnet_hdr);
 void tap_set_offload(VLANClientState *vc, int csum, int tso4, int tso6, int ecn, int ufo);
 
+int tap_set_sndbuf(int fd, QemuOpts *opts);
+
 #endif /* QEMU_NET_TAP_H */
Signature · 1 line
1.6.2.5
#14 lore raw

PATCH 13/15 net: move tap_probe_vnet_hdr() to tap-linux.c

In reply to Mark McLoughlin

Only Linux has support for IFF_VNET_HDR

---
 net/tap-aix.c     |    4 ++++
 net/tap-bsd.c     |    5 +++++
 net/tap-linux.c   |   12 ++++++++++++
 net/tap-solaris.c |    5 +++++
 net/tap.c         |   12 ------------
 net/tap.h         |    1 +
 6 files changed, 27 insertions(+), 12 deletions(-)
net/tap-aix.c +4 -0
index 3f9ccdd..27143ff 100644
@@ -36,3 +36,7 @@ int tap_set_sndbuf(int fd, QemuOpts *opts)
     return 0;
 }
 
+int tap_probe_vnet_hdr(int fd)
+{
+    return 0;
+}
net/tap-bsd.c +5 -0
index e28615f..1cdde90 100644
@@ -65,3 +65,8 @@ int tap_set_sndbuf(int fd, QemuOpts *opts)
 {
     return 0;
 }
+
+int tap_probe_vnet_hdr(int fd)
+{
+    return 0;
+}
net/tap-linux.c +12 -0
index 6c3b6e3..0059404 100644
@@ -99,3 +99,15 @@ int tap_set_sndbuf(int fd, QemuOpts *opts)
     }
     return 0;
 }
+
+int tap_probe_vnet_hdr(int fd)
+{
+    struct ifreq ifr;
+
+    if (ioctl(fd, TUNGETIFF, &ifr) != 0) {
+        qemu_error("TUNGETIFF ioctl() failed: %s\n", strerror(errno));
+        return 0;
+    }
+
+    return ifr.ifr_flags & IFF_VNET_HDR;
+}
net/tap-solaris.c +5 -0
index de5855a..3f48e57 100644
@@ -188,3 +188,8 @@ int tap_set_sndbuf(int fd, QemuOpts *opts)
 {
     return 0;
 }
+
+int tap_probe_vnet_hdr(int fd)
+{
+    return 0;
+}
net/tap.c +0 -12
index df2cfbe..3f6722e 100644
@@ -239,18 +239,6 @@ void tap_using_vnet_hdr(VLANClientState *vc, int using_vnet_hdr)
     s->using_vnet_hdr = using_vnet_hdr;
 }
 
-static int tap_probe_vnet_hdr(int fd)
-{
-    struct ifreq ifr;
-
-    if (ioctl(fd, TUNGETIFF, &ifr) != 0) {
-        qemu_error("TUNGETIFF ioctl() failed: %s\n", strerror(errno));
-        return 0;
-    }
-
-    return ifr.ifr_flags & IFF_VNET_HDR;
-}
-
 void tap_set_offload(VLANClientState *vc, int csum, int tso4,
                      int tso6, int ecn, int ufo)
 {
net/tap.h +1 -0
index 0d67c24..de729a7 100644
@@ -44,5 +44,6 @@ void tap_using_vnet_hdr(VLANClientState *vc, int using_vnet_hdr);
 void tap_set_offload(VLANClientState *vc, int csum, int tso4, int tso6, int ecn, int ufo);
 
 int tap_set_sndbuf(int fd, QemuOpts *opts);
+int tap_probe_vnet_hdr(int fd);
 
 #endif /* QEMU_NET_TAP_H */
Signature · 1 line
1.6.2.5
#15 lore raw

PATCH 14/15 net: move tap_set_offload() code into tap-linux.c

In reply to Mark McLoughlin

TUNSETOFFLOAD is only available on Linux

---
 net/tap-aix.c     |    5 +++++
 net/tap-bsd.c     |    5 +++++
 net/tap-linux.c   |   26 ++++++++++++++++++++++++++
 net/tap-solaris.c |    5 +++++
 net/tap.c         |   21 +--------------------
 net/tap.h         |    1 +
 6 files changed, 43 insertions(+), 20 deletions(-)
net/tap-aix.c +5 -0
index 27143ff..0de3dd9 100644
@@ -40,3 +40,8 @@ int tap_probe_vnet_hdr(int fd)
 {
     return 0;
 }
+
+void tap_fd_set_offload(int fd, int csum, int tso4,
+                        int tso6, int ecn, int ufo)
+{
+}
net/tap-bsd.c +5 -0
index 1cdde90..1e85a3c 100644
@@ -70,3 +70,8 @@ int tap_probe_vnet_hdr(int fd)
 {
     return 0;
 }
+
+void tap_fd_set_offload(int fd, int csum, int tso4,
+                        int tso6, int ecn, int ufo)
+{
+}
net/tap-linux.c +26 -0
index 0059404..b6f1fad 100644
@@ -111,3 +111,29 @@ int tap_probe_vnet_hdr(int fd)
 
     return ifr.ifr_flags & IFF_VNET_HDR;
 }
+
+void tap_fd_set_offload(int fd, int csum, int tso4,
+                        int tso6, int ecn, int ufo)
+{
+    unsigned int offload = 0;
+
+    if (csum) {
+        offload |= TUN_F_CSUM;
+        if (tso4)
+            offload |= TUN_F_TSO4;
+        if (tso6)
+            offload |= TUN_F_TSO6;
+        if ((tso4 || tso6) && ecn)
+            offload |= TUN_F_TSO_ECN;
+        if (ufo)
+            offload |= TUN_F_UFO;
+    }
+
+    if (ioctl(fd, TUNSETOFFLOAD, offload) != 0) {
+        offload &= ~TUN_F_UFO;
+        if (ioctl(fd, TUNSETOFFLOAD, offload) != 0) {
+            fprintf(stderr, "TUNSETOFFLOAD ioctl() failed: %s\n",
+                    strerror(errno));
+        }
+    }
+}
net/tap-solaris.c +5 -0
index 3f48e57..614df01 100644
@@ -193,3 +193,8 @@ int tap_probe_vnet_hdr(int fd)
 {
     return 0;
 }
+
+void tap_fd_set_offload(int fd, int csum, int tso4,
+                        int tso6, int ecn, int ufo)
+{
+}
net/tap.c +1 -20
index 3f6722e..9b11071 100644
@@ -243,27 +243,8 @@ void tap_set_offload(VLANClientState *vc, int csum, int tso4,
                      int tso6, int ecn, int ufo)
 {
     TAPState *s = vc->opaque;
-    unsigned int offload = 0;
-
-    if (csum) {
-        offload |= TUN_F_CSUM;
-        if (tso4)
-            offload |= TUN_F_TSO4;
-        if (tso6)
-            offload |= TUN_F_TSO6;
-        if ((tso4 || tso6) && ecn)
-            offload |= TUN_F_TSO_ECN;
-        if (ufo)
-            offload |= TUN_F_UFO;
-    }
 
-    if (ioctl(s->fd, TUNSETOFFLOAD, offload) != 0) {
-        offload &= ~TUN_F_UFO;
-        if (ioctl(s->fd, TUNSETOFFLOAD, offload) != 0) {
-            fprintf(stderr, "TUNSETOFFLOAD ioctl() failed: %s\n",
-                    strerror(errno));
-        }
-    }
+    return tap_fd_set_offload(s->fd, csum, tso4, tso6, ecn, ufo);
 }
 
 static void tap_cleanup(VLANClientState *vc)
net/tap.h +1 -0
index de729a7..16398b5 100644
@@ -45,5 +45,6 @@ void tap_set_offload(VLANClientState *vc, int csum, int tso4, int tso6, int ecn,
 
 int tap_set_sndbuf(int fd, QemuOpts *opts);
 int tap_probe_vnet_hdr(int fd);
+void tap_fd_set_offload(int fd, int csum, int tso4, int tso6, int ecn, int ufo);
 
 #endif /* QEMU_NET_TAP_H */
Signature · 1 line
1.6.2.5
#16 lore raw

PATCH 15/15 net: move UFO support detection to tap-linux.c

In reply to Mark McLoughlin

Only supported on Linux

---
 net/tap-aix.c     |    5 +++++
 net/tap-bsd.c     |    5 +++++
 net/tap-linux.c   |   12 ++++++++++++
 net/tap-solaris.c |    5 +++++
 net/tap.c         |    7 +------
 net/tap.h         |    1 +
 6 files changed, 29 insertions(+), 6 deletions(-)
net/tap-aix.c +5 -0
index 0de3dd9..4bc9f2f 100644
@@ -41,6 +41,11 @@ int tap_probe_vnet_hdr(int fd)
     return 0;
 }
 
+int tap_probe_has_ufo(int fd)
+{
+    return 0;
+}
+
 void tap_fd_set_offload(int fd, int csum, int tso4,
                         int tso6, int ecn, int ufo)
 {
net/tap-bsd.c +5 -0
index 1e85a3c..3ad14bb 100644
@@ -71,6 +71,11 @@ int tap_probe_vnet_hdr(int fd)
     return 0;
 }
 
+int tap_probe_has_ufo(int fd)
+{
+    return 0;
+}
+
 void tap_fd_set_offload(int fd, int csum, int tso4,
                         int tso6, int ecn, int ufo)
 {
net/tap-linux.c +12 -0
index b6f1fad..0f621a2 100644
@@ -112,6 +112,18 @@ int tap_probe_vnet_hdr(int fd)
     return ifr.ifr_flags & IFF_VNET_HDR;
 }
 
+int tap_probe_has_ufo(int fd)
+{
+    unsigned offload;
+
+    offload = TUN_F_CSUM | TUN_F_UFO;
+
+    if (ioctl(fd, TUNSETOFFLOAD, offload) < 0)
+        return 0;
+
+    return 1;
+}
+
 void tap_fd_set_offload(int fd, int csum, int tso4,
                         int tso6, int ecn, int ufo)
 {
net/tap-solaris.c +5 -0
index 614df01..ef4e60c 100644
@@ -194,6 +194,11 @@ int tap_probe_vnet_hdr(int fd)
     return 0;
 }
 
+int tap_probe_has_ufo(int fd)
+{
+    return 0;
+}
+
 void tap_fd_set_offload(int fd, int csum, int tso4,
                         int tso6, int ecn, int ufo)
 {
net/tap.c +1 -6
index 9b11071..60354e4 100644
@@ -271,7 +271,6 @@ static TAPState *net_tap_fd_init(VLANState *vlan,
                                  int vnet_hdr)
 {
     TAPState *s;
-    unsigned int offload;
 
     s = qemu_mallocz(sizeof(TAPState));
     s->fd = fd;
@@ -281,11 +280,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan,
                                  vlan, NULL, model, name, NULL,
                                  tap_receive, tap_receive_raw,
                                  tap_receive_iov, tap_cleanup, s);
-    s->has_ufo = 0;
-    /* Check if tap supports UFO */
-    offload = TUN_F_CSUM | TUN_F_UFO;
-    if (ioctl(s->fd, TUNSETOFFLOAD, offload) == 0)
-       s->has_ufo = 1;
+    s->has_ufo = tap_probe_has_ufo(s->fd);
     tap_set_offload(s->vc, 0, 0, 0, 0, 0);
     tap_read_poll(s, 1);
     return s;
net/tap.h +1 -0
index 16398b5..538a562 100644
@@ -45,6 +45,7 @@ void tap_set_offload(VLANClientState *vc, int csum, int tso4, int tso6, int ecn,
 
 int tap_set_sndbuf(int fd, QemuOpts *opts);
 int tap_probe_vnet_hdr(int fd);
+int tap_probe_has_ufo(int fd);
 void tap_fd_set_offload(int fd, int csum, int tso4, int tso6, int ecn, int ufo);
 
 #endif /* QEMU_NET_TAP_H */
Signature · 1 line
1.6.2.5
#17 lore raw
In reply to Mark McLoughlin
Quoted 10 lines · Mark McLoughlin

Hey,
We've been meaning to split net.c up for quite a while now,
so here goes with a first cut at.

There shouldn't be anything too controversial here, apart
from CONFIG_LINUX maybe.

I've build tested this on F11, F12 and mingw and also done
some basic runtime testing.

Quoted 7 lines

Building on e.g. *BSD, Solaris and AIX hasn't been tested.
I wouldn't be surprised if I've broken the build there despite all my efforts but, if I have, it should be trivial to fix back up.

This isn't the end of the cleanups; obviously the other
backends could be split out too, we could use module construtors, etc.

This series doesn't build for me. I get dependency errors even after a full rebuild. I'm building from a separate directory fwiw.

Regards,

Anthony Liguori

Quoted 6 lines

Cheers,
Mark.

#18 lore raw
Quoted 15 lines · Anthony Liguori
Quoted 14 lines · Mark McLoughlin

Hey,
We've been meaning to split net.c up for quite a while now,
so here goes with a first cut at.

There shouldn't be anything too controversial here, apart
from CONFIG_LINUX maybe.

I've build tested this on F11, F12 and mingw and also done
some basic runtime testing.

Building on e.g. *BSD, Solaris and AIX hasn't been tested.
I wouldn't be surprised if I've broken the build there despite all my efforts but, if I have, it should be trivial to fix back up.

Quoted 6 lines
Quoted 3 lines

This isn't the end of the cleanups; obviously the other
backends could be split out too, we could use module construtors, etc.

This series doesn't build for me. I get dependency errors even after a full rebuild. I'm building from a separate directory fwiw.

Don't see it here, I'm afraid - any more details?

Btw, it's all pushed to http://repo.or.cz/w/qemu/markmc.git if that helps

Cheers,
Mark.

#19 lore raw
Quoted 10 lines · Mark McLoughlin
Quoted 2 lines · Anthony Liguori

This series doesn't build for me. I get dependency errors even after a full rebuild. I'm building from a separate directory fwiw.

Don't see it here, I'm afraid - any more details?

Btw, it's all pushed to http://repo.or.cz/w/qemu/markmc.git if that helps

Building master of that tree. Source code is in /home/anthony/git/qemu. Build dir is /home/anthony/obj/qemu-tmp. Configure line is ~/git/qemu/configure --kerneldir=/home/anthony/git/kvm-userspace/kernel.

Attached the make V=1 output and configure output.

Regards,

Anthony Liguori

Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /home/anthony/git/qemu
C compiler        gcc
Host C compiler   gcc
CFLAGS            -O2 -g 
QEMU_CFLAGS       -Werror -Wold-style-definition -Wold-style-declaration -I. -I$(SRC_PATH) -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 
LDFLAGS           -Wl,--warn-common -g -m64 
make              make
install           install
host CPU          x86_64
host big endian   no
target list       i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu m68k-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user m68k-linux-user microblaze-linux-user mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user 
tcg debug enabled no
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
-Werror enabled   yes
SDL support       yes
curses support    yes
curl support      yes
check support     no
mingw32 support   no
Audio drivers     oss
Extra audio cards ac97 es1370 sb16
Mixer emulation   no
VNC TLS support   yes
VNC SASL support  yes
xen support       no
brlapi support    yes
bluez  support    no
Documentation     yes
NPTL support      yes
GUEST_BASE        yes
PIE user targets  no
vde support       yes
IO thread         no
Linux AIO support yes
Install blobs     yes
KVM support       yes
fdt support       no
preadv support    no
fdatasync         yes
uuid support      yes

cat i386-softmmu/config-devices.mak x86_64-softmmu/config-devices.mak arm-softmmu/config-devices.mak cris-softmmu/config-devices.mak m68k-softmmu/config-devices.mak microblaze-softmmu/config-devices.mak mips-softmmu/config-devices.mak mipsel-softmmu/config-devices.mak mips64-softmmu/config-devices.mak mips64el-softmmu/config-devices.mak ppc-softmmu/config-devices.mak ppcemb-softmmu/config-devices.mak ppc64-softmmu/config-devices.mak sh4-softmmu/config-devices.mak sh4eb-softmmu/config-devices.mak sparc-softmmu/config-devices.mak sparc64-softmmu/config-devices.mak i386-linux-user/config-devices.mak x86_64-linux-user/config-devices.mak alpha-linux-user/config-devices.mak arm-linux-user/config-devices.mak armeb-linux-user/config-devices.mak cris-linux-user/config-devices.mak m68k-linux-user/config-devices.mak microblaze-linux-user/config-devices.mak mips-linux-user/config-devices.mak mipsel-linux-user/config-devices.mak ppc-linux-user/config-devices.mak ppc64-linux-user/config-devices.mak ppc64abi32-linux-user/config-devices.mak sh4-linux-user/config-devices.mak sh4eb-linux-user/config-devices.mak sparc-linux-user/config-devices.mak sparc64-linux-user/config-devices.mak sparc32plus-linux-user/config-devices.mak | grep "=y$" | sort -u > config-all-devices.mak /home/anthony/git/qemu/create_config < config-host.mak > config-host.h-timestamp
/home/anthony/git/qemu/create_config < config-all-devices.mak > config-all-devices.h-timestamp
make qemu-nbd qemu-io qemu-img qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 recurse-all
make[1]: Entering directory `/home/anthony/obj/qemu-tmp'
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT qemu-nbd.o -O2 -g -c -o qemu-nbd.o /home/anthony/git/qemu/qemu-nbd.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT qemu-tool.o -O2 -g -c -o qemu-tool.o /home/anthony/git/qemu/qemu-tool.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT cutils.o -O2 -g -c -o cutils.o /home/anthony/git/qemu/cutils.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT cache-utils.o -O2 -g -c -o cache-utils.o /home/anthony/git/qemu/cache-utils.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT qemu-malloc.o -O2 -g -c -o qemu-malloc.o /home/anthony/git/qemu/qemu-malloc.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT qemu-option.o -O2 -g -c -o qemu-option.o /home/anthony/git/qemu/qemu-option.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT module.o -O2 -g -c -o module.o /home/anthony/git/qemu/module.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT nbd.o -O2 -g -c -o nbd.o /home/anthony/git/qemu/nbd.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block.o -O2 -g -c -o block.o /home/anthony/git/qemu/block.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT aio.o -O2 -g -c -o aio.o /home/anthony/git/qemu/aio.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT aes.o -O2 -g -c -o aes.o /home/anthony/git/qemu/aes.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT osdep.o -O2 -g -c -o osdep.o /home/anthony/git/qemu/osdep.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT posix-aio-compat.o -O2 -g -c -o posix-aio-compat.o /home/anthony/git/qemu/posix-aio-compat.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT linux-aio.o -O2 -g -c -o linux-aio.o /home/anthony/git/qemu/linux-aio.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/cow.o -O2 -g -c -o block/cow.o /home/anthony/git/qemu/block/cow.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/qcow.o -O2 -g -c -o block/qcow.o /home/anthony/git/qemu/block/qcow.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/vdi.o -O2 -g -c -o block/vdi.o /home/anthony/git/qemu/block/vdi.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/vmdk.o -O2 -g -c -o block/vmdk.o /home/anthony/git/qemu/block/vmdk.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/cloop.o -O2 -g -c -o block/cloop.o /home/anthony/git/qemu/block/cloop.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/dmg.o -O2 -g -c -o block/dmg.o /home/anthony/git/qemu/block/dmg.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/bochs.o -O2 -g -c -o block/bochs.o /home/anthony/git/qemu/block/bochs.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/vpc.o -O2 -g -c -o block/vpc.o /home/anthony/git/qemu/block/vpc.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/vvfat.o -O2 -g -c -o block/vvfat.o /home/anthony/git/qemu/block/vvfat.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/qcow2.o -O2 -g -c -o block/qcow2.o /home/anthony/git/qemu/block/qcow2.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/qcow2-refcount.o -O2 -g -c -o block/qcow2-refcount.o /home/anthony/git/qemu/block/qcow2-refcount.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/qcow2-cluster.o -O2 -g -c -o block/qcow2-cluster.o /home/anthony/git/qemu/block/qcow2-cluster.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/qcow2-snapshot.o -O2 -g -c -o block/qcow2-snapshot.o /home/anthony/git/qemu/block/qcow2-snapshot.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/parallels.o -O2 -g -c -o block/parallels.o /home/anthony/git/qemu/block/parallels.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/nbd.o -O2 -g -c -o block/nbd.o /home/anthony/git/qemu/block/nbd.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/raw-posix.o -O2 -g -c -o block/raw-posix.o /home/anthony/git/qemu/block/raw-posix.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT block/curl.o -O2 -g -c -o block/curl.o /home/anthony/git/qemu/block/curl.c
gcc -Wl,--warn-common -g -m64 -o qemu-nbd qemu-nbd.o qemu-tool.o cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o nbd.o block.o aio.o aes.o osdep.o posix-aio-compat.o linux-aio.o block/cow.o block/qcow.o block/vdi.o block/vmdk.o block/cloop.o block/dmg.o block/bochs.o block/vpc.o block/vvfat.o block/qcow2.o block/qcow2-refcount.o block/qcow2-cluster.o block/qcow2-snapshot.o block/parallels.o block/nbd.o block/raw-posix.o block/curl.o -Wl,--whole-archive -Wl,--no-whole-archive -lrt -lpthread -laio -lz -lcurl -lvdeplug -luuid
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT qemu-io.o -O2 -g -c -o qemu-io.o /home/anthony/git/qemu/qemu-io.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT cmd.o -O2 -g -c -o cmd.o /home/anthony/git/qemu/cmd.c
gcc -Wl,--warn-common -g -m64 -o qemu-io qemu-io.o qemu-tool.o cmd.o cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o nbd.o block.o aio.o aes.o osdep.o posix-aio-compat.o linux-aio.o block/cow.o block/qcow.o block/vdi.o block/vmdk.o block/cloop.o block/dmg.o block/bochs.o block/vpc.o block/vvfat.o block/qcow2.o block/qcow2-refcount.o block/qcow2-cluster.o block/qcow2-snapshot.o block/parallels.o block/nbd.o block/raw-posix.o block/curl.o -Wl,--whole-archive -Wl,--no-whole-archive -lrt -lpthread -laio -lz -lcurl -lvdeplug -luuid
sh /home/anthony/git/qemu/hxtool -h < /home/anthony/git/qemu/qemu-img-cmds.hx > qemu-img-cmds.h
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT qemu-img.o -O2 -g -c -o qemu-img.o /home/anthony/git/qemu/qemu-img.c
gcc -Wl,--warn-common -g -m64 -o qemu-img qemu-img.o qemu-tool.o cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o nbd.o block.o aio.o aes.o osdep.o posix-aio-compat.o linux-aio.o block/cow.o block/qcow.o block/vdi.o block/vmdk.o block/cloop.o block/dmg.o block/bochs.o block/vpc.o block/vvfat.o block/qcow2.o block/qcow2-refcount.o block/qcow2-cluster.o block/qcow2-snapshot.o block/parallels.o block/nbd.o block/raw-posix.o block/curl.o -Wl,--whole-archive -Wl,--no-whole-archive -lrt -lpthread -laio -lz -lcurl -lvdeplug -luuid
sh /home/anthony/git/qemu/hxtool -t < /home/anthony/git/qemu/qemu-options.hx > qemu-options.texi
sh /home/anthony/git/qemu/hxtool -t < /home/anthony/git/qemu/qemu-monitor.hx > qemu-monitor.texi
sh /home/anthony/git/qemu/hxtool -t < /home/anthony/git/qemu/qemu-img-cmds.hx > qemu-img-cmds.texi
texi2html -I=. -monolithic -number /home/anthony/git/qemu/qemu-doc.texi
texi2html -I=. -monolithic -number /home/anthony/git/qemu/qemu-tech.texi
perl -Ww -- /home/anthony/git/qemu/texi2pod.pl /home/anthony/git/qemu/qemu-doc.texi qemu.pod && pod2man --section=1 --center=" " --release=" " qemu.pod > qemu.1
perl -Ww -- /home/anthony/git/qemu/texi2pod.pl /home/anthony/git/qemu/qemu-img.texi qemu-img.pod && pod2man --section=1 --center=" " --release=" " qemu-img.pod > qemu-img.1
perl -Ww -- /home/anthony/git/qemu/texi2pod.pl /home/anthony/git/qemu/qemu-nbd.texi qemu-nbd.pod && pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > qemu-nbd.8
make -C libhw64 V="1" TARGET_DIR="libhw64/" all
make[2]: Entering directory `/home/anthony/obj/qemu-tmp/libhw64'
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT loader.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o loader.o /home/anthony/git/qemu/hw/loader.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT virtio.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o virtio.o /home/anthony/git/qemu/hw/virtio.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT fw_cfg.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o fw_cfg.o /home/anthony/git/qemu/hw/fw_cfg.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT watchdog.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o watchdog.o /home/anthony/git/qemu/hw/watchdog.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT ecc.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o ecc.o /home/anthony/git/qemu/hw/ecc.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT nand.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o nand.o /home/anthony/git/qemu/hw/nand.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT m48t59.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o m48t59.o /home/anthony/git/qemu/hw/m48t59.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT escc.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o escc.o /home/anthony/git/qemu/hw/escc.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT wdt_i6300esb.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o wdt_i6300esb.o /home/anthony/git/qemu/hw/wdt_i6300esb.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT msix.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o msix.o /home/anthony/git/qemu/hw/msix.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT ne2000.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o ne2000.o /home/anthony/git/qemu/hw/ne2000.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT lsi53c895a.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o lsi53c895a.o /home/anthony/git/qemu/hw/lsi53c895a.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT esp.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o esp.o /home/anthony/git/qemu/hw/esp.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT dma-helpers.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o dma-helpers.o /home/anthony/git/qemu/dma-helpers.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT sysbus.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o sysbus.o /home/anthony/git/qemu/hw/sysbus.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT isa-bus.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o isa-bus.o /home/anthony/git/qemu/hw/isa-bus.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -DTARGET_PHYS_ADDR_BITS=64 -MMD -MP -MT qdev-addr.o -I.. -I/home/anthony/git/qemu/fpu -O2 -g -c -o qdev-addr.o /home/anthony/git/qemu/hw/qdev-addr.c
rm -f libqemuhw64.a && ar rcs libqemuhw64.a loader.o virtio.o fw_cfg.o watchdog.o ecc.o nand.o m48t59.o escc.o wdt_i6300esb.o msix.o ne2000.o lsi53c895a.o esp.o dma-helpers.o sysbus.o isa-bus.o qdev-addr.o
make[2]: Leaving directory `/home/anthony/obj/qemu-tmp/libhw64'
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT net.o -O2 -g -c -o net.o /home/anthony/git/qemu/net.c
gcc -I/home/anthony/git/qemu/slirp -Werror -Wold-style-definition -Wold-style-declaration -I. -I/home/anthony/git/qemu -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -m64 -MMD -MP -MT net/queue.o -O2 -g -c -o net/queue.o /home/anthony/git/qemu/net/queue.c
/home/anthony/git/qemu/net/queue.c:260: fatal error: opening dependency file net/queue.d: No such file or directory
compilation terminated.
make[1]: *** [net/queue.o] Error 1
make[1]: Leaving directory `/home/anthony/obj/qemu-tmp'
make: *** [build-all] Error 2

#20 lore raw
Quoted 13 lines · Anthony Liguori
Quoted 11 lines · Mark McLoughlin
Quoted 3 lines · Anthony Liguori

This series doesn't build for me. I get dependency errors even after a full rebuild. I'm building from a separate directory fwiw.

Don't see it here, I'm afraid - any more details?

Btw, it's all pushed to http://repo.or.cz/w/qemu/markmc.git if that helps

Quoted 6 lines

Building master of that tree. Source code is in /home/anthony/git/qemu. Build dir is /home/anthony/obj/qemu-tmp. Configure line is ~/git/qemu/configure --kerneldir=/home/anthony/git/kvm-userspace/kernel.

Attached the make V=1 output and configure output.

Thanks, I'll add using a separate build dir to my test matrix :)

Incremental patch below, will post a v2 of 01/15, also pushed to net-cleanup.v2 branch

Thanks,
Mark.

Makefile +2 -2
index 44bd7ef..41107a5 100644
@@ -229,7 +229,7 @@ clean:
 # avoid old build problems by removing potentially incorrect old files
 	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
 	rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
-	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
+	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d
 	rm -f qemu-img-cmds.h
 	$(MAKE) -C tests clean
 	for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser; do \
@@ -413,4 +413,4 @@ tarbin:
 	$(mandir)/man8/qemu-nbd.8
 
 # Include automatically generated dependency files
--include $(wildcard *.d audio/*.d slirp/*.d block/*.d)
+-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d)
configure +1 -1
index 4ccdebe..b9fc32b 100755
@@ -2533,7 +2533,7 @@ done # for target in $targets
 
 # build tree in object directory if source path is different from current one
 if test "$source_path_used" = "yes" ; then
-    DIRS="tests tests/cris slirp audio block pc-bios/optionrom"
+    DIRS="tests tests/cris slirp audio block net pc-bios/optionrom"
     DIRS="$DIRS roms/pcbios roms/seabios roms/vgabios"
     FILES="Makefile tests/Makefile"
     FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"

A message that is not in the archive (sent off-list or not yet received): [email protected]

#22 lore raw
Quoted 8 lines · Juan Quintela
Quoted 3 lines · Mark McLoughlin

Hey,
We've been meaning to split net.c up for quite a while now,
so here goes with a first cut at.

If you have to respin this series, please use

git mv foo.c net/foo.c

I did, looks like I needed to use 'git format-patch -M'

Cheers,
Mark.