summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYotam Gigi <yotamg@mellanox.com>2017-10-03 10:58:07 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-03 20:06:30 +0300
commit5d8b3e69fc5e5ccafc9db1251bb7c78a8622fddd (patch)
treed64c9c33bfe497603b19af002d9c92583c3c5659 /include
parentabf4bb6b63d0a54266f8e7eff3720c1974063971 (diff)
downloadlinux-5d8b3e69fc5e5ccafc9db1251bb7c78a8622fddd.tar.xz
ipv4: ipmr: Add the parent ID field to VIF struct
In order to allow the ipmr module to do partial multicast forwarding according to the device parent ID, add the device parent ID field to the VIF struct. This way, the forwarding path can use the parent ID field without invoking switchdev calls, which requires the RTNL lock. When a new VIF is added, set the device parent ID field in it by invoking the switchdev_port_attr_get call. Signed-off-by: Yotam Gigi <yotamg@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mroute.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h
index b072a84fbe1c..8242d05df35e 100644
--- a/include/linux/mroute.h
+++ b/include/linux/mroute.h
@@ -57,6 +57,7 @@ static inline bool ipmr_rule_default(const struct fib_rule *rule)
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) */