Thread (63 messages) flat view 63 messages, 7 authors, 2017-09-24

Re: [PATCH net-next 07/14] gtp: Support encapsulation of IPv6 packets

From: Tom Herbert <hidden>
Date: 2017-09-20 00:11:55

On Tue, Sep 19, 2017 at 10:42 AM, David Miller [off-list ref] wrote:
From: Harald Welte <laforge@gnumonks.org>
Date: Tue, 19 Sep 2017 20:12:45 +0800
quoted
Hi Dave,

On Mon, Sep 18, 2017 at 09:19:08PM -0700, David Miller wrote:
quoted
quoted
+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help