Thread (7 messages) flat view 7 messages, 2 authors, 2017-07-10

Re: [PATCH 1/2] netdevice: add netdev_pub helper function

From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: 2017-07-10 11:52:50
Also in: lkml

On Mon, Jul 10, 2017 at 10:04 AM, David Miller [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help