projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82b0d80
)
tap: add API to retrieve vhost net header
author
Michael S. Tsirkin
<mst@redhat.com>
Wed, 17 Mar 2010 11:08:38 +0000
(13:08 +0200)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Thu, 1 Apr 2010 18:56:43 +0000
(13:56 -0500)
will be used by virtio-net for vhost net support
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net/tap.c
patch
|
blob
|
history
net/tap.h
patch
|
blob
|
history
diff --git
a/net/tap.c
b/net/tap.c
index 740665f5b60dd754dce6bf4c8aa060b62ca1e5e7..303d69f5ab4ae71154f7d2a793ec348bc4ff4e47 100644
(file)
--- a/
net/tap.c
+++ b/
net/tap.c
@@
-488,3
+488,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 a244b28f822afbf0dfa652d9bdce9ef4ebeb9935..b8cec8320c551132a5ae24eab2459532a71f4f12 100644
(file)
--- 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 */