summaryrefslogtreecommitdiffstats
path: root/include/linux/mroute.h
diff options
context:
space:
mode:
authorYuval Mintz <yuvalm@mellanox.com>2018-02-28 23:29:29 +0200
committerDavid S. Miller <davem@davemloft.net>2018-03-01 13:13:23 -0500
commit6853f21f764b04e58df5e44629fec1fb8f3cbf2e (patch)
treec5b3a92c95ed6cf8c262f9c0f4ea92e7ccf3b73d /include/linux/mroute.h
parenta25724b05af0e38232764fc0d0f984254e4b5c41 (diff)
downloadlinux-stable-6853f21f764b04e58df5e44629fec1fb8f3cbf2e.tar.gz
linux-stable-6853f21f764b04e58df5e44629fec1fb8f3cbf2e.tar.bz2
linux-stable-6853f21f764b04e58df5e44629fec1fb8f3cbf2e.zip
ipmr,ipmr6: Define a uniform vif_device
The two implementations have almost identical structures - vif_device and mif_device. As a step toward uniforming the mr_tables, eliminate the mif_device and relocate the vif_device definition into a new common header file. Also, introduce a common initializing function for setting most of the vif_device fields in a new common source file. This requires modifying the ipv{4,6] Kconfig and ipv4 makefile as we're introducing a new common config option - CONFIG_IP_MROUTE_COMMON. Signed-off-by: Yuval Mintz <yuvalm@mellanox.com> Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mroute.h')
-rw-r--r--include/linux/mroute.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h
index 5396521a776a..b8aadffe6237 100644
--- a/include/linux/mroute.h
+++ b/include/linux/mroute.h
@@ -9,6 +9,7 @@
#include <net/fib_rules.h>
#include <net/fib_notifier.h>
#include <uapi/linux/mroute.h>
+#include <linux/mroute_base.h>
#ifdef CONFIG_IP_MROUTE
static inline int ip_mroute_opt(int opt)
@@ -56,18 +57,6 @@ static inline bool ipmr_rule_default(const struct fib_rule *rule)
}
#endif
-struct vif_device {
- struct net_device *dev; /* Device we are using */
- struct netdev_phys_item_id dev_parent_id; /* Device parent ID */
- unsigned long bytes_in,bytes_out;
- unsigned long pkt_in,pkt_out; /* Statistics */
- unsigned long rate_limit; /* Traffic shaping (NI) */
- unsigned char threshold; /* TTL threshold */
- unsigned short flags; /* Control flags */
- __be32 local,remote; /* Addresses(remote for tunnels)*/
- int link; /* Physical interface index */
-};
-
struct vif_entry_notifier_info {
struct fib_notifier_info info;
struct net_device *dev;