Skip to content

Commit

Permalink
ip6mr: Remove MFC_NOTIFY and refactor flags
Browse files Browse the repository at this point in the history
MFC_NOTIFY exists in ip6mr, probably as some legacy code
[was already removed for ipmr in commit
06bd6c0 ("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 <[email protected]>
Acked-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Yuval Mintz authored and davem330 committed Mar 1, 2018
1 parent 3feda6b commit 889cd83
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
9 changes: 0 additions & 9 deletions include/linux/mroute.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions include/linux/mroute6.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 9 additions & 0 deletions include/linux/mroute_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions net/ipv6/ip6mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 889cd83

Please sign in to comment.