From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: [PATCH 09/12] kvm: qemu: Actually enable GSO support Date: Mon, 11 Aug 2008 21:12:12 +0100 Message-ID: <1218485535-877-10-git-send-email-markmc@redhat.com> References: <1218485535-877-1-git-send-email-markmc@redhat.com> <1218485535-877-2-git-send-email-markmc@redhat.com> <1218485535-877-3-git-send-email-markmc@redhat.com> <1218485535-877-4-git-send-email-markmc@redhat.com> <1218485535-877-5-git-send-email-markmc@redhat.com> <1218485535-877-6-git-send-email-markmc@redhat.com> <1218485535-877-7-git-send-email-markmc@redhat.com> <1218485535-877-8-git-send-email-markmc@redhat.com> <1218485535-877-9-git-send-email-markmc@redhat.com> Cc: kvm@vger.kernel.org, Mark McLoughlin To: Avi Kivity Return-path: Received: from mail20.svc.cra.dublin.eircom.net ([159.134.118.221]:34363 "HELO mail20.svc.cra.dublin.eircom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757569AbYHKUMn (ORCPT ); Mon, 11 Aug 2008 16:12:43 -0400 In-Reply-To: <1218485535-877-9-git-send-email-markmc@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Now that GSO support doesn't break e.g. e1000, we can enable it. Signed-off-by: Mark McLoughlin --- qemu/vl.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/qemu/vl.c b/qemu/vl.c index 9bfe480..14a66e0 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -4737,6 +4737,19 @@ static int tap_open(char *ifname, int ifname_size, int *vnet_hdr) } memset(&ifr, 0, sizeof(ifr)); ifr.ifr_flags = IFF_TAP | IFF_NO_PI; + +#if defined(TUNGETFEATURES) && defined(IFF_VNET_HDR) + { + unsigned int features; + + if (ioctl(fd, TUNGETFEATURES, &features) == 0 && + features & IFF_VNET_HDR) { + *vnet_hdr = 1; + ifr.ifr_flags |= IFF_VNET_HDR; + } + } +#endif + if (ifname[0] != '\0') pstrcpy(ifr.ifr_name, IFNAMSIZ, ifname); else -- 1.5.4.1