diff options
Diffstat (limited to 'include/net/dst.h')
-rw-r--r-- | include/net/dst.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 77eb53fabfb0..46ed958e0c6e 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -54,10 +54,9 @@ struct dst_entry { | |||
54 | #define DST_NOHASH 0x0008 | 54 | #define DST_NOHASH 0x0008 |
55 | #define DST_NOCACHE 0x0010 | 55 | #define DST_NOCACHE 0x0010 |
56 | #define DST_NOCOUNT 0x0020 | 56 | #define DST_NOCOUNT 0x0020 |
57 | #define DST_NOPEER 0x0040 | 57 | #define DST_FAKE_RTABLE 0x0040 |
58 | #define DST_FAKE_RTABLE 0x0080 | 58 | #define DST_XFRM_TUNNEL 0x0080 |
59 | #define DST_XFRM_TUNNEL 0x0100 | 59 | #define DST_XFRM_QUEUE 0x0100 |
60 | #define DST_XFRM_QUEUE 0x0200 | ||
61 | 60 | ||
62 | unsigned short pending_confirm; | 61 | unsigned short pending_confirm; |
63 | 62 | ||
@@ -109,9 +108,11 @@ struct dst_entry { | |||
109 | u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); | 108 | u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); |
110 | extern const u32 dst_default_metrics[]; | 109 | extern const u32 dst_default_metrics[]; |
111 | 110 | ||
112 | #define DST_METRICS_READ_ONLY 0x1UL | 111 | #define DST_METRICS_READ_ONLY 0x1UL |
112 | #define DST_METRICS_FORCE_OVERWRITE 0x2UL | ||
113 | #define DST_METRICS_FLAGS 0x3UL | ||
113 | #define __DST_METRICS_PTR(Y) \ | 114 | #define __DST_METRICS_PTR(Y) \ |
114 | ((u32 *)((Y) & ~DST_METRICS_READ_ONLY)) | 115 | ((u32 *)((Y) & ~DST_METRICS_FLAGS)) |
115 | #define DST_METRICS_PTR(X) __DST_METRICS_PTR((X)->_metrics) | 116 | #define DST_METRICS_PTR(X) __DST_METRICS_PTR((X)->_metrics) |
116 | 117 | ||
117 | static inline bool dst_metrics_read_only(const struct dst_entry *dst) | 118 | static inline bool dst_metrics_read_only(const struct dst_entry *dst) |
@@ -119,6 +120,11 @@ static inline bool dst_metrics_read_only(const struct dst_entry *dst) | |||
119 | return dst->_metrics & DST_METRICS_READ_ONLY; | 120 | return dst->_metrics & DST_METRICS_READ_ONLY; |
120 | } | 121 | } |
121 | 122 | ||
123 | static inline void dst_metrics_set_force_overwrite(struct dst_entry *dst) | ||
124 | { | ||
125 | dst->_metrics |= DST_METRICS_FORCE_OVERWRITE; | ||
126 | } | ||
127 | |||
122 | void __dst_destroy_metrics_generic(struct dst_entry *dst, unsigned long old); | 128 | void __dst_destroy_metrics_generic(struct dst_entry *dst, unsigned long old); |
123 | 129 | ||
124 | static inline void dst_destroy_metrics_generic(struct dst_entry *dst) | 130 | static inline void dst_destroy_metrics_generic(struct dst_entry *dst) |