From patchwork Mon Oct 6 23:39:23 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zou X-Patchwork-Id: 3025 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id A7317DDE28 for ; Tue, 7 Oct 2008 10:42:16 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752387AbYJFXmM (ORCPT ); Mon, 6 Oct 2008 19:42:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752879AbYJFXmK (ORCPT ); Mon, 6 Oct 2008 19:42:10 -0400 Received: from mga03.intel.com ([143.182.124.21]:55211 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752970AbYJFXmJ (ORCPT ); Mon, 6 Oct 2008 19:42:09 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 06 Oct 2008 16:41:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.33,370,1220252400"; d="scan'208";a="55927154" Received: from zyfc9ini.jf.intel.com ([10.23.35.112]) by azsmga001.ch.intel.com with ESMTP; 06 Oct 2008 16:41:56 -0700 From: Yi Zou Subject: [PATCH 2/3] net: reclaim 8 upper bits of the netdev->features from GSO To: netdev@vger.kernel.org Date: Mon, 06 Oct 2008 16:39:23 -0700 Message-ID: <20081006233923.4918.25059.stgit@zyfc9ini.jf.intel.com> In-Reply-To: <20081006233409.4918.82298.stgit@zyfc9ini.jf.intel.com> References: <20081006233409.4918.82298.stgit@zyfc9ini.jf.intel.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Chris Leech Signed-off-by: Chris Leech --- drivers/net/xen-netfront.c | 2 +- include/linux/netdevice.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index c749bdb..9f76177 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1502,7 +1502,7 @@ static int xennet_set_tso(struct net_device *dev, u32 data) static void xennet_set_features(struct net_device *dev) { /* Turn off all GSO bits except ROBUST. */ - dev->features &= (1 << NETIF_F_GSO_SHIFT) - 1; + dev->features &= ~NETIF_F_GSO_MASK; dev->features |= NETIF_F_GSO_ROBUST; xennet_set_sg(dev, 0); diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9cfd20b..add9937 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -524,7 +524,7 @@ struct net_device /* Segmentation offload features */ #define NETIF_F_GSO_SHIFT 16 -#define NETIF_F_GSO_MASK 0xffff0000 +#define NETIF_F_GSO_MASK 0x00ff0000 #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) #define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT) #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)