Herbert Xu wrote: > On Tue, Nov 22, 2005 at 09:31:39PM +1100, herbert wrote: > >>Unfortunately it looks like gcc 3.3.5 at least is too dumb to optimise >>it away. I think we'll need a better strategy. > > > OK, the idea is still the same: Move the loop from dst_output into > xfrm4_output/xfrm6_output since they're the only ones who need to it. > > In order to avoid the tail call issue, I've added the inline function > nf_hook which is nf_hook_slow plus the empty list check. Thanks, this looks great. I've changed it to only call the hooks before tunnel mode transforms and added a missing dst_output call for the final packet.