Lines Matching refs:upper_dev
4216 struct net_device *upper_dev; in mlxsw_sp_port_lag_uppers_cleanup() local
4222 netdev_for_each_upper_dev_rcu(lag_dev, upper_dev, iter) { in mlxsw_sp_port_lag_uppers_cleanup()
4223 if (!netif_is_bridge_port(upper_dev)) in mlxsw_sp_port_lag_uppers_cleanup()
4225 br_dev = netdev_master_upper_dev_get(upper_dev); in mlxsw_sp_port_lag_uppers_cleanup()
4226 mlxsw_sp_port_bridge_leave(mlxsw_sp_port, upper_dev, br_dev); in mlxsw_sp_port_lag_uppers_cleanup()
4665 struct net_device *upper_dev; in mlxsw_sp_netdevice_port_upper_event() local
4677 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_port_upper_event()
4678 if (!is_vlan_dev(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4679 !netif_is_lag_master(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4680 !netif_is_bridge_master(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4681 !netif_is_ovs_master(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4682 !netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4683 !netif_is_l3_master(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4689 if (netif_is_bridge_master(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4690 !mlxsw_sp_bridge_device_is_offloaded(mlxsw_sp, upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4691 mlxsw_sp_bridge_has_vxlan(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4692 !mlxsw_sp_bridge_vxlan_is_valid(upper_dev, extack)) in mlxsw_sp_netdevice_port_upper_event()
4694 if (netdev_has_any_upper_dev(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4695 (!netif_is_bridge_master(upper_dev) || in mlxsw_sp_netdevice_port_upper_event()
4697 upper_dev))) { in mlxsw_sp_netdevice_port_upper_event()
4701 if (netif_is_lag_master(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4702 !mlxsw_sp_master_lag_check(mlxsw_sp, upper_dev, in mlxsw_sp_netdevice_port_upper_event()
4705 if (netif_is_lag_master(upper_dev) && vlan_uses_dev(dev)) { in mlxsw_sp_netdevice_port_upper_event()
4709 if (netif_is_lag_port(dev) && is_vlan_dev(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4710 !netif_is_lag_master(vlan_dev_real_dev(upper_dev))) { in mlxsw_sp_netdevice_port_upper_event()
4714 if (netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4719 if (netif_is_ovs_master(upper_dev) && vlan_uses_dev(dev)) { in mlxsw_sp_netdevice_port_upper_event()
4723 if (netif_is_ovs_port(dev) && is_vlan_dev(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4727 if (netif_is_bridge_master(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4728 br_vlan_get_proto(upper_dev, &proto); in mlxsw_sp_netdevice_port_upper_event()
4729 if (br_vlan_enabled(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4735 br_vlan_enabled(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4741 if (netif_is_bridge_port(lower_dev) && is_vlan_dev(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4752 if (is_vlan_dev(upper_dev) && in mlxsw_sp_netdevice_port_upper_event()
4753 ntohs(vlan_dev_vlan_proto(upper_dev)) != ETH_P_8021Q) { in mlxsw_sp_netdevice_port_upper_event()
4759 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_port_upper_event()
4760 if (netif_is_bridge_master(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4764 upper_dev, in mlxsw_sp_netdevice_port_upper_event()
4769 upper_dev); in mlxsw_sp_netdevice_port_upper_event()
4770 } else if (netif_is_lag_master(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4773 upper_dev, extack); in mlxsw_sp_netdevice_port_upper_event()
4777 upper_dev); in mlxsw_sp_netdevice_port_upper_event()
4779 } else if (netif_is_ovs_master(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4784 } else if (netif_is_macvlan(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4786 mlxsw_sp_rif_macvlan_del(mlxsw_sp, upper_dev); in mlxsw_sp_netdevice_port_upper_event()
4787 } else if (is_vlan_dev(upper_dev)) { in mlxsw_sp_netdevice_port_upper_event()
4790 if (!netif_is_bridge_port(upper_dev)) in mlxsw_sp_netdevice_port_upper_event()
4794 br_dev = netdev_master_upper_dev_get(upper_dev); in mlxsw_sp_netdevice_port_upper_event()
4795 mlxsw_sp_port_bridge_leave(mlxsw_sp_port, upper_dev, in mlxsw_sp_netdevice_port_upper_event()
4873 struct net_device *upper_dev; in mlxsw_sp_netdevice_port_vlan_event() local
4880 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_port_vlan_event()
4881 if (!netif_is_bridge_master(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4882 !netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4883 !netif_is_l3_master(upper_dev)) { in mlxsw_sp_netdevice_port_vlan_event()
4889 if (netif_is_bridge_master(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4890 !mlxsw_sp_bridge_device_is_offloaded(mlxsw_sp, upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4891 mlxsw_sp_bridge_has_vxlan(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4892 !mlxsw_sp_bridge_vxlan_is_valid(upper_dev, extack)) in mlxsw_sp_netdevice_port_vlan_event()
4894 if (netdev_has_any_upper_dev(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4895 (!netif_is_bridge_master(upper_dev) || in mlxsw_sp_netdevice_port_vlan_event()
4897 upper_dev))) { in mlxsw_sp_netdevice_port_vlan_event()
4901 if (netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_port_vlan_event()
4908 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_port_vlan_event()
4909 if (netif_is_bridge_master(upper_dev)) { in mlxsw_sp_netdevice_port_vlan_event()
4913 upper_dev, in mlxsw_sp_netdevice_port_vlan_event()
4918 upper_dev); in mlxsw_sp_netdevice_port_vlan_event()
4919 } else if (netif_is_macvlan(upper_dev)) { in mlxsw_sp_netdevice_port_vlan_event()
4921 mlxsw_sp_rif_macvlan_del(mlxsw_sp, upper_dev); in mlxsw_sp_netdevice_port_vlan_event()
4959 struct net_device *upper_dev; in mlxsw_sp_netdevice_bridge_vlan_event() local
4968 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_bridge_vlan_event()
4969 if (!netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_bridge_vlan_event()
4970 !netif_is_l3_master(upper_dev)) { in mlxsw_sp_netdevice_bridge_vlan_event()
4976 if (netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_bridge_vlan_event()
4983 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_bridge_vlan_event()
4986 if (netif_is_macvlan(upper_dev)) in mlxsw_sp_netdevice_bridge_vlan_event()
4987 mlxsw_sp_rif_macvlan_del(mlxsw_sp, upper_dev); in mlxsw_sp_netdevice_bridge_vlan_event()
5020 struct net_device *upper_dev; in mlxsw_sp_netdevice_bridge_event() local
5030 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_bridge_event()
5031 if (!is_vlan_dev(upper_dev) && in mlxsw_sp_netdevice_bridge_event()
5032 !netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_bridge_event()
5033 !netif_is_l3_master(upper_dev)) { in mlxsw_sp_netdevice_bridge_event()
5046 if (is_vlan_dev(upper_dev) && in mlxsw_sp_netdevice_bridge_event()
5047 ntohs(vlan_dev_vlan_proto(upper_dev)) != ETH_P_8021Q) { in mlxsw_sp_netdevice_bridge_event()
5051 if (netif_is_macvlan(upper_dev) && in mlxsw_sp_netdevice_bridge_event()
5058 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_bridge_event()
5061 if (is_vlan_dev(upper_dev)) in mlxsw_sp_netdevice_bridge_event()
5062 mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, upper_dev); in mlxsw_sp_netdevice_bridge_event()
5063 if (netif_is_macvlan(upper_dev)) in mlxsw_sp_netdevice_bridge_event()
5064 mlxsw_sp_rif_macvlan_del(mlxsw_sp, upper_dev); in mlxsw_sp_netdevice_bridge_event()
5077 struct net_device *upper_dev; in mlxsw_sp_netdevice_macvlan_event() local
5083 upper_dev = info->upper_dev; in mlxsw_sp_netdevice_macvlan_event()
5085 if (!netif_is_l3_master(upper_dev)) { in mlxsw_sp_netdevice_macvlan_event()
5100 struct net_device *upper_dev; in mlxsw_sp_netdevice_vxlan_event() local
5109 upper_dev = cu_info->upper_dev; in mlxsw_sp_netdevice_vxlan_event()
5110 if (!netif_is_bridge_master(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
5112 if (!mlxsw_sp_lower_get(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
5114 if (!mlxsw_sp_bridge_vxlan_is_valid(upper_dev, extack)) in mlxsw_sp_netdevice_vxlan_event()
5123 if (br_vlan_enabled(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
5125 return mlxsw_sp_bridge_vxlan_join(mlxsw_sp, upper_dev, in mlxsw_sp_netdevice_vxlan_event()
5131 if (br_vlan_enabled(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
5137 upper_dev = netdev_master_upper_dev_get(dev); in mlxsw_sp_netdevice_vxlan_event()
5138 if (!upper_dev) in mlxsw_sp_netdevice_vxlan_event()
5140 if (!netif_is_bridge_master(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
5142 if (!mlxsw_sp_lower_get(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
5144 return mlxsw_sp_bridge_vxlan_join(mlxsw_sp, upper_dev, dev, 0, in mlxsw_sp_netdevice_vxlan_event()
5147 upper_dev = netdev_master_upper_dev_get(dev); in mlxsw_sp_netdevice_vxlan_event()
5148 if (!upper_dev) in mlxsw_sp_netdevice_vxlan_event()
5150 if (!netif_is_bridge_master(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()
5152 if (!mlxsw_sp_lower_get(upper_dev)) in mlxsw_sp_netdevice_vxlan_event()