[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170314161013.GF3244@obsidianresearch.com>
Date: Tue, 14 Mar 2017 10:10:13 -0600
From: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To: Erez Shitrit <erezsh@....mellanox.co.il>
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 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
Powered by blists - more mailing lists