summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2015-11-26 15:23:47 +0100
committerDavid S. Miller <davem@davemloft.net>2015-11-30 15:26:22 -0500
commit5ea1f13299d8b8edcb2969eda4c81f8e3264b706 (patch)
tree32bedf05c7847e9cd8b891b3c2b04e302184dbf6
parent520191bb404c4b7b4cdb70a5480ada974b0c2d60 (diff)
downloadop-kernel-dev-5ea1f13299d8b8edcb2969eda4c81f8e3264b706.zip
op-kernel-dev-5ea1f13299d8b8edcb2969eda4c81f8e3264b706.tar.gz
net: ipmr: move struct mr_table and VIF_EXISTS to mroute.h
Move the definitions of VIF_EXISTS() and struct mr_table to mroute.h Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/mroute.h21
-rw-r--r--net/ipv4/ipmr.c18
2 files changed, 19 insertions, 20 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h
index 7c567a2..bf9b322 100644
--- a/include/linux/mroute.h
+++ b/include/linux/mroute.h
@@ -59,6 +59,25 @@ struct vif_device {
#define VIFF_STATIC 0x8000
+#define VIF_EXISTS(_mrt, _idx) ((_mrt)->vif_table[_idx].dev != NULL)
+#define MFC_LINES 64
+
+struct mr_table {
+ struct list_head list;
+ possible_net_t net;
+ u32 id;
+ struct sock __rcu *mroute_sk;
+ struct timer_list ipmr_expire_timer;
+ struct list_head mfc_unres_queue;
+ struct list_head mfc_cache_array[MFC_LINES];
+ struct vif_device vif_table[MAXVIFS];
+ int maxvif;
+ atomic_t cache_resolve_queue_len;
+ bool mroute_do_assert;
+ bool mroute_do_pim;
+ int mroute_reg_vif_num;
+};
+
/* mfc_flags:
* MFC_STATIC - the entry was added statically (not by a routing daemon)
*/
@@ -91,8 +110,6 @@ struct mfc_cache {
struct rcu_head rcu;
};
-#define MFC_LINES 64
-
#ifdef __BIG_ENDIAN
#define MFC_HASH(a,b) (((((__force u32)(__be32)a)>>24)^(((__force u32)(__be32)b)>>26))&(MFC_LINES-1))
#else
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index a74e618..ff3dbbb 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -67,22 +67,6 @@
#include <net/fib_rules.h>
#include <linux/netconf.h>
-struct mr_table {
- struct list_head list;
- possible_net_t net;
- u32 id;
- struct sock __rcu *mroute_sk;
- struct timer_list ipmr_expire_timer;
- struct list_head mfc_unres_queue;
- struct list_head mfc_cache_array[MFC_LINES];
- struct vif_device vif_table[MAXVIFS];
- int maxvif;
- atomic_t cache_resolve_queue_len;
- bool mroute_do_assert;
- bool mroute_do_pim;
- int mroute_reg_vif_num;
-};
-
struct ipmr_rule {
struct fib_rule common;
};
@@ -104,8 +88,6 @@ static DEFINE_RWLOCK(mrt_lock);
/* Multicast router control variables */
-#define VIF_EXISTS(_mrt, _idx) ((_mrt)->vif_table[_idx].dev != NULL)
-
/* Special spinlock for queue of unresolved entries */
static DEFINE_SPINLOCK(mfc_unres_lock);
OpenPOWER on IntegriCloud