From patchwork Fri Feb 27 22:06:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zou X-Patchwork-Id: 23834 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 9FA85DDDA5 for ; Sat, 28 Feb 2009 10:14:26 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755827AbZB0XOW (ORCPT ); Fri, 27 Feb 2009 18:14:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754600AbZB0XOU (ORCPT ); Fri, 27 Feb 2009 18:14:20 -0500 Received: from mga11.intel.com ([192.55.52.93]:52160 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753246AbZB0XOU (ORCPT ); Fri, 27 Feb 2009 18:14:20 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 27 Feb 2009 15:12:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.38,279,1233561600"; d="scan'208";a="434851003" Received: from zychengdu.jf.intel.com (HELO localhost.localdomain) ([10.23.35.105]) by fmsmga002.fm.intel.com with ESMTP; 27 Feb 2009 15:10:08 -0800 From: Yi Zou Subject: [PATCH 02/11] net: reclaim 8 upper bits of the netdev->features from GSO To: netdev@vger.kernel.org, linux-scsi@vger.kernel.org Cc: yi.zou@intel.com Date: Fri, 27 Feb 2009 14:06:43 -0800 Message-ID: <20090227220643.4987.12818.stgit.yi.zou@intel.com> In-Reply-To: <20090227220034.4987.50755.stgit@localhost.localdomain> References: <20090227220034.4987.50755.stgit@localhost.localdomain> 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 Reclaim 8 upper bits of netdev->features from GSO. Signed-off-by: Chris Leech Signed-off-by: Yi Zou --- 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 cd6184e..2ce536f 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1511,7 +1511,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 ec54785..c8238d9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -652,7 +652,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)