On Mon, 4 Apr 2011, Alexander Bluhm wrote: > On Mon, Apr 04, 2011 at 08:06:57PM +0200, Pascal Stumpf wrote: > > net/pf.c: pf_addr_compare (was probably ok before r1.729) > > The current implementation has been discussed. See also: > http://www.greenend.org.uk/rjk/2003/03/inline.html > > The function should be inline within pf.c and callable from pf_norm.c. > Defining it inline in pf.c allows faster code there, declaring it > non-inline in pfvar.h creates callable code in pf.o. gcc always > generates callable code, so it does not matter here. > > Do pcc and clang compile and link if you put an inline in the pfvar.h > declaration?
clang trunk v128001 has no problem if I __inline in pfvar.h. FYI, I am running on a kernel built using that clang revision. > > > Do those *have* to be inline? > > Yes, pf_addr_compare() is used in pf state lookup. So it must be > fast. The generated RB functions use it inline. > > bluhm