From: zwu.kernel@gmail.com
To: qemu-devel@nongnu.org
Cc: kvm@vger.kernel.org, aliguori@us.ibm.com,
stefanha@linux.vnet.ibm.com, ryanh@us.ibm.com,
linuxram@us.ibm.com, zwu.kernel@gmail.com, luowenj@cn.ibm.com,
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Subject: [PATCH v1 12/12] net: Rename qemu_del_vlan_client() to qemu_del_net_client()
Date: Fri, 9 Mar 2012 17:00:25 +0800 [thread overview]
Message-ID: <1331283625-26439-13-git-send-email-zwu.kernel@gmail.com> (raw)
In-Reply-To: <1331283625-26439-1-git-send-email-zwu.kernel@gmail.com>
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Another step in moving the vlan feature out of net core. Users only
deal with NetClientState and therefore qemu_del_vlan_client() should be
named qemu_del_net_client().
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
hw/e1000.c | 2 +-
hw/eepro100.c | 2 +-
hw/ne2000.c | 2 +-
hw/pcnet-pci.c | 2 +-
hw/rtl8139.c | 2 +-
hw/usb-net.c | 2 +-
hw/virtio-net.c | 2 +-
hw/xen_nic.c | 2 +-
net.c | 20 ++++++++++----------
net.h | 2 +-
net/slirp.c | 2 +-
11 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index f8423e1..5768cdf 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -1119,7 +1119,7 @@ pci_e1000_uninit(PCIDevice *dev)
memory_region_destroy(&d->mmio);
memory_region_destroy(&d->io);
- qemu_del_vlan_client(&d->nic->nc);
+ qemu_del_net_client(&d->nic->nc);
return 0;
}
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 5aee946..27edb50 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1841,7 +1841,7 @@ static int pci_nic_uninit(PCIDevice *pci_dev)
memory_region_destroy(&s->flash_bar);
vmstate_unregister(&pci_dev->qdev, s->vmstate, s);
eeprom93xx_free(&pci_dev->qdev, s->eeprom);
- qemu_del_vlan_client(&s->nic->nc);
+ qemu_del_net_client(&s->nic->nc);
return 0;
}
diff --git a/hw/ne2000.c b/hw/ne2000.c
index 25a6d2f..bda3727 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -774,7 +774,7 @@ static int pci_ne2000_exit(PCIDevice *pci_dev)
NE2000State *s = &d->ne2000;
memory_region_destroy(&s->io);
- qemu_del_vlan_client(&s->nic->nc);
+ qemu_del_net_client(&s->nic->nc);
return 0;
}
diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
index 8c82667..8bbad47 100644
--- a/hw/pcnet-pci.c
+++ b/hw/pcnet-pci.c
@@ -279,7 +279,7 @@ static int pci_pcnet_uninit(PCIDevice *dev)
memory_region_destroy(&d->io_bar);
qemu_del_timer(d->state.poll_timer);
qemu_free_timer(d->state.poll_timer);
- qemu_del_vlan_client(&d->state.nic->nc);
+ qemu_del_net_client(&d->state.nic->nc);
return 0;
}
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index c0fddc1..9f58e35 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3436,7 +3436,7 @@ static int pci_rtl8139_uninit(PCIDevice *dev)
}
qemu_del_timer(s->timer);
qemu_free_timer(s->timer);
- qemu_del_vlan_client(&s->nic->nc);
+ qemu_del_net_client(&s->nic->nc);
return 0;
}
diff --git a/hw/usb-net.c b/hw/usb-net.c
index 436e72b..d0e33e3 100644
--- a/hw/usb-net.c
+++ b/hw/usb-net.c
@@ -1309,7 +1309,7 @@ static void usb_net_handle_destroy(USBDevice *dev)
/* TODO: remove the nd_table[] entry */
rndis_clear_responsequeue(s);
- qemu_del_vlan_client(&s->nic->nc);
+ qemu_del_net_client(&s->nic->nc);
}
static NetClientInfo net_usbnet_info = {
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 3af1972..f8f67d6 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -1073,6 +1073,6 @@ void virtio_net_exit(VirtIODevice *vdev)
qemu_bh_delete(n->tx_bh);
}
- qemu_del_vlan_client(&n->nic->nc);
+ qemu_del_net_client(&n->nic->nc);
virtio_cleanup(&n->vdev);
}
diff --git a/hw/xen_nic.c b/hw/xen_nic.c
index 6391a04..ba4a45c 100644
--- a/hw/xen_nic.c
+++ b/hw/xen_nic.c
@@ -409,7 +409,7 @@ static void net_disconnect(struct XenDevice *xendev)
netdev->rxs = NULL;
}
if (netdev->nic) {
- qemu_del_vlan_client(&netdev->nic->nc);
+ qemu_del_net_client(&netdev->nic->nc);
netdev->nic = NULL;
}
}
diff --git a/net.c b/net.c
index 56cfc94..dd67d16 100644
--- a/net.c
+++ b/net.c
@@ -246,7 +246,7 @@ NICState *qemu_new_nic(NetClientInfo *info,
return nic;
}
-static void qemu_cleanup_vlan_client(NetClientState *nc)
+static void qemu_cleanup_net_client(NetClientState *nc)
{
QTAILQ_REMOVE(&net_clients, nc, next);
@@ -255,7 +255,7 @@ static void qemu_cleanup_vlan_client(NetClientState *nc)
}
}
-static void qemu_free_vlan_client(NetClientState *nc)
+static void qemu_free_net_client(NetClientState *nc)
{
if (nc->send_queue) {
qemu_del_net_queue(nc->send_queue);
@@ -268,7 +268,7 @@ static void qemu_free_vlan_client(NetClientState *nc)
g_free(nc);
}
-void qemu_del_vlan_client(NetClientState *nc)
+void qemu_del_net_client(NetClientState *nc)
{
/* If there is a peer NIC, delete and cleanup client, but do not free. */
if (nc->peer && nc->peer->info->type == NET_CLIENT_TYPE_NIC) {
@@ -282,7 +282,7 @@ void qemu_del_vlan_client(NetClientState *nc)
if (nc->peer->info->link_status_changed) {
nc->peer->info->link_status_changed(nc->peer);
}
- qemu_cleanup_vlan_client(nc);
+ qemu_cleanup_net_client(nc);
return;
}
@@ -290,12 +290,12 @@ void qemu_del_vlan_client(NetClientState *nc)
if (nc->peer && nc->info->type == NET_CLIENT_TYPE_NIC) {
NICState *nic = DO_UPCAST(NICState, nc, nc);
if (nic->peer_deleted) {
- qemu_free_vlan_client(nc->peer);
+ qemu_free_net_client(nc->peer);
}
}
- qemu_cleanup_vlan_client(nc);
- qemu_free_vlan_client(nc);
+ qemu_cleanup_net_client(nc);
+ qemu_free_net_client(nc);
}
void qemu_foreach_nic(qemu_nic_foreach func, void *opaque)
@@ -1032,7 +1032,7 @@ void net_host_device_remove(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "invalid host network device %s\n", device);
return;
}
- qemu_del_vlan_client(nc);
+ qemu_del_net_client(nc);
}
int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data)
@@ -1063,7 +1063,7 @@ int do_netdev_del(Monitor *mon, const QDict *qdict, QObject **ret_data)
qerror_report(QERR_DEVICE_NOT_FOUND, id);
return -1;
}
- qemu_del_vlan_client(nc);
+ qemu_del_net_client(nc);
qemu_opts_del(qemu_opts_find(qemu_find_opts("netdev"), id));
return 0;
}
@@ -1133,7 +1133,7 @@ void net_cleanup(void)
NetClientState *nc, *next_vc;
QTAILQ_FOREACH_SAFE(nc, &net_clients, next, next_vc) {
- qemu_del_vlan_client(nc);
+ qemu_del_net_client(nc);
}
}
diff --git a/net.h b/net.h
index b8d11b8..60837ab 100644
--- a/net.h
+++ b/net.h
@@ -89,7 +89,7 @@ NICState *qemu_new_nic(NetClientInfo *info,
const char *model,
const char *name,
void *opaque);
-void qemu_del_vlan_client(NetClientState *nc);
+void qemu_del_net_client(NetClientState *nc);
NetClientState *qemu_find_vlan_client_by_name(Monitor *mon, int vlan_id,
const char *client_str);
typedef void (*qemu_nic_foreach)(NICState *nic, void *opaque);
diff --git a/net/slirp.c b/net/slirp.c
index 142b6b6..d3e56fc 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -274,7 +274,7 @@ static int net_slirp_init(NetClientState *peer, const char *model,
return 0;
error:
- qemu_del_vlan_client(nc);
+ qemu_del_net_client(nc);
return -1;
}
--
1.7.6
WARNING: multiple messages have this Message-ID (diff)
From: zwu.kernel@gmail.com
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com,
kvm@vger.kernel.org, linuxram@us.ibm.com, zwu.kernel@gmail.com,
ryanh@us.ibm.com, luowenj@cn.ibm.com,
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v1 12/12] net: Rename qemu_del_vlan_client() to qemu_del_net_client()
Date: Fri, 9 Mar 2012 17:00:25 +0800 [thread overview]
Message-ID: <1331283625-26439-13-git-send-email-zwu.kernel@gmail.com> (raw)
In-Reply-To: <1331283625-26439-1-git-send-email-zwu.kernel@gmail.com>
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Another step in moving the vlan feature out of net core. Users only
deal with NetClientState and therefore qemu_del_vlan_client() should be
named qemu_del_net_client().
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
hw/e1000.c | 2 +-
hw/eepro100.c | 2 +-
hw/ne2000.c | 2 +-
hw/pcnet-pci.c | 2 +-
hw/rtl8139.c | 2 +-
hw/usb-net.c | 2 +-
hw/virtio-net.c | 2 +-
hw/xen_nic.c | 2 +-
net.c | 20 ++++++++++----------
net.h | 2 +-
net/slirp.c | 2 +-
11 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index f8423e1..5768cdf 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -1119,7 +1119,7 @@ pci_e1000_uninit(PCIDevice *dev)
memory_region_destroy(&d->mmio);
memory_region_destroy(&d->io);
- qemu_del_vlan_client(&d->nic->nc);
+ qemu_del_net_client(&d->nic->nc);
return 0;
}
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 5aee946..27edb50 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1841,7 +1841,7 @@ static int pci_nic_uninit(PCIDevice *pci_dev)
memory_region_destroy(&s->flash_bar);
vmstate_unregister(&pci_dev->qdev, s->vmstate, s);
eeprom93xx_free(&pci_dev->qdev, s->eeprom);
- qemu_del_vlan_client(&s->nic->nc);
+ qemu_del_net_client(&s->nic->nc);
return 0;
}
diff --git a/hw/ne2000.c b/hw/ne2000.c
index 25a6d2f..bda3727 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -774,7 +774,7 @@ static int pci_ne2000_exit(PCIDevice *pci_dev)
NE2000State *s = &d->ne2000;
memory_region_destroy(&s->io);
- qemu_del_vlan_client(&s->nic->nc);
+ qemu_del_net_client(&s->nic->nc);
return 0;
}
diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
index 8c82667..8bbad47 100644
--- a/hw/pcnet-pci.c
+++ b/hw/pcnet-pci.c
@@ -279,7 +279,7 @@ static int pci_pcnet_uninit(PCIDevice *dev)
memory_region_destroy(&d->io_bar);
qemu_del_timer(d->state.poll_timer);
qemu_free_timer(d->state.poll_timer);
- qemu_del_vlan_client(&d->state.nic->nc);
+ qemu_del_net_client(&d->state.nic->nc);
return 0;
}
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index c0fddc1..9f58e35 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3436,7 +3436,7 @@ static int pci_rtl8139_uninit(PCIDevice *dev)
}
qemu_del_timer(s->timer);
qemu_free_timer(s->timer);
- qemu_del_vlan_client(&s->nic->nc);
+ qemu_del_net_client(&s->nic->nc);
return 0;
}
diff --git a/hw/usb-net.c b/hw/usb-net.c
index 436e72b..d0e33e3 100644
--- a/hw/usb-net.c
+++ b/hw/usb-net.c
@@ -1309,7 +1309,7 @@ static void usb_net_handle_destroy(USBDevice *dev)
/* TODO: remove the nd_table[] entry */
rndis_clear_responsequeue(s);
- qemu_del_vlan_client(&s->nic->nc);
+ qemu_del_net_client(&s->nic->nc);
}
static NetClientInfo net_usbnet_info = {
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 3af1972..f8f67d6 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -1073,6 +1073,6 @@ void virtio_net_exit(VirtIODevice *vdev)
qemu_bh_delete(n->tx_bh);
}
- qemu_del_vlan_client(&n->nic->nc);
+ qemu_del_net_client(&n->nic->nc);
virtio_cleanup(&n->vdev);
}
diff --git a/hw/xen_nic.c b/hw/xen_nic.c
index 6391a04..ba4a45c 100644
--- a/hw/xen_nic.c
+++ b/hw/xen_nic.c
@@ -409,7 +409,7 @@ static void net_disconnect(struct XenDevice *xendev)
netdev->rxs = NULL;
}
if (netdev->nic) {
- qemu_del_vlan_client(&netdev->nic->nc);
+ qemu_del_net_client(&netdev->nic->nc);
netdev->nic = NULL;
}
}
diff --git a/net.c b/net.c
index 56cfc94..dd67d16 100644
--- a/net.c
+++ b/net.c
@@ -246,7 +246,7 @@ NICState *qemu_new_nic(NetClientInfo *info,
return nic;
}
-static void qemu_cleanup_vlan_client(NetClientState *nc)
+static void qemu_cleanup_net_client(NetClientState *nc)
{
QTAILQ_REMOVE(&net_clients, nc, next);
@@ -255,7 +255,7 @@ static void qemu_cleanup_vlan_client(NetClientState *nc)
}
}
-static void qemu_free_vlan_client(NetClientState *nc)
+static void qemu_free_net_client(NetClientState *nc)
{
if (nc->send_queue) {
qemu_del_net_queue(nc->send_queue);
@@ -268,7 +268,7 @@ static void qemu_free_vlan_client(NetClientState *nc)
g_free(nc);
}
-void qemu_del_vlan_client(NetClientState *nc)
+void qemu_del_net_client(NetClientState *nc)
{
/* If there is a peer NIC, delete and cleanup client, but do not free. */
if (nc->peer && nc->peer->info->type == NET_CLIENT_TYPE_NIC) {
@@ -282,7 +282,7 @@ void qemu_del_vlan_client(NetClientState *nc)
if (nc->peer->info->link_status_changed) {
nc->peer->info->link_status_changed(nc->peer);
}
- qemu_cleanup_vlan_client(nc);
+ qemu_cleanup_net_client(nc);
return;
}
@@ -290,12 +290,12 @@ void qemu_del_vlan_client(NetClientState *nc)
if (nc->peer && nc->info->type == NET_CLIENT_TYPE_NIC) {
NICState *nic = DO_UPCAST(NICState, nc, nc);
if (nic->peer_deleted) {
- qemu_free_vlan_client(nc->peer);
+ qemu_free_net_client(nc->peer);
}
}
- qemu_cleanup_vlan_client(nc);
- qemu_free_vlan_client(nc);
+ qemu_cleanup_net_client(nc);
+ qemu_free_net_client(nc);
}
void qemu_foreach_nic(qemu_nic_foreach func, void *opaque)
@@ -1032,7 +1032,7 @@ void net_host_device_remove(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "invalid host network device %s\n", device);
return;
}
- qemu_del_vlan_client(nc);
+ qemu_del_net_client(nc);
}
int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data)
@@ -1063,7 +1063,7 @@ int do_netdev_del(Monitor *mon, const QDict *qdict, QObject **ret_data)
qerror_report(QERR_DEVICE_NOT_FOUND, id);
return -1;
}
- qemu_del_vlan_client(nc);
+ qemu_del_net_client(nc);
qemu_opts_del(qemu_opts_find(qemu_find_opts("netdev"), id));
return 0;
}
@@ -1133,7 +1133,7 @@ void net_cleanup(void)
NetClientState *nc, *next_vc;
QTAILQ_FOREACH_SAFE(nc, &net_clients, next, next_vc) {
- qemu_del_vlan_client(nc);
+ qemu_del_net_client(nc);
}
}
diff --git a/net.h b/net.h
index b8d11b8..60837ab 100644
--- a/net.h
+++ b/net.h
@@ -89,7 +89,7 @@ NICState *qemu_new_nic(NetClientInfo *info,
const char *model,
const char *name,
void *opaque);
-void qemu_del_vlan_client(NetClientState *nc);
+void qemu_del_net_client(NetClientState *nc);
NetClientState *qemu_find_vlan_client_by_name(Monitor *mon, int vlan_id,
const char *client_str);
typedef void (*qemu_nic_foreach)(NICState *nic, void *opaque);
diff --git a/net/slirp.c b/net/slirp.c
index 142b6b6..d3e56fc 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -274,7 +274,7 @@ static int net_slirp_init(NetClientState *peer, const char *model,
return 0;
error:
- qemu_del_vlan_client(nc);
+ qemu_del_net_client(nc);
return -1;
}
--
1.7.6
next prev parent reply other threads:[~2012-03-09 9:02 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 9:00 [PATCH v1 00/12] net: hub implemention zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 9:00 ` [PATCH v1 01/12] net: Add a hub net client zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 10:33 ` Paolo Bonzini
2012-03-09 10:33 ` [Qemu-devel] " Paolo Bonzini
2012-03-12 8:59 ` Zhi Yong Wu
2012-03-12 8:59 ` [Qemu-devel] " Zhi Yong Wu
2012-03-12 9:12 ` Paolo Bonzini
2012-03-12 9:12 ` [Qemu-devel] " Paolo Bonzini
2012-03-12 12:13 ` Zhi Yong Wu
2012-03-12 12:13 ` [Qemu-devel] " Zhi Yong Wu
2012-03-09 9:00 ` [PATCH v1 02/12] net: Use hubs for the vlan feature zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 9:00 ` [PATCH v1 03/12] net: Look up 'vlan' net clients using hubs zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 9:00 ` [PATCH v1 04/12] hub: Check that hubs are configured correctly zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 9:00 ` [PATCH v1 05/12] net: Drop vlan argument to qemu_new_net_client() zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 9:00 ` [PATCH v1 06/12] net: Remove vlan qdev property zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 9:00 ` [PATCH v1 07/12] net: Remove vlan code from net.c zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 9:00 ` [PATCH v1 08/12] net: Remove VLANState zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 9:00 ` [PATCH v1 09/12] net: Rename non_vlan_clients to net_clients zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-13 9:23 ` Mark Wu
2012-03-13 9:23 ` Mark Wu
2012-03-13 9:27 ` Zhi Yong Wu
2012-03-13 9:27 ` Zhi Yong Wu
2012-03-09 9:00 ` [PATCH v1 10/12] net: Rename VLANClientState to NetClientState zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 9:00 ` [PATCH v1 11/12] net: Rename vc local variables to nc zwu.kernel
2012-03-09 9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09 9:00 ` zwu.kernel [this message]
2012-03-09 9:00 ` [Qemu-devel] [PATCH v1 12/12] net: Rename qemu_del_vlan_client() to qemu_del_net_client() zwu.kernel
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=1331283625-26439-13-git-send-email-zwu.kernel@gmail.com \
--to=zwu.kernel@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linuxram@us.ibm.com \
--cc=luowenj@cn.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=ryanh@us.ibm.com \
--cc=stefanha@linux.vnet.ibm.com \
--cc=wuzhy@linux.vnet.ibm.com \
/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.