aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/dst.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/net/dst.h b/include/net/dst.h
index 27207a13f2a6..612069beda73 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -226,6 +226,26 @@ static inline void skb_dst_force(struct sk_buff *skb)
226 } 226 }
227} 227}
228 228
229
230/**
231 * skb_tunnel_rx - prepare skb for rx reinsert
232 * @skb: buffer
233 * @dev: tunnel device
234 *
235 * After decapsulation, packet is going to re-enter (netif_rx()) our stack,
236 * so make some cleanups, and perform accounting.
237 */
238static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev)
239{
240 skb->dev = dev;
241 /* TODO : stats should be SMP safe */
242 dev->stats.rx_packets++;
243 dev->stats.rx_bytes += skb->len;
244 skb->rxhash = 0;
245 skb_dst_drop(skb);
246 nf_reset(skb);
247}
248
229/* Children define the path of the packet through the 249/* Children define the path of the packet through the
230 * Linux networking. Thus, destinations are stackable. 250 * Linux networking. Thus, destinations are stackable.
231 */ 251 */