examples/tep_term: fix inner L4 checksum
authorJianfeng Tan <jianfeng.tan@intel.com>
Thu, 4 Aug 2016 07:58:49 +0000 (07:58 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 13 Oct 2016 12:37:48 +0000 (14:37 +0200)
commitd3ab8f9737099267cd5de0c6b97d36ac5844a8b2
tree1294d5da374659e2751558be40f6285b0e3e91c3
parent67b9708f569abf2001de0558cd3fa3c236c45fb2
examples/tep_term: fix inner L4 checksum

When sending packets from virtual machine which in need of TSO
by hardware NIC, the inner L4 checksum is not correct on the
other side of the cable.

It's because get_psd_sum() depends on PKT_TX_TCP_SEG to calculate
pseudo-header checksum, but currently this bit is set after the
function get_psd_sum() is called. The fix is straightforward.
Move the bit setting before get_psd_sum() is called.

Fixes: a50245ede72a ("examples/tep_term: initialize VXLAN sample")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
examples/tep_termination/vxlan.c