[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOaVG148gUzcb2qmg0B7kdWNzNzerMdXZzv2qamXq8ToUFsUyw@mail.gmail.com>
Date: Wed, 13 Mar 2013 21:36:52 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Eric Dumazet <eric.dumazet@...il.com>, netdev@...r.kernel.org,
yoshfuji@...ux-ipv6.org, brouer@...hat.com
Subject: Re: [PATCH RFC] ipv6: use stronger hash for reassembly queue hash table
> +#define INET_FRAG_FIND_CHECK(val) \
> + ({ \
> + static const char ___mem[] = \
> + KERN_ERR pr_fmt( \
> + "inet_frag_find: No memory left." \
> + " Dropping fragment.\n"); \
> + static const char ___limit[] = \
> + KERN_WARNING pr_fmt( \
> + "inet_frag_find: Fragment hash bucket" \
> + " list length grew above limit " \
> + __stringify(INETFRAGS_MAXDEPTH) \
> + ". Dropping fragment.\n"); \
> + bool ___b = true; \
> + if (IS_ERR_OR_NULL(val)) { \
> + ___b = false; \
> + if (PTR_ERR(val) == -ENOBUFS) \
> + LIMIT_NETDEBUG(___limit); \
> + else \
> + LIMIT_NETDEBUG(___mem); \
> + } \
> + ___b; \
> + })
> +
Big macros suck, write it as an inline function or better yet a real function.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists