[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170919.104248.1540128186724107742.davem@davemloft.net>
Date: Tue, 19 Sep 2017 10:42:48 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: laforge@...monks.org
Cc: tom@...ntonium.net, netdev@...r.kernel.org, pablo@...filter.org,
rohit@...ntonium.net
Subject: Re: [PATCH net-next 07/14] gtp: Support encapsulation of IPv6
packets
From: Harald Welte <laforge@...monks.org>
Date: Tue, 19 Sep 2017 20:12:45 +0800
> Hi Dave,
>
> On Mon, Sep 18, 2017 at 09:19:08PM -0700, David Miller wrote:
>
>> > +static inline u32 ipv6_hashfn(const struct in6_addr *a)
>> > +{
>> > + return __ipv6_addr_jhash(a, gtp_h_initval);
>> > +}
>>
>> I know you are just following the pattern of the existing "ipv4_hashfn()" here
>> but this kind of stuff is not very global namespace friendly. Even simply
>> adding a "gtp_" prefix to these hash functions would be a lot better.
>
> I would agree if this was an inline function defined in a header file or
> a non-static function. But where is the global namespace concern in
> case of static inline functions defined and used in the same .c file?
The problem is if we create a generic ipv6_hashfn() in linux/ipv6.h or
something like that, then this driver stops building.
Powered by blists - more mailing lists