csum: Inline csum_add16(), csum_add32().
authorBen Pfaff <blp@ovn.org>
Tue, 1 Dec 2015 04:00:14 +0000 (20:00 -0800)
committerBen Pfaff <blp@ovn.org>
Tue, 1 Dec 2015 18:14:10 +0000 (10:14 -0800)
commitd6c1bc0dcb70dc7c467d2f1fe2b2cbd3c3c8a69d
treeb2ca9f9e83fec726bd541e9fded2f38d19ca662e
parent8b2ffff0c02a3384be49ab3d449c159402063201
csum: Inline csum_add16(), csum_add32().

These two functions are really simple, to the point that inlining them
yields less code than calling them: with GCC 4.9 on i386, this change
reduces the code generated for packet_csum_pseudoheader() from 112 bytes
to 100 bytes.

I didn't measure whether there is a performance improvement.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
lib/csum.c
lib/csum.h