On Tue, Mar 14, 2017 at 04:53:24PM +0200, Erez Shitrit wrote: > > Why isn't this stuff in open/close? > > According to ipoib control flows, there is a different between > open/close to init/cleanup for example, in open/close the driver > doesn't destroy hw resources, just change the state, it destroys > them in cleanup. So put it in mlx5_alloc_rdma_netdev then? Or ndo.init as was suggested? Or in the void (*setup)(struct net_device *) > >> + param.size_base_priv = sizeof(struct ipoib_rdma_netdev); > > > > This is really weird, the code in mlx5i_create_netdev calls > > ipoib_dev_priv so it must assume the struct is a ipoib_rdma_netdev. > > It is the same attitude as in the vnic/hfi > (https://patchwork.kernel.org/patch/9587815/) Not quite, they call alloc_netdev_mqs directly, here indirects through mlx5i_create_netdev which assumes a priv layout, Just drop param.size_base_priv and put that same calculation in mlx5i_create_netdev.. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html