[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1401161036110.29778@nuc>
Date: Thu, 16 Jan 2014 10:37:37 -0600 (CST)
From: Christoph Lameter <cl@...ux.com>
To: Daniel Borkmann <dborkman@...hat.com>
cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Austin S Hemmelgarn <ahferroin7@...il.com>,
Jesse Gross <jesse@...ira.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Stephen Hemminger <stephen@...workplumber.org>,
Matt Mackall <mpm@...enic.com>,
Pekka Enberg <penberg@...nel.org>,
Andy Gospodarek <andy@...yhouse.net>,
Veaceslav Falico <vfalico@...hat.com>,
Jay Vosburgh <fubar@...ibm.com>,
Jakub Zawadzki <darkjames-ws@...kjames.pl>
Subject: Re: [PATCH net-next 2/2] reciprocal_divide: correction/update of
the algorithm
On Thu, 16 Jan 2014, Daniel Borkmann wrote:
> - * or else the performance is slower than a normal divide.
> - */
> -extern u32 reciprocal_value(u32 B);
> +struct reciprocal_value {
> + u32 m;
> + u8 sh1, sh2;
> +};
>
> +#define RECIPROCAL_VALUE_RESULT_TO_ZERO ((struct reciprocal_value){.sh1 = 32})
>
> -static inline u32 reciprocal_divide(u32 A, u32 R)
> +struct reciprocal_value reciprocal_value(u32 d);
A function that returns a struct? That works? Which gcc versions support
it?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists