mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-28 13:29:36 -04:00
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>
This commit is contained in:
committed by
David S. Miller
parent
b70432f731
commit
0bbbf0e7d0
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user