netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH v4 01/18] Add a new struct for device to manipulate external buffer.
@ 2010-04-25  9:19 xiaohui.xin
  2010-04-25  9:19 ` [RFC][PATCH v4 02/18] Export 2 func for device to assign/dassign new structure xiaohui.xin
  2010-04-26 20:06 ` [RFC][PATCH v4 01/18] Add a new struct for device to manipulate " Andy Fleming
  0 siblings, 2 replies; 31+ messages in thread
From: xiaohui.xin @ 2010-04-25  9:19 UTC (permalink / raw)
  To: netdev, kvm, linux-kernel, mst, mingo, davem, jdike; +Cc: Xin Xiaohui

From: Xin Xiaohui <xiaohui.xin@intel.com>

Signed-off-by: Xin Xiaohui <xiaohui.xin@intel.com>
Signed-off-by: Zhao Yu <yzhao81@gmail.com>
Reviewed-by: Jeff Dike <jdike@linux.intel.com>
---
 include/linux/netdevice.h |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c79a88b..bf79756 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -530,6 +530,22 @@ struct netdev_queue {
 	unsigned long		tx_dropped;
 } ____cacheline_aligned_in_smp;
 
+/* Add a structure in structure net_device, the new field is
+ * named as mp_port. It's for mediate passthru (zero-copy).
+ * It contains the capability for the net device driver,
+ * a socket, and an external buffer creator, external means
+ * skb buffer belongs to the device may not be allocated from
+ * kernel space.
+ */
+struct mpassthru_port	{
+	int		hdr_len;
+	int		data_len;
+	int		npages;
+	unsigned	flags;
+	struct socket	*sock;
+	struct skb_external_page *(*ctor)(struct mpassthru_port *,
+				struct sk_buff *, int);
+};
 
 /*
  * This structure defines the management hooks for network devices.
@@ -952,7 +968,8 @@ struct net_device {
 	struct macvlan_port	*macvlan_port;
 	/* GARP */
 	struct garp_port	*garp_port;
-
+	/* mpassthru */
+	struct mpassthru_port	*mp_port;
 	/* class/net/name entry */
 	struct device		dev;
 	/* space for optional device, statistics, and wireless sysfs groups */
-- 
1.5.4.4

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

end of thread, other threads:[~2010-05-09  9:26 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-25  9:19 [RFC][PATCH v4 01/18] Add a new struct for device to manipulate external buffer xiaohui.xin
2010-04-25  9:19 ` [RFC][PATCH v4 02/18] Export 2 func for device to assign/dassign new structure xiaohui.xin
2010-04-25  9:19   ` [RFC][PATCH v4 03/18] Add a ndo_mp_port_prep pointer to net_device_ops xiaohui.xin
2010-04-25  9:19     ` [RFC][PATCH v4 04/18] Add a function make external buffer owner to query capability xiaohui.xin
2010-04-25  9:19       ` [RFC][PATCH v4 05/18] Add a function to indicate if device use external buffer xiaohui.xin
2010-04-25  9:19         ` [RFC][PATCH v4 06/18] Add interface to get external buffers xiaohui.xin
2010-04-25  9:19           ` [RFC][PATCH v4 07/18] Make __alloc_skb() to get external buffer xiaohui.xin
2010-04-25  9:19             ` [RFC][PATCH v4 08/18] Ignore skb_reserve() when device is using " xiaohui.xin
2010-04-25  9:19               ` [RFC][PATCH v4 09/18] Don't do skb recycle, if device use " xiaohui.xin
2010-04-25  9:19                 ` [RFC][PATCH v4 10/18] Use callback to deal with skb_release_data() specially xiaohui.xin
2010-04-25  9:19                   ` [RFC][PATCH v4 11/18] Add a hook to intercept external buffers from NIC driver xiaohui.xin
2010-04-25  9:19                     ` [RFC][PATCH v4 12/18] To skip GRO if buffer is external xiaohui.xin
2010-04-25  9:20                       ` [RFC][PATCH v4 13/18] Add header file for mp device xiaohui.xin
2010-04-25  9:20                         ` [RFC][PATCH v4 14/18] Add basic func and special ioctl to " xiaohui.xin
2010-04-25  9:20                           ` [RFC][PATCH v4 15/18] Manipulate external buffers in " xiaohui.xin
2010-04-25  9:20                             ` [RFC][PATCH v4 16/18] Export proto_ops to vhost-net driver xiaohui.xin
2010-04-25  9:20                               ` [RFC][PATCH v4 17/18] Add a kconfig entry and make entry for mp device xiaohui.xin
2010-04-25  9:20                                 ` [RFC][PATCH v4 18/18] Provides multiple submits and async notifications xiaohui.xin
2010-04-25  9:20                                   ` [RFC][PATCH v4 00/18] Provide a zero-copy method on KVM virtio-net xiaohui.xin
2010-04-25  9:55                                     ` David Miller
2010-04-25 10:46                                       ` Michael S. Tsirkin
2010-04-29  1:33                                         ` Xin, Xiaohui
2010-04-25 12:14                                     ` Michael S. Tsirkin
2010-05-08  7:55                                       ` Xin, Xiaohui
2010-05-09  9:26                                         ` Michael S. Tsirkin
2010-04-25  9:33         ` [RFC][PATCH v4 05/18] Add a function to indicate if device use external buffer Changli Gao
2010-04-25  9:51           ` David Miller
2010-04-25  9:35         ` Changli Gao
2010-04-25  9:51           ` David Miller
2010-04-29  1:38           ` Xin, Xiaohui
2010-04-26 20:06 ` [RFC][PATCH v4 01/18] Add a new struct for device to manipulate " Andy Fleming

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).