diff options
author | Yuval Mintz <yuvalm@mellanox.com> | 2018-02-28 23:29:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-01 13:13:23 -0500 |
commit | 0bbbf0e7d0e7ea8267836986346a9b3a35b74e4e (patch) | |
tree | 4a7f295d9179f46de5181dab1501b423d9a6c23e /include/linux/mroute_base.h | |
parent | b70432f7319eb75b24ca57dde8146c5e27244780 (diff) | |
download | blackbird-obmc-linux-0bbbf0e7d0e7ea8267836986346a9b3a35b74e4e.tar.gz blackbird-obmc-linux-0bbbf0e7d0e7ea8267836986346a9b3a35b74e4e.zip |
ipmr, ip6mr: Unite creation of new mr_table
Now that both ipmr and ip6mr are using the same mr_table structure,
we can have a common function to allocate & initialize a new instance.
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_base.h')
-rw-r--r-- | include/linux/mroute_base.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/mroute_base.h b/include/linux/mroute_base.h index 1cc944a14df5..805305722803 100644 --- a/include/linux/mroute_base.h +++ b/include/linux/mroute_base.h @@ -85,6 +85,13 @@ void vif_device_init(struct vif_device *v, unsigned char threshold, unsigned short flags, unsigned short get_iflink_mask); + +struct mr_table * +mr_table_alloc(struct net *net, u32 id, + const struct rhashtable_params *rht_params, + void (*expire_func)(struct timer_list *t), + void (*table_set)(struct mr_table *mrt, + struct net *net)); #else static inline void vif_device_init(struct vif_device *v, struct net_device *dev, @@ -94,5 +101,15 @@ static inline void vif_device_init(struct vif_device *v, unsigned short get_iflink_mask) { } + +static inline struct mr_table * +mr_table_alloc(struct net *net, u32 id, + const struct rhashtable_params *rht_params, + void (*expire_func)(struct timer_list *t), + void (*table_set)(struct mr_table *mrt, + struct net *net)) +{ + return NULL; +} #endif #endif |