[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHmME9rMQdukz-Nw_9uDqLYg5od5QFHK8K_boC0gRkvxz0jjqw@mail.gmail.com>
Date: Mon, 10 Jul 2017 13:52:45 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: David Miller <davem@...emloft.net>
Cc: Netdev <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] netdevice: add netdev_pub helper function
On Mon, Jul 10, 2017 at 10:04 AM, David Miller <davem@...emloft.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
Powered by blists - more mailing lists