On Tue, Apr 04, 2017 at 10:17:32PM +0300, Leon Romanovsky wrote: > +static struct net_device *ipoib_create_netdev_default(struct ib_device *hca, > + const char *name, > + unsigned char name_assign_type, > + void (*setup)(struct net_device *)) > { > struct net_device *dev; > + struct rdma_netdev *rn; > > - dev = alloc_netdev((int)sizeof(struct ipoib_dev_priv), name, > - NET_NAME_UNKNOWN, ipoib_setup); > + dev = alloc_netdev((int)sizeof(struct rdma_netdev), > + name, > + name_assign_type, setup); > if (!dev) > return NULL; > > - return netdev_priv(dev); > + rn = netdev_priv(dev); > + > + rn->send = ipoib_send; > + rn->attach_mcast = ipoib_mcast_attach; > + rn->detach_mcast = ipoib_mcast_detach; This should really set rn->hca as well, don't forget the kref 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