[ofa-general] __always_inline macro usage

Jack Morgenstein jackm at dev.mellanox.co.il
Mon Oct 22 01:13:39 PDT 2007


I noticed in libmlx4 that in your commit 338a180f3ca81d12dbc5b6587433d557769ee098
(factor out setting WQE segment entries), you introduced using the __always_inline macro.

Several of the GCC compilers (I tried out gcc 4.1.1 on Red Hat Enterprise Linux 5, 
gcc 4.1.0 on SuSE SLES 10, and gcc 3.4.6 on RHEL4 update 5) do not recognize this macro
(and consequently emit a compilation error).

However, they all accepted:  __attribute__ ((always_inline))

(and, for "-O2", they all behaved nicely -- not emitting redundant "non-inline"
copies of the function).

How about changing your instances of "__always_inline" to "__attribute__ ((always_inline))"?

(I notice that you completely eliminated use of __always_inline for set_data_seg() in a
subsequent patch.  However, the following prototype remains:
	static __always_inline void set_raddr_seg(struct mlx4_wqe_raddr_seg *rseg, uint64_t remote_addr, uint32_t rkey)
)

- Jack



More information about the general mailing list