[ldv-project] [PATCH 07/21] netfilter: nf_nat: remove inline marking of EXPORT_SYMBOL functions

David Laight David.Laight at ACULAB.COM
Thu May 9 13:47:33 MSK 2013


> EXPORT_SYMBOL and inline directives are contradictory to each other.
> The patch fixes this inconsistency.
...
> -inline const struct nf_nat_l4proto *
> +const struct nf_nat_l4proto *
>  __nf_nat_l4proto_find(u8 family, u8 protonum)
>  {
>  	return rcu_dereference(nf_nat_l4protos[family][protonum]);

If it makes sense to inline the local calls (ie the cost
of the call is significant) then possibly add an inlined
(or inlinable) static function that is called locally and
by the exported one?

I'm not sure that gcc is allowed to make the assumption
that the local exported function will be called - and
thus inline it.

	David






More information about the ldv-project mailing list