misc: refactor calc_checksums 81/26481/5
authorDave Barach <dave@barachs.net>
Sun, 12 Apr 2020 12:31:39 +0000 (08:31 -0400)
committerDave Barach <openvpp@barachs.net>
Wed, 15 Apr 2020 11:00:26 +0000 (11:00 +0000)
commit1bd2c019eba5c893d634cc496bd6d54c00020d7e
tree99595a7f0818e07034a0a9a7b158d4157a98b3ed
parent69eeadc03f30c9fb3fe1bb7e2eeb6b04d1bcc596
misc: refactor calc_checksums

Merge two mildly incompatible static inlines, and rename the results
vnet_calc_checksums_inline (...).

The resulting inline has three additional parameters: int is_ip4, int
is_ip6, and int with_gso. All calls manage to pass one or more as
compile-time constants, which causes a certain amount of code to
disappear in each instantiation.

Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I1a2a0e353b9a7bca20bc81318e8c915617261e1a
src/vnet/CMakeLists.txt
src/vnet/interface_output.c
src/vnet/interface_output.h
src/vnet/ip/ip4_forward.c
src/vnet/ip/ip6_forward.c