Re: [net-next PATCH 10/16] Don't lookup the socket if there's a socket attached to the skb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 2008-10-01 at 07:50 -0700, David Miller wrote:
> From: KOVACS Krisztian <hidden@xxxxxxxxxx>
> Date: Wed, 01 Oct 2008 16:24:31 +0200
> 
> > Use the socket cached in the TPROXY target if it's present.
> > 
> > Signed-off-by: KOVACS Krisztian <hidden@xxxxxxxxxx>
> 
> Ok, this starts to get into controversial territory.
> :-)
> 
> At the very least I think:
> 
> 1) We should do this unconditionally, and even put
>    a "unlikely" there in the test.
> 
> 2) Actually, the whole operation belongs in a generic
>    net/sock.h helper function, and this includes the
>    leading if() test.

The problem is that if you include the if() test then you have to
include the lookup call as well and that's different for TCP/UDP.

Of course we could create a generic helper that then calls the
appropriate lookup function but that's also an unnecessary extra branch,
isn't it?

-- 
KOVACS Krisztian

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux