Re: [PATCH rdma-next v2 01/18] RDMA/core: Introduce ib_device_ops

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

 



On Mon, Oct 22, 2018 at 08:10:24AM +0000, Parav Pandit wrote:

> > As I said before, I'm fine with having logical groups of ops, but I think that
> > this work needs to be done incrementally, first need to take in this huge
> > patchset and later incrementally work on split the ib_device_ops into
> > different logical groups.
> > 
> That approach requires touching all the same files and exact same lines again in ULPs, core and providers to change from ops to gids_ops or resource_ops or vf_ops.
> Instead pick one functionality and have ops structure for it.
> For example,
> 
> struct rdma_gid_ops {
> 	int (*add_gid)(...);
> 	int (*query_gid)(...);
> };
> 
> struct ib_device {
> 	<...existing giant list of fn_ pointers>
> 	struct rdma_gid_ops gid_ops;
> };
> 
> provider.c
> device.gid_ops = &mlx5_gid_ops;

I wouldn't make more structs, that is just going to be really messy.

I'd just sort the single struct we have for cache-line locality.

But it is unclear how to even figure out what the optimal sort order
should be, and we don't sort today..

Jason



[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