From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxPu4-0006yX-6v for qemu-devel@nongnu.org; Thu, 01 Apr 2010 15:18:08 -0400 Received: from [140.186.70.92] (port=45103 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxPu2-0006yK-Or for qemu-devel@nongnu.org; Thu, 01 Apr 2010 15:18:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxPu1-00065l-DW for qemu-devel@nongnu.org; Thu, 01 Apr 2010 15:18:06 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:32803) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxPu1-00065Y-7a for qemu-devel@nongnu.org; Thu, 01 Apr 2010 15:18:05 -0400 Received: by pvc21 with SMTP id 21so606050pvc.4 for ; Thu, 01 Apr 2010 12:18:03 -0700 (PDT) Message-ID: <4BB4F166.6010609@codemonkey.ws> Date: Thu, 01 Apr 2010 14:17:58 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCHv6 01/11] tap: add interface to get device fd References: <9dbe0adf87df1ccad0cfbaefca6a529ca5775828.1268823114.git.mst@redhat.com> In-Reply-To: <9dbe0adf87df1ccad0cfbaefca6a529ca5775828.1268823114.git.mst@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: amit.shah@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com On 03/17/2010 06:07 AM, Michael S. Tsirkin wrote: > Will be used by vhost to attach/detach to backend. > > Signed-off-by: Michael S. Tsirkin > Applied. Thanks. Regards, Anthony Liguori > --- > net/tap.c | 7 +++++++ > net/tap.h | 2 ++ > 2 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/net/tap.c b/net/tap.c > index 7a7320c..fc59fd4 100644 > --- a/net/tap.c > +++ b/net/tap.c > @@ -269,6 +269,13 @@ static void tap_poll(VLANClientState *nc, bool enable) > tap_write_poll(s, enable); > } > > +int tap_get_fd(VLANClientState *nc) > +{ > + TAPState *s = DO_UPCAST(TAPState, nc, nc); > + assert(nc->info->type == NET_CLIENT_TYPE_TAP); > + return s->fd; > +} > + > /* fd support */ > > static NetClientInfo net_tap_info = { > diff --git a/net/tap.h b/net/tap.h > index 538a562..a244b28 100644 > --- a/net/tap.h > +++ b/net/tap.h > @@ -48,4 +48,6 @@ int tap_probe_vnet_hdr(int fd); > int tap_probe_has_ufo(int fd); > void tap_fd_set_offload(int fd, int csum, int tso4, int tso6, int ecn, int ufo); > > +int tap_get_fd(VLANClientState *vc); > + > #endif /* QEMU_NET_TAP_H */ >