netdev
[Top] [All Lists]

Re: [XFRM] Make XFRM core subsystem af-independent

To: "YOSHIFUJI Hideaki / ?$B5HF#1QL@" <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: [XFRM] Make XFRM core subsystem af-independent
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 18 Sep 2004 10:10:44 +1000
Cc: davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20040918.085003.77842779.yoshfuji@xxxxxxxxxxxxxx>
References: <E1C8I2m-0005BS-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20040917.231127.114842301.yoshfuji@xxxxxxxxxxxxxx> <20040917153536.6acec52e.davem@xxxxxxxxxxxxx> <20040918.085003.77842779.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040722i
On Sat, Sep 18, 2004 at 08:50:03AM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
>
>  3. inlined __ip_route_output_flow() + ip_route_output_flow(), 
> ip_route_output_key
>     - maintenancability will be improved
>     - breaks binary-only modules.
>     - code size.
>  4. migrate completely (my one)
>     - maintenancability will be improved
>     - breaks binary-only modules.
>     - best stack usage, minimum function call, code size.
>     - changes more places.

You missed the more obvious version of 3:

5. inline ip_route_output_key() only

That is exactly the same as 4 except that it doesn't cause ripple
effects all over the place.

However, I really don't think 16 bytes of stack usage is anything
to write home about :)

Actually, there is a solution to that as well:

6. Add an inline version of __ip_route_output_flow() in route.c and
get ip_route_output_flow/ip_route_output_key to use that.

It'll generate code slightly bigger than 2 but is vastly smaller than 4.
Otherwise it has all the advantages of 2 and 4.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>