[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1303879677.2699.45.camel@edumazet-laptop>
Date: Wed, 27 Apr 2011 06:47:57 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH 2/4] ipv4: Sanitize and simplify
ip_route_{connect,newports}()
Le mardi 26 avril 2011 à 15:12 -0700, David Miller a écrit :
> These functions are used together as a unit for route resolution
> during connect(). They address the chicken-and-egg problem that
> exists when ports need to be allocated during connect() processing,
> yet such port allocations require addressing information from the
> routing code.
>
> It's currently more heavy handed than it needs to be, and in
> particular we allocate and initialize a flow object twice.
>
> Let the callers provide the on-stack flow object. That way we only
> need to initialize it once in the ip_route_connect() call.
>
> Later, if ip_route_newports() needs to do anything, it re-uses that
> flow object as-is except for the ports which it updates before the
> route re-lookup.
>
> Also, describe why this set of facilities are needed and how it works
> in a big comment.
>
> Signed-off-by: David S. Miller <davem@...emloft.net>
Reviewed-by: Eric Dumazet <eric.dumazet@...il.com>
--
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