Subject: Re: [PATCH net-next v1 1/2] tipc: move netlink policies to netlink.h

From: Richard Alpe <[email-masked]>
Date: Thu, 7 Jan 2016 11:20:08 +0100

On 2016-01-05 22:47, David Miller wrote:
> From: Richard Alpe <[email-masked]>
> Date: Tue, 5 Jan 2016 10:56:16 +0100
> 
>> Make the c files less cluttered and enable netlink attributes to be
>> shared between files. This will prove useful in a future patch where a
>> node message will contain a nested network.
>>
>> Signed-off-by: Richard Alpe <[email-masked]>
>> Acked-by: Jon Maloy <[email-masked]>
> 
> netlink.h is included by more than one file, which means the tables
> (might) be instantiated multiple times.
I thought about that, but I assumed unreferenced tables would be
optimized away by the compiler (?)
> 
> I'd really recommend not putting such tables in a header file that
> is used in this way.
Alright, I will drop the patch.

Do you have any suggestion on how to handle the case where a policy
(table) is shared between c files, like the net policy in the
subsequent patch? I could perhaps use extern in the c files (which
seems frown upon) or duplicate the policy? :-S

Thanks for the review
Richard
> Thanks.