aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_vlan.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-01-06 13:50:09 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-06 13:50:09 -0500
commite1c096e251e52773afeffbbcb74d0a072be47ea3 (patch)
treef49f4a34015ba7a4bee16c15942b8f1d47f8c20a /include/linux/if_vlan.h
parent96e93eab20337d063c70d537bd7bc70d90e04fa3 (diff)
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 <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r--include/linux/if_vlan.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index a5cb0c3f6dcf..f8ff918c208f 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);
115extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, 115extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
116 u16 vlan_tci, int polling); 116 u16 vlan_tci, int polling);
117extern int vlan_hwaccel_do_receive(struct sk_buff *skb); 117extern int vlan_hwaccel_do_receive(struct sk_buff *skb);
118extern int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
119 unsigned int vlan_tci, struct sk_buff *skb);
120extern int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
121 unsigned int vlan_tci,
122 struct napi_gro_fraginfo *info);
118 123
119#else 124#else
120static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) 125static 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)
140{ 145{
141 return 0; 146 return 0;
142} 147}
148
149static inline int vlan_gro_receive(struct napi_struct *napi,
150 struct vlan_group *grp,
151 unsigned int vlan_tci, struct sk_buff *skb)
152{
153 return NET_RX_DROP;
154}
155
156static inline int vlan_gro_frags(struct napi_struct *napi,
157 struct vlan_group *grp, unsigned int vlan_tci,
158 struct napi_gro_fraginfo *info)
159{
160 return NET_RX_DROP;
161}
143#endif 162#endif
144 163
145/** 164/**