All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Alpe <richard.alpe@ericsson.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <tipc-discussion@lists.sourceforge.net>
Subject: Re: [PATCH net-next v1 1/2] tipc: move netlink policies to netlink.h
Date: Thu, 7 Jan 2016 11:20:08 +0100	[thread overview]
Message-ID: <568E3BD8.8040209@ericsson.com> (raw)
In-Reply-To: <20160105.164749.1356932343853770417.davem@davemloft.net>

On 2016-01-05 22:47, David Miller wrote:
> From: Richard Alpe <richard.alpe@ericsson.com>
> 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 <richard.alpe@ericsson.com>
>> Acked-by: Jon Maloy <jon.maloy@ericsson.com>
> 
> 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.
> 

  reply	other threads:[~2016-01-07 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05  9:56 [PATCH net-next v1 1/2] tipc: move netlink policies to netlink.h Richard Alpe
2016-01-05  9:56 ` [PATCH net-next v1 2/2] tipc: add peer removal functionality Richard Alpe
2016-01-05 21:47 ` [PATCH net-next v1 1/2] tipc: move netlink policies to netlink.h David Miller
2016-01-07 10:20   ` Richard Alpe [this message]
2016-01-10  2:03     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=568E3BD8.8040209@ericsson.com \
    --to=richard.alpe@ericsson.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=tipc-discussion@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.