[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160705120522.GA1984@nanopsycho.orion>
Date: Tue, 5 Jul 2016 14:05:22 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Yuval Mintz <Yuval.Mintz@...gic.com>
Cc: netdev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
"idosch@...lanox.com" <idosch@...lanox.com>,
"yotamg@...lanox.com" <yotamg@...lanox.com>,
"eladr@...lanox.com" <eladr@...lanox.com>,
"nogahf@...lanox.com" <nogahf@...lanox.com>,
"ogerlitz@...lanox.com" <ogerlitz@...lanox.com>,
"sfeldma@...il.com" <sfeldma@...il.com>,
"roopa@...ulusnetworks.com" <roopa@...ulusnetworks.com>,
"andy@...yhouse.net" <andy@...yhouse.net>,
"dsa@...ulusnetworks.com" <dsa@...ulusnetworks.com>,
"tgraf@...g.ch" <tgraf@...g.ch>,
"jhs@...atatu.com" <jhs@...atatu.com>,
"linville@...driver.com" <linville@...driver.com>,
"ivecera@...hat.com" <ivecera@...hat.com>
Subject: Re: [patch net-next 01/16] net: add dev arg to
ndo_neigh_construct/destroy
Tue, Jul 05, 2016 at 01:03:36PM CEST, Yuval.Mintz@...gic.com wrote:
>> As the following patch will allow upper devices to follow the call down lower
>> devices, we need to add dev here and not rely on n->dev.
>
>How does all of this relates to neigh_alloc()? Is it being called only for the
>lower devices?
This is called for all neighs.
>I'm asking as it appears that __neigh_create() would allocates memory
>based on some dev's neigh_priv_len, then propagate it via
>ndo_neigh_construct() [which you change in patch 2] - looks like the current
>implementers of this function assume the private entry is always theirs. E.g.,
neigh_priv_len does not take stacked devices into account.
>
>> -static int clip_constructor(struct neighbour *neigh)
>> +static int clip_constructor(struct net_device *dev, struct neighbour
>> +*neigh)
>> {
>> struct atmarp_entry *entry = neighbour_priv(neigh);
>>
>
>[Writing with absolute zero knowledge of this; perhaps this is all bollocks]
Better to study the code first before you comment, next time.
Powered by blists - more mailing lists