Re: [PATCH rdma-next 6/6] IB/IPoIB: Support acceleration options callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 4, 2017 at 10:46 PM, Jason Gunthorpe
<jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote:
> 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

ok, will add.
thanks.

>
> 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
--
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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux