netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice
@ 2011-05-16 19:28 Shirley Ma
  2011-05-16 19:35 ` Ben Hutchings
  0 siblings, 1 reply; 38+ messages in thread
From: Shirley Ma @ 2011-05-16 19:28 UTC (permalink / raw)
  To: David Miller, mst, Eric Dumazet, Avi Kivity, Arnd Bergmann
  Cc: netdev, kvm, linux-kernel

Signed-off-by: Shirley Ma <xma@us.ibm.com>
---

 include/linux/netdevice.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2011-05-26 19:11 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-16 19:28 [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice Shirley Ma
2011-05-16 19:35 ` Ben Hutchings
2011-05-16 19:38   ` Shirley Ma
2011-05-16 19:47     ` Ben Hutchings
2011-05-16 21:14       ` Michael S. Tsirkin
2011-05-16 23:32         ` Shirley Ma
2011-05-17  6:21           ` Michael S. Tsirkin
2011-05-17 20:53             ` Shirley Ma
2011-05-17 21:48           ` Michał Mirosław
2011-05-17 22:28             ` Shirley Ma
2011-05-17 22:58               ` Michał Mirosław
2011-05-17 23:44                 ` Shirley Ma
2011-05-18  9:06                   ` Michał Mirosław
2011-05-18 10:38               ` Michael S. Tsirkin
2011-05-18 11:10                 ` Michał Mirosław
2011-05-18 11:17                   ` Michael S. Tsirkin
2011-05-18 11:40                     ` Michał Mirosław
2011-05-18 11:47                       ` Michael S. Tsirkin
2011-05-18 14:38                       ` Shirley Ma
2011-05-18 15:47                         ` Michael S. Tsirkin
2011-05-18 16:07                           ` Shirley Ma
2011-05-18 16:36                             ` Michael S. Tsirkin
2011-05-18 16:45                               ` Shirley Ma
2011-05-18 16:51                                 ` Michael S. Tsirkin
2011-05-18 17:00                                   ` Shirley Ma
2011-05-19 19:42                                     ` Shirley Ma
2011-05-19 23:41                                       ` Michael S. Tsirkin
2011-05-25 22:49                                         ` Shirley Ma
2011-05-26  8:49                                           ` Michael S. Tsirkin
2011-05-26 15:27                                             ` Shirley Ma
2011-05-26 19:11                                             ` Shirley Ma
2011-05-18 16:02                         ` Shirley Ma
2011-05-18 16:23                           ` Michael S. Tsirkin
2011-05-18 16:50                       ` Michael S. Tsirkin
2011-05-18 11:47                     ` Michał Mirosław
2011-05-18 11:56                       ` Michael S. Tsirkin
2011-05-18 12:48                         ` Michał Mirosław
2011-05-18 13:19                           ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).