dst.h (63fca65d08632fbec9d9b655f671cf08aa1aeeb8) | dst.h (51ce8bd4d17a761e1a90a34a1b5c9b762cce7553) |
---|---|
1/* 2 * net/dst.h Protocol independent destination cache definitions. 3 * 4 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 5 * 6 */ 7 8#ifndef _NET_DST_H --- 45 unchanged lines hidden (view full) --- 54#define DST_NOHASH 0x0008 55#define DST_NOCACHE 0x0010 56#define DST_NOCOUNT 0x0020 57#define DST_FAKE_RTABLE 0x0040 58#define DST_XFRM_TUNNEL 0x0080 59#define DST_XFRM_QUEUE 0x0100 60#define DST_METADATA 0x0200 61 | 1/* 2 * net/dst.h Protocol independent destination cache definitions. 3 * 4 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 5 * 6 */ 7 8#ifndef _NET_DST_H --- 45 unchanged lines hidden (view full) --- 54#define DST_NOHASH 0x0008 55#define DST_NOCACHE 0x0010 56#define DST_NOCOUNT 0x0020 57#define DST_FAKE_RTABLE 0x0040 58#define DST_XFRM_TUNNEL 0x0080 59#define DST_XFRM_QUEUE 0x0100 60#define DST_METADATA 0x0200 61 |
62 unsigned short pending_confirm; 63 | |
64 short error; 65 66 /* A non-zero value of dst->obsolete forces by-hand validation 67 * of the route entry. Positive values are set by the generic 68 * dst layer to indicate that the entry has been forcefully 69 * destroyed. 70 * 71 * Negative values are used by the implementation layer code to 72 * force invocation of the dst_ops->check() method. 73 */ 74 short obsolete; 75#define DST_OBSOLETE_NONE 0 76#define DST_OBSOLETE_DEAD 2 77#define DST_OBSOLETE_FORCE_CHK -1 78#define DST_OBSOLETE_KILL -2 79 unsigned short header_len; /* more space at head required */ 80 unsigned short trailer_len; /* space to reserve at tail */ | 62 short error; 63 64 /* A non-zero value of dst->obsolete forces by-hand validation 65 * of the route entry. Positive values are set by the generic 66 * dst layer to indicate that the entry has been forcefully 67 * destroyed. 68 * 69 * Negative values are used by the implementation layer code to 70 * force invocation of the dst_ops->check() method. 71 */ 72 short obsolete; 73#define DST_OBSOLETE_NONE 0 74#define DST_OBSOLETE_DEAD 2 75#define DST_OBSOLETE_FORCE_CHK -1 76#define DST_OBSOLETE_KILL -2 77 unsigned short header_len; /* more space at head required */ 78 unsigned short trailer_len; /* space to reserve at tail */ |
79 unsigned short __pad3; 80 |
|
81#ifdef CONFIG_IP_ROUTE_CLASSID 82 __u32 tclassid; 83#else 84 __u32 __pad2; 85#endif 86 87#ifdef CONFIG_64BIT 88 /* --- 346 unchanged lines hidden (view full) --- 435static inline void dst_rcu_free(struct rcu_head *head) 436{ 437 struct dst_entry *dst = container_of(head, struct dst_entry, rcu_head); 438 dst_free(dst); 439} 440 441static inline void dst_confirm(struct dst_entry *dst) 442{ | 81#ifdef CONFIG_IP_ROUTE_CLASSID 82 __u32 tclassid; 83#else 84 __u32 __pad2; 85#endif 86 87#ifdef CONFIG_64BIT 88 /* --- 346 unchanged lines hidden (view full) --- 435static inline void dst_rcu_free(struct rcu_head *head) 436{ 437 struct dst_entry *dst = container_of(head, struct dst_entry, rcu_head); 438 dst_free(dst); 439} 440 441static inline void dst_confirm(struct dst_entry *dst) 442{ |
443 dst->pending_confirm = 1; | |
444} 445 446static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n, 447 struct sk_buff *skb) 448{ 449 const struct hh_cache *hh; 450 | 443} 444 445static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n, 446 struct sk_buff *skb) 447{ 448 const struct hh_cache *hh; 449 |
451 if (dst->pending_confirm) { 452 unsigned long now = jiffies; 453 454 dst->pending_confirm = 0; 455 /* avoid dirtying neighbour */ 456 if (n->confirmed != now) 457 n->confirmed = now; 458 } 459 | |
460 hh = &n->hh; 461 if ((n->nud_state & NUD_CONNECTED) && hh->hh_len) 462 return neigh_hh_output(hh, skb); 463 else 464 return n->output(n, skb); 465} 466 467static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) --- 107 unchanged lines hidden --- | 450 hh = &n->hh; 451 if ((n->nud_state & NUD_CONNECTED) && hh->hh_len) 452 return neigh_hh_output(hh, skb); 453 else 454 return n->output(n, skb); 455} 456 457static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) --- 107 unchanged lines hidden --- |