Lines Matching refs:dev

110 int l3mdev_master_ifindex_rcu(const struct net_device *dev)  in l3mdev_master_ifindex_rcu()  argument
114 if (!dev) in l3mdev_master_ifindex_rcu()
117 if (netif_is_l3_master(dev)) { in l3mdev_master_ifindex_rcu()
118 ifindex = dev->ifindex; in l3mdev_master_ifindex_rcu()
119 } else if (netif_is_l3_slave(dev)) { in l3mdev_master_ifindex_rcu()
121 struct net_device *_dev = (struct net_device *)dev; in l3mdev_master_ifindex_rcu()
146 struct net_device *dev; in l3mdev_master_upper_ifindex_by_index_rcu() local
148 dev = dev_get_by_index_rcu(net, ifindex); in l3mdev_master_upper_ifindex_by_index_rcu()
149 while (dev && !netif_is_l3_master(dev)) in l3mdev_master_upper_ifindex_by_index_rcu()
150 dev = netdev_master_upper_dev_get_rcu(dev); in l3mdev_master_upper_ifindex_by_index_rcu()
152 return dev ? dev->ifindex : 0; in l3mdev_master_upper_ifindex_by_index_rcu()
162 u32 l3mdev_fib_table_rcu(const struct net_device *dev) in l3mdev_fib_table_rcu() argument
166 if (!dev) in l3mdev_fib_table_rcu()
169 if (netif_is_l3_master(dev)) { in l3mdev_fib_table_rcu()
170 if (dev->l3mdev_ops->l3mdev_fib_table) in l3mdev_fib_table_rcu()
171 tb_id = dev->l3mdev_ops->l3mdev_fib_table(dev); in l3mdev_fib_table_rcu()
172 } else if (netif_is_l3_slave(dev)) { in l3mdev_fib_table_rcu()
176 struct net_device *_dev = (struct net_device *) dev; in l3mdev_fib_table_rcu()
191 struct net_device *dev; in l3mdev_fib_table_by_index() local
199 dev = dev_get_by_index_rcu(net, ifindex); in l3mdev_fib_table_by_index()
200 if (dev) in l3mdev_fib_table_by_index()
201 tb_id = l3mdev_fib_table_rcu(dev); in l3mdev_fib_table_by_index()
222 struct net_device *dev; in l3mdev_link_scope_lookup() local
226 dev = dev_get_by_index_rcu(net, fl6->flowi6_oif); in l3mdev_link_scope_lookup()
227 if (dev && netif_is_l3_slave(dev)) in l3mdev_link_scope_lookup()
228 dev = netdev_master_upper_dev_get_rcu(dev); in l3mdev_link_scope_lookup()
230 if (dev && netif_is_l3_master(dev) && in l3mdev_link_scope_lookup()
231 dev->l3mdev_ops->l3mdev_link_scope_lookup) in l3mdev_link_scope_lookup()
232 dst = dev->l3mdev_ops->l3mdev_link_scope_lookup(dev, fl6); in l3mdev_link_scope_lookup()
250 struct net_device *dev; in l3mdev_fib_rule_match() local
259 dev = dev_get_by_index_rcu(net, fl->flowi_l3mdev); in l3mdev_fib_rule_match()
260 if (dev && netif_is_l3_master(dev) && in l3mdev_fib_rule_match()
261 dev->l3mdev_ops->l3mdev_fib_table) { in l3mdev_fib_rule_match()
262 arg->table = dev->l3mdev_ops->l3mdev_fib_table(dev); in l3mdev_fib_rule_match()
273 struct net_device *dev; in l3mdev_update_flow() local
278 dev = dev_get_by_index_rcu(net, fl->flowi_oif); in l3mdev_update_flow()
279 if (dev) { in l3mdev_update_flow()
281 fl->flowi_l3mdev = l3mdev_master_ifindex_rcu(dev); in l3mdev_update_flow()
286 if (netif_is_l3_master(dev)) in l3mdev_update_flow()
293 dev = dev_get_by_index_rcu(net, fl->flowi_iif); in l3mdev_update_flow()
294 if (dev) in l3mdev_update_flow()
295 fl->flowi_l3mdev = l3mdev_master_ifindex_rcu(dev); in l3mdev_update_flow()