From 96e93eab20337d063c70d537bd7bc70d90e04fa3 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Tue, 6 Jan 2009 10:49:34 -0800 Subject: gro: Add internal interfaces for VLAN Previously GRO's only entry point from the outside is through napi_gro_receive and napi_gro_frags. These interfaces are for device drivers. This patch rearranges things to provide a new set of interfaces for VLANs. These interfaces are for internal use only. The VLAN code itself can then provide a set of entry points for device drivers. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- include/linux/netdevice.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c28bbba3c23..114091be887 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1373,8 +1373,14 @@ extern int netif_rx_ni(struct sk_buff *skb); #define HAVE_NETIF_RECEIVE_SKB 1 extern int netif_receive_skb(struct sk_buff *skb); extern void napi_gro_flush(struct napi_struct *napi); +extern int dev_gro_receive(struct napi_struct *napi, + struct sk_buff *skb); extern int napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb); +extern void napi_reuse_skb(struct napi_struct *napi, + struct sk_buff *skb); +extern struct sk_buff * napi_fraginfo_skb(struct napi_struct *napi, + struct napi_gro_fraginfo *info); extern int napi_gro_frags(struct napi_struct *napi, struct napi_gro_fraginfo *info); extern void netif_nit_deliver(struct sk_buff *skb); -- cgit v1.2.3 From e1c096e251e52773afeffbbcb74d0a072be47ea3 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Tue, 6 Jan 2009 10:50:09 -0800 Subject: vlan: Add GRO interfaces This patch adds GRO interfaces for hardware-assisted VLAN reception. With this in place we're now at parity with LRO as far as the interface is concerned. That is, you can now take any LRO driver and convert it over to GRO. As the CB memory clashes with GRO's use of CB, I've removed it entirely by storing dev in skb->dev. This is OK because VLAN gets called first thing in netif_receive_skb and skb->dev is not used in between us calling netif_rx and netif_receive_skb getting called. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- include/linux/if_vlan.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include') diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index a5cb0c3f6dc..f8ff918c208 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -115,6 +115,11 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev); extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, u16 vlan_tci, int polling); extern int vlan_hwaccel_do_receive(struct sk_buff *skb); +extern int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, + unsigned int vlan_tci, struct sk_buff *skb); +extern int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp, + unsigned int vlan_tci, + struct napi_gro_fraginfo *info); #else static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) @@ -140,6 +145,20 @@ static inline int vlan_hwaccel_do_receive(struct sk_buff *skb) { return 0; } + +static inline int vlan_gro_receive(struct napi_struct *napi, + struct vlan_group *grp, + unsigned int vlan_tci, struct sk_buff *skb) +{ + return NET_RX_DROP; +} + +static inline int vlan_gro_frags(struct napi_struct *napi, + struct vlan_group *grp, unsigned int vlan_tci, + struct napi_gro_fraginfo *info) +{ + return NET_RX_DROP; +} #endif /** -- cgit v1.2.3 From 1fa17d4ba43d7e5aab5e90777b07da06524f6748 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Tue, 6 Jan 2009 11:07:54 -0800 Subject: can: omit unneeded skb_clone() calls The AF_CAN core delivered always cloned sk_buffs to the AF_CAN protocols, although this was _only_ needed by the can-raw protocol. With this (additionally documented) change, the AF_CAN core calls the callback functions of the registered AF_CAN protocols with the original (uncloned) sk_buff pointer and let's the can-raw protocol do the skb_clone() itself which omits all unneeded skb_clone() calls for other AF_CAN protocols. Signed-off-by: Oliver Hartkopp Signed-off-by: Urs Thuermann Signed-off-by: David S. Miller --- include/linux/can/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/can/core.h b/include/linux/can/core.h index f50785ad478..25085cbadcf 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h @@ -19,7 +19,7 @@ #include #include -#define CAN_VERSION "20081130" +#define CAN_VERSION "20090105" /* increment this number each time you change some user-space interface */ #define CAN_ABI_VERSION "8" -- cgit v1.2.3 From 787e9208360117835101f513f7db593dc2525cf8 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Thu, 8 Jan 2009 10:40:57 -0800 Subject: ipv6: Add GRO support This patch adds GRO support for IPv6. IPv6 GRO supports extension headers in the same way as GSO (by using the same infrastructure). It's also simpler compared to IPv4 since we no longer have to worry about fragmentation attributes or header checksums. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- include/net/protocol.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/net/protocol.h b/include/net/protocol.h index cb2965aa1b6..ffa5b8b1f1d 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h @@ -59,6 +59,9 @@ struct inet6_protocol int (*gso_send_check)(struct sk_buff *skb); struct sk_buff *(*gso_segment)(struct sk_buff *skb, int features); + struct sk_buff **(*gro_receive)(struct sk_buff **head, + struct sk_buff *skb); + int (*gro_complete)(struct sk_buff *skb); unsigned int flags; /* INET6_PROTO_xxx */ }; -- cgit v1.2.3 From 56cf391a9462a4897ea660a6af3662dda5ae8c84 Mon Sep 17 00:00:00 2001 From: Inaky Perez-Gonzalez Date: Thu, 8 Jan 2009 12:56:57 -0800 Subject: wimax: fix kernel-doc for debufs_dentry member of struct wimax_dev Reported by Randy Dunlap from a warning in the v2.6.29 merge window tree as of 2009/1/8. Signed-off-by: Inaky Perez-Gonzalez Signed-off-by: David S. Miller --- include/net/wimax.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/net/wimax.h b/include/net/wimax.h index 1602614fdaf..073809ce94f 100644 --- a/include/net/wimax.h +++ b/include/net/wimax.h @@ -323,6 +323,9 @@ struct input_dev; * * @rf_hw: [private] State of the hardware radio switch (OFF/ON) * + * @debufs_dentry: [private] Used to hook up a debugfs entry. This + * shows up in the debugfs root as wimax:DEVICENAME. + * * Description: * This structure defines a common interface to access all WiMAX * devices from different vendors and provides a common API as well as -- cgit v1.2.3