From: Mark McLoughlin <markmc@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Mark McLoughlin <markmc@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/5] Add a model string to VLANClientState
Date: Fri, 12 Dec 2008 14:46:27 +0000 [thread overview]
Message-ID: <1229093191-20618-1-git-send-email-markmc@redhat.com> (raw)
In-Reply-To: <1229093136.4041.25.camel@blaa>
Don't lose track of what type/model a vlan client is so that we can
e.g. assign a global per-model id to clients.
The entire patch is basically a tedious excercise in making sure the
type/model string gets propagated down to qemu_new_vlan_client().
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
hw/e1000.c | 4 +-
hw/eepro100.c | 3 +-
hw/etraxfs_eth.c | 2 +-
hw/mcf_fec.c | 4 +-
hw/mipsnet.c | 4 +-
hw/musicpal.c | 3 +-
hw/ne2000.c | 8 ++--
hw/pcnet.c | 4 +-
hw/rtl8139.c | 4 +-
hw/smc91c111.c | 4 +-
hw/stellaris_enet.c | 4 +-
hw/usb-net.c | 2 +-
net.c | 78 ++++++++++++++++++++++++++++-----------------------
net.h | 2 +
sysemu.h | 2 +-
tap-win32.c | 4 +-
16 files changed, 72 insertions(+), 60 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index 67a062a..45706bb 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -1071,8 +1071,8 @@ pci_e1000_init(PCIBus *bus, NICInfo *nd, int devfn)
d->rxbuf_min_shift = 1;
memset(&d->tx, 0, sizeof d->tx);
- d->vc = qemu_new_vlan_client(nd->vlan, e1000_receive,
- e1000_can_receive, d);
+ d->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ e1000_receive, e1000_can_receive, d);
snprintf(d->vc->info_str, sizeof(d->vc->info_str),
"%s macaddr=%02x:%02x:%02x:%02x:%02x:%02x", info_str,
diff --git a/hw/eepro100.c b/hw/eepro100.c
index cb3ca09..a7861ca 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1776,7 +1776,8 @@ static void nic_init(PCIBus * bus, NICInfo * nd,
nic_reset(s);
- s->vc = qemu_new_vlan_client(nd->vlan, nic_receive, nic_can_receive, s);
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ nic_receive, nic_can_receive, s);
snprintf(s->vc->info_str, sizeof(s->vc->info_str),
"eepro100 pci macaddr=%02x:%02x:%02x:%02x:%02x:%02x",
diff --git a/hw/etraxfs_eth.c b/hw/etraxfs_eth.c
index 51a129a..244a23d 100644
--- a/hw/etraxfs_eth.c
+++ b/hw/etraxfs_eth.c
@@ -596,7 +596,7 @@ void *etraxfs_eth_init(NICInfo *nd, CPUState *env,
eth->ethregs = cpu_register_io_memory(0, eth_read, eth_write, eth);
cpu_register_physical_memory (base, 0x5c, eth->ethregs);
- eth->vc = qemu_new_vlan_client(nd->vlan,
+ eth->vc = qemu_new_vlan_client(nd->vlan, nd->model,
eth_receive, eth_can_receive, eth);
return dma;
diff --git a/hw/mcf_fec.c b/hw/mcf_fec.c
index 0049860..7e3afa5 100644
--- a/hw/mcf_fec.c
+++ b/hw/mcf_fec.c
@@ -452,7 +452,7 @@ void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq)
mcf_fec_writefn, s);
cpu_register_physical_memory(base, 0x400, iomemtype);
- s->vc = qemu_new_vlan_client(nd->vlan, mcf_fec_receive,
- mcf_fec_can_receive, s);
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ mcf_fec_receive, mcf_fec_can_receive, s);
memcpy(s->macaddr, nd->macaddr, 6);
}
diff --git a/hw/mipsnet.c b/hw/mipsnet.c
index af560f8..549e6f3 100644
--- a/hw/mipsnet.c
+++ b/hw/mipsnet.c
@@ -250,8 +250,8 @@ void mipsnet_init (int base, qemu_irq irq, NICInfo *nd)
s->irq = irq;
s->nd = nd;
if (nd && nd->vlan) {
- s->vc = qemu_new_vlan_client(nd->vlan, mipsnet_receive,
- mipsnet_can_receive, s);
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ mipsnet_receive, mipsnet_can_receive, s);
} else {
s->vc = NULL;
}
diff --git a/hw/musicpal.c b/hw/musicpal.c
index c5a5b6f..d172a11 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -718,7 +718,8 @@ static void mv88w8618_eth_init(NICInfo *nd, uint32_t base, qemu_irq irq)
if (!s)
return;
s->irq = irq;
- s->vc = qemu_new_vlan_client(nd->vlan, eth_receive, eth_can_receive, s);
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ eth_receive, eth_can_receive, s);
iomemtype = cpu_register_io_memory(0, mv88w8618_eth_readfn,
mv88w8618_eth_writefn, s);
cpu_register_physical_memory(base, MP_ETH_SIZE, iomemtype);
diff --git a/hw/ne2000.c b/hw/ne2000.c
index 3f0ccf5..dc97989 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -741,8 +741,8 @@ void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd)
ne2000_reset(s);
- s->vc = qemu_new_vlan_client(nd->vlan, ne2000_receive,
- ne2000_can_receive, s);
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ ne2000_receive, ne2000_can_receive, s);
snprintf(s->vc->info_str, sizeof(s->vc->info_str),
"ne2000 macaddr=%02x:%02x:%02x:%02x:%02x:%02x",
@@ -811,8 +811,8 @@ void pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn)
s->pci_dev = (PCIDevice *)d;
memcpy(s->macaddr, nd->macaddr, 6);
ne2000_reset(s);
- s->vc = qemu_new_vlan_client(nd->vlan, ne2000_receive,
- ne2000_can_receive, s);
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ ne2000_receive, ne2000_can_receive, s);
snprintf(s->vc->info_str, sizeof(s->vc->info_str),
"ne2000 pci macaddr=%02x:%02x:%02x:%02x:%02x:%02x",
diff --git a/hw/pcnet.c b/hw/pcnet.c
index 30c453c..e961a06 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -1936,8 +1936,8 @@ static void pcnet_common_init(PCNetState *d, NICInfo *nd, const char *info_str)
d->nd = nd;
if (nd && nd->vlan) {
- d->vc = qemu_new_vlan_client(nd->vlan, pcnet_receive,
- pcnet_can_receive, d);
+ d->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ pcnet_receive, pcnet_can_receive, d);
snprintf(d->vc->info_str, sizeof(d->vc->info_str),
"pcnet macaddr=%02x:%02x:%02x:%02x:%02x:%02x",
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index feffa9c..f3f6564 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3438,8 +3438,8 @@ void pci_rtl8139_init(PCIBus *bus, NICInfo *nd, int devfn)
s->pci_dev = (PCIDevice *)d;
memcpy(s->macaddr, nd->macaddr, 6);
rtl8139_reset(s);
- s->vc = qemu_new_vlan_client(nd->vlan, rtl8139_receive,
- rtl8139_can_receive, s);
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ rtl8139_receive, rtl8139_can_receive, s);
snprintf(s->vc->info_str, sizeof(s->vc->info_str),
"rtl8139 pci macaddr=%02x:%02x:%02x:%02x:%02x:%02x",
diff --git a/hw/smc91c111.c b/hw/smc91c111.c
index a517033..fadd151 100644
--- a/hw/smc91c111.c
+++ b/hw/smc91c111.c
@@ -704,7 +704,7 @@ void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq)
smc91c111_reset(s);
- s->vc = qemu_new_vlan_client(nd->vlan, smc91c111_receive,
- smc91c111_can_receive, s);
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ smc91c111_receive, smc91c111_can_receive, s);
/* ??? Save/restore. */
}
diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c
index 09d92b1..bd8dcd9 100644
--- a/hw/stellaris_enet.c
+++ b/hw/stellaris_enet.c
@@ -397,8 +397,8 @@ void stellaris_enet_init(NICInfo *nd, uint32_t base, qemu_irq irq)
memcpy(s->macaddr, nd->macaddr, 6);
if (nd->vlan)
- s->vc = qemu_new_vlan_client(nd->vlan, stellaris_enet_receive,
- stellaris_enet_can_receive, s);
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ stellaris_enet_receive, stellaris_enet_can_receive, s);
stellaris_enet_reset(s);
register_savevm("stellaris_enet", -1, 1,
diff --git a/hw/usb-net.c b/hw/usb-net.c
index 82005af..06ff668 100644
--- a/hw/usb-net.c
+++ b/hw/usb-net.c
@@ -1454,7 +1454,7 @@ USBDevice *usb_net_init(NICInfo *nd)
pstrcpy(s->dev.devname, sizeof(s->dev.devname),
"QEMU USB Network Interface");
- s->vc = qemu_new_vlan_client(nd->vlan,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
usbnet_receive, usbnet_can_receive, s);
snprintf(s->usbstring_mac, sizeof(s->usbstring_mac),
diff --git a/net.c b/net.c
index cbf1cdf..d046b5e 100644
--- a/net.c
+++ b/net.c
@@ -305,6 +305,7 @@ static int parse_unix_path(struct sockaddr_un *uaddr, const char *str)
#endif
VLANClientState *qemu_new_vlan_client(VLANState *vlan,
+ const char *model,
IOReadHandler *fd_read,
IOCanRWHandler *fd_can_read,
void *opaque)
@@ -313,6 +314,7 @@ VLANClientState *qemu_new_vlan_client(VLANState *vlan,
vc = qemu_mallocz(sizeof(VLANClientState));
if (!vc)
return NULL;
+ vc->model = strdup(model);
vc->fd_read = fd_read;
vc->fd_can_read = fd_can_read;
vc->opaque = opaque;
@@ -333,6 +335,7 @@ void qemu_del_vlan_client(VLANClientState *vc)
while (*pvc != NULL)
if (*pvc == vc) {
*pvc = vc->next;
+ free(vc->model);
free(vc);
break;
} else
@@ -406,13 +409,13 @@ static void slirp_receive(void *opaque, const uint8_t *buf, int size)
slirp_input(buf, size);
}
-static int net_slirp_init(VLANState *vlan)
+static int net_slirp_init(VLANState *vlan, const char *model)
{
if (!slirp_inited) {
slirp_inited = 1;
slirp_init();
}
- slirp_vc = qemu_new_vlan_client(vlan,
+ slirp_vc = qemu_new_vlan_client(vlan, model,
slirp_receive, NULL, NULL);
snprintf(slirp_vc->info_str, sizeof(slirp_vc->info_str), "user redirector");
return 0;
@@ -611,7 +614,7 @@ static void tap_send(void *opaque)
/* fd support */
-static TAPState *net_tap_fd_init(VLANState *vlan, int fd)
+static TAPState *net_tap_fd_init(VLANState *vlan, const char *model, int fd)
{
TAPState *s;
@@ -619,7 +622,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan, int fd)
if (!s)
return NULL;
s->fd = fd;
- s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s);
+ s->vc = qemu_new_vlan_client(vlan, model, tap_receive, NULL, s);
qemu_set_fd_handler(s->fd, tap_send, NULL, s);
snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd);
return s;
@@ -851,7 +854,7 @@ static int launch_script(const char *setup_script, const char *ifname, int fd)
return 0;
}
-static int net_tap_init(VLANState *vlan, const char *ifname1,
+static int net_tap_init(VLANState *vlan, const char *model, const char *ifname1,
const char *setup_script, const char *down_script)
{
TAPState *s;
@@ -872,7 +875,7 @@ static int net_tap_init(VLANState *vlan, const char *ifname1,
if (launch_script(setup_script, ifname, fd))
return -1;
}
- s = net_tap_fd_init(vlan, fd);
+ s = net_tap_fd_init(vlan, model, fd);
if (!s)
return -1;
snprintf(s->vc->info_str, sizeof(s->vc->info_str),
@@ -915,8 +918,8 @@ static void vde_from_qemu(void *opaque, const uint8_t *buf, int size)
}
}
-static int net_vde_init(VLANState *vlan, const char *sock, int port,
- const char *group, int mode)
+static int net_vde_init(VLANState *vlan, const char *model, const char *sock,
+ int port, const char *group, int mode)
{
VDEState *s;
char *init_group = strlen(group) ? (char *)group : NULL;
@@ -936,7 +939,7 @@ static int net_vde_init(VLANState *vlan, const char *sock, int port,
free(s);
return -1;
}
- s->vc = qemu_new_vlan_client(vlan, vde_from_qemu, NULL, s);
+ s->vc = qemu_new_vlan_client(vlan, model, vde_from_qemu, NULL, s);
qemu_set_fd_handler(vde_datafd(s->vde), vde_to_qemu, NULL, s);
snprintf(s->vc->info_str, sizeof(s->vc->info_str), "vde: sock=%s fd=%d",
sock, vde_datafd(s->vde));
@@ -957,6 +960,7 @@ typedef struct NetSocketState {
typedef struct NetSocketListenState {
VLANState *vlan;
+ char *model;
int fd;
} NetSocketListenState;
@@ -1110,8 +1114,8 @@ fail:
return -1;
}
-static NetSocketState *net_socket_fd_init_dgram(VLANState *vlan, int fd,
- int is_connected)
+static NetSocketState *net_socket_fd_init_dgram(VLANState *vlan, const char *model,
+ int fd, int is_connected)
{
struct sockaddr_in saddr;
int newfd;
@@ -1154,7 +1158,7 @@ static NetSocketState *net_socket_fd_init_dgram(VLANState *vlan, int fd,
return NULL;
s->fd = fd;
- s->vc = qemu_new_vlan_client(vlan, net_socket_receive_dgram, NULL, s);
+ s->vc = qemu_new_vlan_client(vlan, model, net_socket_receive_dgram, NULL, s);
qemu_set_fd_handler(s->fd, net_socket_send_dgram, NULL, s);
/* mcast: save bound address as dst */
@@ -1173,15 +1177,15 @@ static void net_socket_connect(void *opaque)
qemu_set_fd_handler(s->fd, net_socket_send, NULL, s);
}
-static NetSocketState *net_socket_fd_init_stream(VLANState *vlan, int fd,
- int is_connected)
+static NetSocketState *net_socket_fd_init_stream(VLANState *vlan, const char *model,
+ int fd, int is_connected)
{
NetSocketState *s;
s = qemu_mallocz(sizeof(NetSocketState));
if (!s)
return NULL;
s->fd = fd;
- s->vc = qemu_new_vlan_client(vlan,
+ s->vc = qemu_new_vlan_client(vlan, model,
net_socket_receive, NULL, s);
snprintf(s->vc->info_str, sizeof(s->vc->info_str),
"socket: fd=%d", fd);
@@ -1193,8 +1197,8 @@ static NetSocketState *net_socket_fd_init_stream(VLANState *vlan, int fd,
return s;
}
-static NetSocketState *net_socket_fd_init(VLANState *vlan, int fd,
- int is_connected)
+static NetSocketState *net_socket_fd_init(VLANState *vlan, const char *model,
+ int fd, int is_connected)
{
int so_type=-1, optlen=sizeof(so_type);
@@ -1205,13 +1209,13 @@ static NetSocketState *net_socket_fd_init(VLANState *vlan, int fd,
}
switch(so_type) {
case SOCK_DGRAM:
- return net_socket_fd_init_dgram(vlan, fd, is_connected);
+ return net_socket_fd_init_dgram(vlan, model, fd, is_connected);
case SOCK_STREAM:
- return net_socket_fd_init_stream(vlan, fd, is_connected);
+ return net_socket_fd_init_stream(vlan, model, fd, is_connected);
default:
/* who knows ... this could be a eg. a pty, do warn and continue as stream */
fprintf(stderr, "qemu: warning: socket type=%d for fd=%d is not SOCK_DGRAM or SOCK_STREAM\n", so_type, fd);
- return net_socket_fd_init_stream(vlan, fd, is_connected);
+ return net_socket_fd_init_stream(vlan, model, fd, is_connected);
}
return NULL;
}
@@ -1233,7 +1237,7 @@ static void net_socket_accept(void *opaque)
break;
}
}
- s1 = net_socket_fd_init(s->vlan, fd, 1);
+ s1 = net_socket_fd_init(s->vlan, s->model, fd, 1);
if (!s1) {
closesocket(fd);
} else {
@@ -1243,7 +1247,8 @@ static void net_socket_accept(void *opaque)
}
}
-static int net_socket_listen_init(VLANState *vlan, const char *host_str)
+static int net_socket_listen_init(VLANState *vlan, const char *model,
+ const char *host_str)
{
NetSocketListenState *s;
int fd, val, ret;
@@ -1278,12 +1283,14 @@ static int net_socket_listen_init(VLANState *vlan, const char *host_str)
return -1;
}
s->vlan = vlan;
+ s->model = strdup(model);
s->fd = fd;
qemu_set_fd_handler(fd, net_socket_accept, NULL, s);
return 0;
}
-static int net_socket_connect_init(VLANState *vlan, const char *host_str)
+static int net_socket_connect_init(VLANState *vlan, const char *model,
+ const char *host_str)
{
NetSocketState *s;
int fd, connected, ret, err;
@@ -1321,7 +1328,7 @@ static int net_socket_connect_init(VLANState *vlan, const char *host_str)
break;
}
}
- s = net_socket_fd_init(vlan, fd, connected);
+ s = net_socket_fd_init(vlan, model, fd, connected);
if (!s)
return -1;
snprintf(s->vc->info_str, sizeof(s->vc->info_str),
@@ -1330,7 +1337,8 @@ static int net_socket_connect_init(VLANState *vlan, const char *host_str)
return 0;
}
-static int net_socket_mcast_init(VLANState *vlan, const char *host_str)
+static int net_socket_mcast_init(VLANState *vlan, const char *model,
+ const char *host_str)
{
NetSocketState *s;
int fd;
@@ -1344,7 +1352,7 @@ static int net_socket_mcast_init(VLANState *vlan, const char *host_str)
if (fd < 0)
return -1;
- s = net_socket_fd_init(vlan, fd, 0);
+ s = net_socket_fd_init(vlan, model, fd, 0);
if (!s)
return -1;
@@ -1434,7 +1442,7 @@ int net_client_init(const char *device, const char *p)
pstrcpy(slirp_hostname, sizeof(slirp_hostname), buf);
}
vlan->nb_host_devs++;
- ret = net_slirp_init(vlan);
+ ret = net_slirp_init(vlan, device);
} else
#endif
#ifdef _WIN32
@@ -1445,7 +1453,7 @@ int net_client_init(const char *device, const char *p)
return -1;
}
vlan->nb_host_devs++;
- ret = tap_win32_init(vlan, ifname);
+ ret = tap_win32_init(vlan, device, ifname);
} else
#elif defined (_AIX)
#else
@@ -1458,7 +1466,7 @@ int net_client_init(const char *device, const char *p)
fd = strtol(buf, NULL, 0);
fcntl(fd, F_SETFL, O_NONBLOCK);
ret = -1;
- if (net_tap_fd_init(vlan, fd))
+ if (net_tap_fd_init(vlan, device, fd))
ret = 0;
} else {
if (get_param_value(ifname, sizeof(ifname), "ifname", p) <= 0) {
@@ -1470,7 +1478,7 @@ int net_client_init(const char *device, const char *p)
if (get_param_value(down_script, sizeof(down_script), "downscript", p) == 0) {
pstrcpy(down_script, sizeof(down_script), DEFAULT_NETWORK_DOWN_SCRIPT);
}
- ret = net_tap_init(vlan, ifname, setup_script, down_script);
+ ret = net_tap_init(vlan, device, ifname, setup_script, down_script);
}
} else
#endif
@@ -1479,14 +1487,14 @@ int net_client_init(const char *device, const char *p)
int fd;
fd = strtol(buf, NULL, 0);
ret = -1;
- if (net_socket_fd_init(vlan, fd, 1))
+ if (net_socket_fd_init(vlan, device, fd, 1))
ret = 0;
} else if (get_param_value(buf, sizeof(buf), "listen", p) > 0) {
- ret = net_socket_listen_init(vlan, buf);
+ ret = net_socket_listen_init(vlan, device, buf);
} else if (get_param_value(buf, sizeof(buf), "connect", p) > 0) {
- ret = net_socket_connect_init(vlan, buf);
+ ret = net_socket_connect_init(vlan, device, buf);
} else if (get_param_value(buf, sizeof(buf), "mcast", p) > 0) {
- ret = net_socket_mcast_init(vlan, buf);
+ ret = net_socket_mcast_init(vlan, device, buf);
} else {
fprintf(stderr, "Unknown socket options: %s\n", p);
return -1;
@@ -1514,7 +1522,7 @@ int net_client_init(const char *device, const char *p)
} else {
vde_mode = 0700;
}
- ret = net_vde_init(vlan, vde_sock, vde_port, vde_group, vde_mode);
+ ret = net_vde_init(vlan, device, vde_sock, vde_port, vde_group, vde_mode);
} else
#endif
{
diff --git a/net.h b/net.h
index a2b01ae..fcae0e2 100644
--- a/net.h
+++ b/net.h
@@ -13,6 +13,7 @@ struct VLANClientState {
void *opaque;
struct VLANClientState *next;
struct VLANState *vlan;
+ char *model;
char info_str[256];
};
@@ -25,6 +26,7 @@ struct VLANState {
VLANState *qemu_find_vlan(int id);
VLANClientState *qemu_new_vlan_client(VLANState *vlan,
+ const char *model,
IOReadHandler *fd_read,
IOCanRWHandler *fd_can_read,
void *opaque);
diff --git a/sysemu.h b/sysemu.h
index 94cffaf..8ce3900 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -75,7 +75,7 @@ void qemu_del_wait_object(HANDLE handle, WaitObjectFunc *func, void *opaque);
#endif
/* TAP win32 */
-int tap_win32_init(VLANState *vlan, const char *ifname);
+int tap_win32_init(VLANState *vlan, const char *model, const char *ifname);
/* SLIRP */
void do_info_slirp(void);
diff --git a/tap-win32.c b/tap-win32.c
index 299b4b3..ee9e23f 100644
--- a/tap-win32.c
+++ b/tap-win32.c
@@ -660,7 +660,7 @@ static void tap_win32_send(void *opaque)
}
}
-int tap_win32_init(VLANState *vlan, const char *ifname)
+int tap_win32_init(VLANState *vlan, const char *model, const char *ifname)
{
TAPState *s;
@@ -672,7 +672,7 @@ int tap_win32_init(VLANState *vlan, const char *ifname)
return -1;
}
- s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s);
+ s->vc = qemu_new_vlan_client(vlan, model, tap_receive, NULL, s);
snprintf(s->vc->info_str, sizeof(s->vc->info_str),
"tap: ifname=%s", ifname);
--
1.5.4.3
next prev parent reply other threads:[~2008-12-12 14:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 10:55 [Qemu-devel] [PATCH 0/4] Add nic link up/down emulation to e1000 Mark McLoughlin
2008-12-09 10:55 ` [Qemu-devel] [PATCH 1/4] Add 'set_link' monitor command Mark McLoughlin
2008-12-09 10:55 ` [Qemu-devel] [PATCH 2/4] Add device index to 'info network' output Mark McLoughlin
2008-12-09 10:55 ` [Qemu-devel] [PATCH 3/4] Allow devices be notified of link status change Mark McLoughlin
2008-12-09 10:55 ` [Qemu-devel] [PATCH 4/4] Implement e1000 link status Mark McLoughlin
2008-12-09 15:04 ` [Qemu-devel] Re: [PATCH 2/4] Add device index to 'info network' output Anthony Liguori
2008-12-09 15:01 ` [Qemu-devel] Re: [PATCH 1/4] Add 'set_link' monitor command Anthony Liguori
2008-12-12 14:45 ` Mark McLoughlin
2008-12-12 14:46 ` Mark McLoughlin [this message]
2008-12-12 14:46 ` [Qemu-devel] [PATCH 2/5] Assign a name to each VLAN client Mark McLoughlin
2008-12-12 14:46 ` [Qemu-devel] [PATCH 3/5] Fixup info_str formatting Mark McLoughlin
2008-12-12 14:46 ` [Qemu-devel] [PATCH 4/5] Add qemu_format_nic_info_str() Mark McLoughlin
2008-12-12 14:46 ` [Qemu-devel] [PATCH 5/5] Add a -net name=foo parameter Mark McLoughlin
2008-12-14 23:48 ` Aurelien Jarno
2009-01-06 14:59 ` [Qemu-devel] Re: [PATCH 1/4] Add 'set_link' monitor command Mark McLoughlin
2009-01-06 15:00 ` [Qemu-devel] [PATCH 1/6] Add a model string to VLANClientState Mark McLoughlin
2009-01-06 15:00 ` [Qemu-devel] [PATCH 2/6] Assign a name to each VLAN client Mark McLoughlin
2009-01-06 15:00 ` [Qemu-devel] [PATCH 3/6] Fixup info_str formatting Mark McLoughlin
2009-01-06 15:00 ` [Qemu-devel] [PATCH 4/6] Add qemu_format_nic_info_str() Mark McLoughlin
2009-01-06 15:00 ` [Qemu-devel] [PATCH 5/6] add missing MAC address to info_str for some NICs Mark McLoughlin
2009-01-06 15:00 ` [Qemu-devel] [PATCH 6/6] Add a -net name=foo parameter Mark McLoughlin
2009-01-07 17:49 ` [Qemu-devel] Re: [PATCH 1/6] Add a model string to VLANClientState Anthony Liguori
2008-12-09 11:23 ` [Qemu-devel] [PATCH 0/4] Add nic link up/down emulation to e1000 Daniel P. Berrange
2008-12-09 13:57 ` Dor Laor
2008-12-09 15:06 ` [Qemu-devel] " Anthony Liguori
2008-12-10 8:53 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1229093191-20618-1-git-send-email-markmc@redhat.com \
--to=markmc@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.