dst.c (de3cb747ffac5f2a4a6bb156e7e2fd5229e688e5) dst.c (2774c7aba6c97a2535be3309a2209770953780b3)
1/*
2 * net/core/dst.c Protocol independent destination cache.
3 *
4 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
5 *
6 */
7
8#include <linux/bitops.h>

--- 4 unchanged lines hidden (view full) ---

13#include <linux/mm.h>
14#include <linux/module.h>
15#include <linux/netdevice.h>
16#include <linux/skbuff.h>
17#include <linux/string.h>
18#include <linux/types.h>
19#include <net/net_namespace.h>
20
1/*
2 * net/core/dst.c Protocol independent destination cache.
3 *
4 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
5 *
6 */
7
8#include <linux/bitops.h>

--- 4 unchanged lines hidden (view full) ---

13#include <linux/mm.h>
14#include <linux/module.h>
15#include <linux/netdevice.h>
16#include <linux/skbuff.h>
17#include <linux/string.h>
18#include <linux/types.h>
19#include <net/net_namespace.h>
20
21#include <net/net_namespace.h>
21#include <net/dst.h>
22
23/*
24 * Theory of operations:
25 * 1) We use a list, protected by a spinlock, to add
26 * new entries from both BH and non-BH context.
27 * 2) In order to keep spinlock held for a small delay,
28 * we use a second list where are stored long lived

--- 244 unchanged lines hidden (view full) ---

273 dst->ops->ifdown(dst, dev, unregister);
274
275 if (dev != dst->dev)
276 return;
277
278 if (!unregister) {
279 dst->input = dst->output = dst_discard;
280 } else {
22#include <net/dst.h>
23
24/*
25 * Theory of operations:
26 * 1) We use a list, protected by a spinlock, to add
27 * new entries from both BH and non-BH context.
28 * 2) In order to keep spinlock held for a small delay,
29 * we use a second list where are stored long lived

--- 244 unchanged lines hidden (view full) ---

274 dst->ops->ifdown(dst, dev, unregister);
275
276 if (dev != dst->dev)
277 return;
278
279 if (!unregister) {
280 dst->input = dst->output = dst_discard;
281 } else {
281 dst->dev = loopback_dev;
282 dst->dev = init_net.loopback_dev;
282 dev_hold(dst->dev);
283 dev_put(dev);
284 if (dst->neighbour && dst->neighbour->dev == dev) {
283 dev_hold(dst->dev);
284 dev_put(dev);
285 if (dst->neighbour && dst->neighbour->dev == dev) {
285 dst->neighbour->dev = loopback_dev;
286 dst->neighbour->dev = init_net.loopback_dev;
286 dev_put(dev);
287 dev_hold(dst->neighbour->dev);
288 }
289 }
290}
291
292static int dst_dev_event(struct notifier_block *this, unsigned long event, void *ptr)
293{

--- 45 unchanged lines hidden ---
287 dev_put(dev);
288 dev_hold(dst->neighbour->dev);
289 }
290 }
291}
292
293static int dst_dev_event(struct notifier_block *this, unsigned long event, void *ptr)
294{

--- 45 unchanged lines hidden ---