[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDqMeq6b+e7H1aSquR77bKm8EXu59AzU9OPw=8aHNf1e5-MFA@mail.gmail.com>
Date: Tue, 19 Sep 2017 17:11:54 -0700
From: Tom Herbert <tom@...ntonium.net>
To: David Miller <davem@...emloft.net>
Cc: Harald Welte <laforge@...monks.org>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Pablo Neira Ayuso <pablo@...filter.org>,
Rohit LastName <rohit@...ntonium.net>
Subject: Re: [PATCH net-next 07/14] gtp: Support encapsulation of IPv6 packets
On Tue, Sep 19, 2017 at 10:42 AM, David Miller <davem@...emloft.net> wrote:
> 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.
It was a carry over since ipv4_hashfn was already defined in the file.
I will prefix both functions.
Powered by blists - more mailing lists