On Mon, Jul 10, 2017 at 10:04 AM, David Miller <da...@davemloft.net> wrote: > I disagree. Assuming one can go from the driver private to the netdev > object trivially is a worse assumption than the other way around, and > locks us into the current implementation of how the netdev and driver > private memory is allocated. > > If you want to style your driver such that the private is passed > around instead of the netdev, put a pointer back to the netdev object > in your private data structure.
I'm surprised you're okay with the memory waste of that, but you bring up the ability to change the interface later, which is a great point. I'll submit a patch for that random driver, and I'll also refactor WireGuard to do the same. Thanks for the guidance. Jason