Lines Matching refs:upper_dev

3701 	struct net_device *upper_dev;  in mlxsw_sp_port_lag_uppers_cleanup()  local
3707 netdev_for_each_upper_dev_rcu(lag_dev, upper_dev, iter) { in mlxsw_sp_port_lag_uppers_cleanup()
3708 if (!netif_is_bridge_port(upper_dev)) in mlxsw_sp_port_lag_uppers_cleanup()
3710 br_dev = netdev_master_upper_dev_get(upper_dev); in mlxsw_sp_port_lag_uppers_cleanup()
3711 mlxsw_sp_port_bridge_leave(mlxsw_sp_port, upper_dev, br_dev); in mlxsw_sp_port_lag_uppers_cleanup()
4147 struct net_device *upper_dev; in mlxsw_sp_netdevice_port_upper_event() local
4159 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_port_upper_event()
4160 if (!is_vlan_dev(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4161 !netif_is_lag_master(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4162 !netif_is_bridge_master(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4163 !netif_is_ovs_master(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4164 !netif_is_macvlan(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4170 if (netif_is_bridge_master(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4171 !mlxsw_sp_bridge_device_is_offloaded(mlxsw_sp, upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4172 mlxsw_sp_bridge_has_vxlan(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4173 !mlxsw_sp_bridge_vxlan_is_valid(upper_dev, extack)) in mlxsw_sp_netdevice_port_upper_event()
4175 if (netdev_has_any_upper_dev(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4176 (!netif_is_bridge_master(upper_dev) || in mlxsw_sp_netdevice_port_upper_event()
4178 upper_dev))) { in mlxsw_sp_netdevice_port_upper_event()
4182 if (netif_is_lag_master(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4183 !mlxsw_sp_master_lag_check(mlxsw_sp, upper_dev, in mlxsw_sp_netdevice_port_upper_event()
4186 if (netif_is_lag_master(upper_dev) && vlan_uses_dev(dev)) { in mlxsw_sp_netdevice_port_upper_event()
4190 if (netif_is_lag_port(dev) && is_vlan_dev(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4191 !netif_is_lag_master(vlan_dev_real_dev(upper_dev))) { in mlxsw_sp_netdevice_port_upper_event()
4195 if (netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4200 if (netif_is_ovs_master(upper_dev) && vlan_uses_dev(dev)) { in mlxsw_sp_netdevice_port_upper_event()
4204 if (netif_is_ovs_port(dev) && is_vlan_dev(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4208 if (netif_is_bridge_master(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4209 br_vlan_get_proto(upper_dev, &proto); in mlxsw_sp_netdevice_port_upper_event()
4210 if (br_vlan_enabled(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4216 br_vlan_enabled(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4222 if (netif_is_bridge_port(lower_dev) && is_vlan_dev(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4233 if (is_vlan_dev(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4234 ntohs(vlan_dev_vlan_proto(upper_dev)) != ETH_P_8021Q) { in mlxsw_sp_netdevice_port_upper_event()
4240 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_port_upper_event()
4241 if (netif_is_bridge_master(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4245 upper_dev, in mlxsw_sp_netdevice_port_upper_event()
4250 upper_dev); in mlxsw_sp_netdevice_port_upper_event()
4251 } else if (netif_is_lag_master(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4254 upper_dev, extack); in mlxsw_sp_netdevice_port_upper_event()
4258 upper_dev); in mlxsw_sp_netdevice_port_upper_event()
4260 } else if (netif_is_ovs_master(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4265 } else if (netif_is_macvlan(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4267 mlxsw_sp_rif_macvlan_del(mlxsw_sp, upper_dev); in mlxsw_sp_netdevice_port_upper_event()
4268 } else if (is_vlan_dev(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4271 if (!netif_is_bridge_port(upper_dev)) in mlxsw_sp_netdevice_port_upper_event()
4275 br_dev = netdev_master_upper_dev_get(upper_dev); in mlxsw_sp_netdevice_port_upper_event()
4276 mlxsw_sp_port_bridge_leave(mlxsw_sp_port, upper_dev, in mlxsw_sp_netdevice_port_upper_event()
4354 struct net_device *upper_dev; in mlxsw_sp_netdevice_port_vlan_event() local
4361 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_port_vlan_event()
4362 if (!netif_is_bridge_master(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4363 !netif_is_macvlan(upper_dev)) { in mlxsw_sp_netdevice_port_vlan_event()
4369 if (netif_is_bridge_master(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4370 !mlxsw_sp_bridge_device_is_offloaded(mlxsw_sp, upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4371 mlxsw_sp_bridge_has_vxlan(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4372 !mlxsw_sp_bridge_vxlan_is_valid(upper_dev, extack)) in mlxsw_sp_netdevice_port_vlan_event()
4374 if (netdev_has_any_upper_dev(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4375 (!netif_is_bridge_master(upper_dev) || in mlxsw_sp_netdevice_port_vlan_event()
4377 upper_dev))) { in mlxsw_sp_netdevice_port_vlan_event()
4381 if (netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4388 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_port_vlan_event()
4389 if (netif_is_bridge_master(upper_dev)) { in mlxsw_sp_netdevice_port_vlan_event()
4393 upper_dev, in mlxsw_sp_netdevice_port_vlan_event()
4398 upper_dev); in mlxsw_sp_netdevice_port_vlan_event()
4399 } else if (netif_is_macvlan(upper_dev)) { in mlxsw_sp_netdevice_port_vlan_event()
4401 mlxsw_sp_rif_macvlan_del(mlxsw_sp, upper_dev); in mlxsw_sp_netdevice_port_vlan_event()
4442 struct net_device *upper_dev; in mlxsw_sp_netdevice_bridge_vlan_event() local
4451 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_bridge_vlan_event()
4452 if (!netif_is_macvlan(upper_dev)) { in mlxsw_sp_netdevice_bridge_vlan_event()
4458 if (netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_bridge_vlan_event()
4465 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_bridge_vlan_event()
4468 if (netif_is_macvlan(upper_dev)) in mlxsw_sp_netdevice_bridge_vlan_event()
4469 mlxsw_sp_rif_macvlan_del(mlxsw_sp, upper_dev); in mlxsw_sp_netdevice_bridge_vlan_event()
4502 struct net_device *upper_dev; in mlxsw_sp_netdevice_bridge_event() local
4512 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_bridge_event()
4513 if (!is_vlan_dev(upper_dev) && !netif_is_macvlan(upper_dev)) { in mlxsw_sp_netdevice_bridge_event()
4526 if (is_vlan_dev(upper_dev) && in mlxsw_sp_netdevice_bridge_event()
4527 ntohs(vlan_dev_vlan_proto(upper_dev)) != ETH_P_8021Q) { in mlxsw_sp_netdevice_bridge_event()
4531 if (netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_bridge_event()
4538 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_bridge_event()
4541 if (is_vlan_dev(upper_dev)) in mlxsw_sp_netdevice_bridge_event()
4542 mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, upper_dev); in mlxsw_sp_netdevice_bridge_event()
4543 if (netif_is_macvlan(upper_dev)) in mlxsw_sp_netdevice_bridge_event()
4544 mlxsw_sp_rif_macvlan_del(mlxsw_sp, upper_dev); in mlxsw_sp_netdevice_bridge_event()
4575 return netif_is_l3_master(info->upper_dev); in mlxsw_sp_is_vrf_event()
4585 struct net_device *upper_dev; in mlxsw_sp_netdevice_vxlan_event() local
4594 upper_dev = cu_info->upper_dev; in mlxsw_sp_netdevice_vxlan_event()
4595 if (!netif_is_bridge_master(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
4597 if (!mlxsw_sp_lower_get(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
4599 if (!mlxsw_sp_bridge_vxlan_is_valid(upper_dev, extack)) in mlxsw_sp_netdevice_vxlan_event()
4608 if (br_vlan_enabled(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
4610 return mlxsw_sp_bridge_vxlan_join(mlxsw_sp, upper_dev, in mlxsw_sp_netdevice_vxlan_event()
4616 if (br_vlan_enabled(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
4622 upper_dev = netdev_master_upper_dev_get(dev); in mlxsw_sp_netdevice_vxlan_event()
4623 if (!upper_dev) in mlxsw_sp_netdevice_vxlan_event()
4625 if (!netif_is_bridge_master(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
4627 if (!mlxsw_sp_lower_get(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
4629 return mlxsw_sp_bridge_vxlan_join(mlxsw_sp, upper_dev, dev, 0, in mlxsw_sp_netdevice_vxlan_event()
4632 upper_dev = netdev_master_upper_dev_get(dev); in mlxsw_sp_netdevice_vxlan_event()
4633 if (!upper_dev) in mlxsw_sp_netdevice_vxlan_event()
4635 if (!netif_is_bridge_master(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
4637 if (!mlxsw_sp_lower_get(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()