new ip_rcv()

wu_yb (wu_yb@263.net)
Tue, 23 Nov 1999 17:04:38 +0800


In kernel 2.0.x,
ip_rcv()
{
...
if ( iph->daddr == skb->dev->pa_addr || ... )
{
/* this packet is for me, process it */
}
}

but in 2.2.x
ip_rcv()
{
if ( skb->dst == NULL )
if ( ip_route_input( ... ) )
...
return skb->dst->input(skb) ;
}

The new 2.2.x ip_rcv() call ip_route_input() to check the route to dst,
then call the dst->input().
If a packet is dested for this box, the 2.2.x's ip_route_input()
must compare src, dst, iif, oif, tos, but in 2.0.x, only iph->daddr ==
dev->pa_addr
is checked, so I think the older one is faster !!
If anyone can help me

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/