From patchwork Mon May 16 19:28:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirley Ma X-Patchwork-Id: 95807 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 28F66B6EF1 for ; Tue, 17 May 2011 05:29:28 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754664Ab1EPT3J (ORCPT ); Mon, 16 May 2011 15:29:09 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:52531 "EHLO e31.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754425Ab1EPT3I (ORCPT ); Mon, 16 May 2011 15:29:08 -0400 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e31.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p4GJClbx019376; Mon, 16 May 2011 13:12:47 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p4GJT22p054700; Mon, 16 May 2011 13:29:02 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4GDSXsB021284; Mon, 16 May 2011 07:28:35 -0600 Received: from [9.76.199.162] (sig-9-76-199-162.mts.ibm.com [9.76.199.162]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p4GDSVMD020383; Mon, 16 May 2011 07:28:32 -0600 Subject: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice From: Shirley Ma To: David Miller , mst@redhat.com, Eric Dumazet , Avi Kivity , Arnd Bergmann Cc: netdev@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 16 May 2011 12:28:48 -0700 Message-ID: <1305574128.3456.23.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Shirley Ma --- include/linux/netdevice.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 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/include/linux/netdevice.h b/include/linux/netdevice.h index a134d80..2646251 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1066,6 +1066,16 @@ struct net_device { #define NETIF_F_NOCACHE_COPY (1 << 30) /* Use no-cache copyfromuser */ #define NETIF_F_LOOPBACK (1 << 31) /* Enable loopback */ +/* + * Bit 31 is for device to map userspace buffers -- zerocopy + * Device can set this flag when it supports HIGHDMA. + * Device can't recycle this kind of skb buffers. + * There are 256 bytes copied, the rest of buffers are mapped. + * The userspace callback should only be called when last reference to this skb + * is gone. + */ +#define NETIF_F_ZEROCOPY (1 << 31) + /* Segmentation offload features */ #define NETIF_F_GSO_SHIFT 16 #define NETIF_F_GSO_MASK 0x00ff0000