]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ip6mr: Remove MFC_NOTIFY and refactor flags
authorYuval Mintz <yuvalm@mellanox.com>
Wed, 28 Feb 2018 21:29:38 +0000 (23:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Mar 2018 18:13:23 +0000 (13:13 -0500)
MFC_NOTIFY exists in ip6mr, probably as some legacy code
[was already removed for ipmr in commit
06bd6c0370bb ("net: ipmr: remove unused MFC_NOTIFY flag and make the flags enum").
Remove it from ip6mr as well, and move the enum into a common file;
Notice MFC_OFFLOAD is currently only used by ipmr.

Signed-off-by: Yuval Mintz <yuvalm@mellanox.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/mroute.h
include/linux/mroute6.h
include/linux/mroute_base.h
net/ipv6/ip6mr.c

index 63b36e6c72a03b6d73f093b93fef1ff28dc2717d..7ed82e4f11b3536bdb9b4113cbb46a6ecdde84b1 100644 (file)
@@ -65,15 +65,6 @@ struct vif_entry_notifier_info {
 
 #define VIFF_STATIC 0x8000
 
-/* mfc_flags:
- * MFC_STATIC - the entry was added statically (not by a routing daemon)
- * MFC_OFFLOAD - the entry was offloaded to the hardware
- */
-enum {
-       MFC_STATIC = BIT(0),
-       MFC_OFFLOAD = BIT(1),
-};
-
 struct mfc_cache_cmp_arg {
        __be32 mfc_mcastgrp;
        __be32 mfc_origin;
index 6acf576fc1359f089c97e1489b0fba1688da25be..1ac38e6819f5408cafe44b5f925586ad9c587ad3 100644 (file)
@@ -81,9 +81,6 @@ struct mfc6_cache {
        };
 };
 
-#define MFC_STATIC             1
-#define MFC_NOTIFY             2
-
 #define MFC_ASSERT_THRESH (3*HZ)               /* Maximal freq. of asserts */
 
 struct rtmsg;
index cfaec9bd2d3c7ac38b5dd759868996382f5893d9..f40202b16dae00bf65d48d41dcdb1ebcb3405113 100644 (file)
@@ -45,6 +45,15 @@ struct vif_device {
 
 #define VIF_EXISTS(_mrt, _idx) (!!((_mrt)->vif_table[_idx].dev))
 
+/* mfc_flags:
+ * MFC_STATIC - the entry was added statically (not by a routing daemon)
+ * MFC_OFFLOAD - the entry was offloaded to the hardware
+ */
+enum {
+       MFC_STATIC = BIT(0),
+       MFC_OFFLOAD = BIT(1),
+};
+
 /**
  * struct mr_mfc - common multicast routing entries
  * @mnode: rhashtable list
index ddd9e6bba499ff3930025af9ae5a317a2188861d..c3b3f1c381e1564312e27710656236ed383a071b 100644 (file)
@@ -2203,9 +2203,6 @@ int ip6mr_get_route(struct net *net, struct sk_buff *skb, struct rtmsg *rtm,
                return err;
        }
 
-       if (rtm->rtm_flags & RTM_F_NOTIFY)
-               cache->_c.mfc_flags |= MFC_NOTIFY;
-
        err = __ip6mr_fill_mroute(mrt, skb, cache, rtm);
        read_unlock(&mrt_lock);
        return err;