Re: [PATCH] net: avoid a pair of dst_hold()/dst_release() in ip_append_data()
From: Andi Kleen <hidden>
Date: 2008-11-25 02:12:19
From: Andi Kleen <hidden>
Date: 2008-11-25 02:12:19
Thinking more I believe we can do similar tricks for all TCP transmit traffic.
Sounds reasonable.
Packets bound to sockets never outlive those sockets (and thus their cached routes) unless we skb_orphan(). The only not covered case is where the socket cached route is reset or changed. We could defer the dst put until the transmit queue reaches a certain point, kind of like a retransmit queue RCU :-) Just some ideas...
netfilter makes it somewhat tricky, for compatibility you would need to reclone the route on the fly. -Andi -- ak@linux.intel.com