]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ipmr: move struct mr_table and VIF_EXISTS to mroute.h
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Thu, 26 Nov 2015 14:23:47 +0000 (15:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Nov 2015 20:26:22 +0000 (15:26 -0500)
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>
include/linux/mroute.h
net/ipv4/ipmr.c

index 7c567a2679ceb740867f33b2a3a4003cc96d0b59..bf9b322cb0b03abe8154b9180dabca6da1110f3c 100644 (file)
@@ -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
index a74e61883b8fa8d0c9875c2ac4a53845b7ff573d..ff3dbbb9f11c1dba10fcafb70b9e43aafa97c2d6 100644 (file)
 #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);