[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6D8AF27@saturn3.aculab.com>
Date: Tue, 3 Jan 2012 09:36:33 -0000
From: "David Laight" <David.Laight@...LAB.COM>
To: "Ian Campbell" <Ian.Campbell@...rix.com>,
"David Miller" <davem@...emloft.net>
Cc: <eric.dumazet@...il.com>, <jesse.brandeburg@...el.com>,
<netdev@...r.kernel.org>
Subject: RE: [PATCH 0/4] skb paged fragment destructors
> -#if (65536/PAGE_SIZE + 2) < 16
> +#if (65536/PAGE_SIZE + 1) < 16
> #define MAX_SKB_FRAGS 16UL
> #else
> -#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2)
> +#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 1)
> #endif
Wouldn't it be better to only have the expression once?
Either using a MAX() define or maybe:
#define MAX_SKB_FRAGS (65536UL/PAGE_SIZE + 1)
#if MAX_SKB_FRAGS < 16UL
#undef MAX_SKB_FRAGS
#define MAX_SKB_FRAGS 16UL
#endif
Although that replicates the 16 instead :-(
David
--
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