From patchwork Sat Sep 25 04:27:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xin, Xiaohui" X-Patchwork-Id: 65722 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 7DBD7B70D2 for ; Sat, 25 Sep 2010 14:13:59 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145Ab0IYEKq (ORCPT ); Sat, 25 Sep 2010 00:10:46 -0400 Received: from mga02.intel.com ([134.134.136.20]:29442 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534Ab0IYEKp (ORCPT ); Sat, 25 Sep 2010 00:10:45 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 24 Sep 2010 21:10:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.57,233,1283756400"; d="scan'208";a="557826787" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.239.36.37]) by orsmga002.jf.intel.com with ESMTP; 24 Sep 2010 21:10:34 -0700 From: xiaohui.xin@intel.com To: netdev@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@elte.hu, davem@davemloft.net, herbert@gondor.hengli.com.au, jdike@linux.intel.com Cc: Xin Xiaohui Subject: [PATCH v11 05/17] Add a function to indicate if device use external buffer. Date: Sat, 25 Sep 2010 12:27:23 +0800 Message-Id: <8321171ad0747af27841311f7a6525d3bb9e2441.1285385607.git.xiaohui.xin@intel.com> X-Mailer: git-send-email 1.7.3 In-Reply-To: <1285388855-27410-1-git-send-email-xiaohui.xin@intel.com> References: <1285388855-27410-1-git-send-email-xiaohui.xin@intel.com> In-Reply-To: <59d8a50047ee01e26658fd676d26c0162b79e5fd.1285385607.git.xiaohui.xin@intel.com> References: <59d8a50047ee01e26658fd676d26c0162b79e5fd.1285385607.git.xiaohui.xin@intel.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Xin Xiaohui Signed-off-by: Xin Xiaohui Signed-off-by: Zhao Yu Reviewed-by: Jeff Dike --- include/linux/netdevice.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5f192de..23d6ec0 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1602,6 +1602,11 @@ extern gro_result_t napi_gro_frags(struct napi_struct *napi); extern int netdev_mp_port_prep(struct net_device *dev, struct mpassthru_port *port); +static inline bool dev_is_mpassthru(struct net_device *dev) +{ + return dev && dev->mp_port; +} + static inline void napi_free_frags(struct napi_struct *napi) { kfree_skb(napi->skb);