diff options
author | Jason Wang <jasowang@redhat.com> | 2013-01-30 19:12:32 +0800 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-02-01 11:03:02 -0600 |
commit | 16dbaf905b72636d1bb066968bceabd64eaa1a9d (patch) | |
tree | be250670ab1dc6f35a705ca2ebbcd59c973eb486 /include/net | |
parent | 94fdc6d03034f594c53d5413590e23fcb7ffc268 (diff) |
tap: support enabling or disabling a queue
This patch introduce a new bit - enabled in TAPState which tracks whether a
specific queue/fd is enabled. The tap/fd is enabled during initialization and
could be enabled/disabled by tap_enalbe() and tap_disable() which calls platform
specific helpers to do the real work. Polling of a tap fd can only done when
the tap was enabled.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/tap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/tap.h b/include/net/tap.h index 883cebff07..a994f20447 100644 --- a/include/net/tap.h +++ b/include/net/tap.h @@ -35,6 +35,8 @@ int tap_has_vnet_hdr_len(NetClientState *nc, int len); void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr); void tap_set_offload(NetClientState *nc, int csum, int tso4, int tso6, int ecn, int ufo); void tap_set_vnet_hdr_len(NetClientState *nc, int len); +int tap_enable(NetClientState *nc); +int tap_disable(NetClientState *nc); int tap_get_fd(NetClientState *nc); |