On Thu, Dec 10, 2015 at 11:56:50PM -0500, Doug Ledford wrote: > Looking at struct netdevice, it has the sort of organization I would > call reasonable. Things like struct tx_stats is a struct, even though > it's embedded in the parent struct and not a pointer and there is > exactly and only one copy, so it could be flat. struct net_device_stats exists because it is used in many more places that just in struct net_device, so this is a code sharing thing. > something I would call well organized. And speaking of that, in struct > netdevice, all of the various ops elements are handled as structs, .. and 'struct net_device_ops' is used extensively. Whereas once we get rid of the query call ib_device_attr has no second user. > including the base netdevice ops, whereas struct ib_device puts the base > ops flat in the struct. So if we wanted to be more like struct > netdevice, we would move the base ops out of struct ib_device. It would make the drivers a bit nicer if they initialized an ib_ops structure like netdev does instead of in code, but performance wise this is probably better, especially if we sorted the struct members sanely.. > out like this. An ib_device can be multi-port, and each port can be a > different RDMA device type. I thought we figured out that wasn't actually allowed today when working on the caps rework? 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