[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv3 11/12] tap: add API to retrieve vhost net header
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PATCHv3 11/12] tap: add API to retrieve vhost net header |
Date: |
Tue, 2 Mar 2010 20:44:09 +0200 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
will be used by virtio-net for vhost net support
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
net/tap.c | 7 +++++++
net/tap.h | 3 +++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/net/tap.c b/net/tap.c
index 19c4fa2..35c05d7 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -487,3 +487,10 @@ int net_init_tap(QemuOpts *opts, Monitor *mon, const char
*name, VLANState *vlan
return 0;
}
+
+VHostNetState *tap_get_vhost_net(VLANClientState *nc)
+{
+ TAPState *s = DO_UPCAST(TAPState, nc, nc);
+ assert(nc->info->type == NET_CLIENT_TYPE_TAP);
+ return s->vhost_net;
+}
diff --git a/net/tap.h b/net/tap.h
index a244b28..b8cec83 100644
--- a/net/tap.h
+++ b/net/tap.h
@@ -50,4 +50,7 @@ void tap_fd_set_offload(int fd, int csum, int tso4, int tso6,
int ecn, int ufo);
int tap_get_fd(VLANClientState *vc);
+struct vhost_net;
+struct vhost_net *tap_get_vhost_net(VLANClientState *vc);
+
#endif /* QEMU_NET_TAP_H */
--
1.7.0.18.g0d53a5
- [Qemu-devel] [PATCHv3 02/12] kvm: add API to set ioeventfd, (continued)
- [Qemu-devel] [PATCHv3 02/12] kvm: add API to set ioeventfd, Michael S. Tsirkin, 2010/03/02
- [Qemu-devel] [PATCHv3 03/12] notifier: event notifier implementation, Michael S. Tsirkin, 2010/03/02
- [Qemu-devel] [PATCHv3 04/12] virtio: add notifier support, Michael S. Tsirkin, 2010/03/02
- [Qemu-devel] [PATCHv3 05/12] virtio: add APIs for queue fields, Michael S. Tsirkin, 2010/03/02
- [Qemu-devel] [PATCHv3 06/12] virtio: add set_status callback, Michael S. Tsirkin, 2010/03/02
- [Qemu-devel] [PATCHv3 07/12] virtio: move typedef to qemu-common, Michael S. Tsirkin, 2010/03/02
- [Qemu-devel] [PATCHv3 08/12] virtio-pci: fill in notifier support, Michael S. Tsirkin, 2010/03/02
- [Qemu-devel] [PATCHv3 09/12] vhost: vhost net support, Michael S. Tsirkin, 2010/03/02
- [Qemu-devel] [PATCHv3 10/12] tap: add vhost/vhostfd options, Michael S. Tsirkin, 2010/03/02
- [Qemu-devel] [PATCHv3 12/12] virtio-net: vhost net support, Michael S. Tsirkin, 2010/03/02
- [Qemu-devel] [PATCHv3 11/12] tap: add API to retrieve vhost net header,
Michael S. Tsirkin <=