On Tue, 28 Jul 2020 08:35:53 +0000 Saeed Mahameed wrote: > On Fri, 2020-07-24 at 19:51 -0700, Jakub Kicinski wrote: > > Allocate nic_info dynamically - n_entries is not constant. > > > > Drop the ndo callbacks from the reprs, those should be local to > > the same netns as the main netdev, no need to get the same callbacks > > multiple times. > > Isn't this a problem ? so it seems this is the root cause of the > regression failure we saw with this patch. > > in a switchdev mode the "main" netdev is unregistered
Oh! I didn't realize you unregister the "main" one! > and we register > another netdev with ndos: "mlx5e_netdev_ops_uplink_rep" as the new main > netdev (the uplink representor) where you removed the vxlan ndos, > see below.. > > > .ndo_has_offload_stats = mlx5e_rep_has_offload_stats, > > .ndo_get_offload_stats = mlx5e_rep_get_offload_stats, > > .ndo_change_mtu = mlx5e_uplink_rep_change_mtu, > > - .ndo_udp_tunnel_add = mlx5e_add_vxlan_port, > > - .ndo_udp_tunnel_del = mlx5e_del_vxlan_port, > > Here, this is uplink representor (i.e main netdev). > we need the udp_tunnel_ndos. > > also we need to add: > mlx5_vxlan_set_netdev_info(mdev->vxlan, netdev); > > in mlx5e_build_rep_netdev() under > if (rep->vport == MLX5_VPORT_UPLINK) statement. Makes sense, thanks for the review!