summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2017-11-05 13:36:18 +0000
committerBen Hutchings <ben@decadent.org.uk>2017-11-11 13:33:20 +0000
commit6ddcce5b29278618ae2fb08058e48568aba0cd19 (patch)
tree031baac64fede10936e2bbabf3b72610f01beaf3 /include
parent9301343bc8d20d23c951dad6495b334ea797b5be (diff)
dst: Increase alignment of metrics to allow extra flag on pointers
For the backport of "ipv4: add reference counting to metrics", we will need a third flag on metrics pointers. This was not needed upstream as the DST_METRICS_FORCE_OVERWRITE flag has been eliminated there. In order to use three flag bits we need to increase the alignment of metrics from 4 to 8 bytes. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/net/dst.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/dst.h b/include/net/dst.h
index 0fb99a26e973..f285de9d567a 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -105,12 +105,15 @@ struct dst_entry {
};
};
+void *dst_alloc_metrics(gfp_t flags);
+void dst_free_metrics(void *metrics);
u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old);
extern const u32 dst_default_metrics[];
#define DST_METRICS_READ_ONLY 0x1UL
#define DST_METRICS_FORCE_OVERWRITE 0x2UL
-#define DST_METRICS_FLAGS 0x3UL
+#define DST_METRICS_FLAGS 0x7UL
+#define DST_METRICS_ALIGNMENT 0x8UL
#define __DST_METRICS_PTR(Y) \
((u32 *)((Y) & ~DST_METRICS_FLAGS))
#define DST_METRICS_PTR(X) __DST_METRICS_PTR((X)->_metrics)