[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAk-MO-b+xQOfFtWApJWwQ6vkkpC8Bo=JiPqO29AsQGAhX0UDw@mail.gmail.com>
Date: Tue, 14 Mar 2017 18:37:16 +0200
From: Erez Shitrit <erezsh@....mellanox.co.il>
To: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc: Erez Shitrit <erezsh@...lanox.com>,
Doug Ledford <dledford@...hat.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
netdev@...r.kernel.org, valex@...lanox.com,
Leon Romanovsky <leonro@...lanox.com>, saedm@...lanox.com
Subject: Re: [RFC v1 for accelerated IPoIB 25/25] mlx5_ib: skeleton for
mlx5_ib to support ipoib_ops
On Tue, Mar 14, 2017 at 6:10 PM, Jason Gunthorpe
<jgunthorpe@...idianresearch.com> wrote:
> 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?
I can do that, as i said to your previous suggestion, will add the
ib_device to the rdma_netdev and will use the ndo.init
>
> 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..
We are sharing 2 drivers as the low level driver, anyway i will find
the way to do that.
>
> Jason
>
Powered by blists - more mailing lists