From patchwork Wed Dec 1 08:08:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xin, Xiaohui" X-Patchwork-Id: 370331 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB17ox4s012788 for ; Wed, 1 Dec 2010 07:51:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753547Ab0LAHqe (ORCPT ); Wed, 1 Dec 2010 02:46:34 -0500 Received: from mga02.intel.com ([134.134.136.20]:41622 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753496Ab0LAHqa (ORCPT ); Wed, 1 Dec 2010 02:46:30 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 30 Nov 2010 23:46:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,282,1288594800"; d="scan'208";a="682672335" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.239.36.138]) by orsmga001.jf.intel.com with ESMTP; 30 Nov 2010 23:46:28 -0800 From: xiaohui.xin@intel.com To: netdev@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com, mingo@elte.hu, davem@davemloft.net, herbert@gondor.hengli.com.au, jdike@linux.intel.com Cc: Xin Xiaohui Subject: [PATCH v16 05/17] Add a function to indicate if device use external buffer. Date: Wed, 1 Dec 2010 16:08:16 +0800 Message-Id: <1291190917-5286-1-git-send-email-xiaohui.xin@intel.com> X-Mailer: git-send-email 1.7.3 In-Reply-To: References: In-Reply-To: References: Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 01 Dec 2010 07:51:00 +0000 (UTC) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8dcf6de..f91d9bb 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1739,6 +1739,11 @@ extern gro_result_t napi_gro_frags(struct napi_struct *napi); extern int netdev_mp_port_prep(struct net_device *dev, struct mp_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);