From: Michael Qiu Date: Tue, 18 Oct 2016 05:49:06 +0000 (+0800) Subject: examples/tep_term: fix L4 length X-Git-Tag: spdx-start~5505 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=39f84786a23897596c42124c4416fc443bc9b688;p=dpdk.git examples/tep_term: fix L4 length l4_len is not fixed, althrough mostly it is a fixed value, but when guest using iperf to do some tests, the l4_len will have another 12 bytes optional fields. Fixes: 2bb43bd4350a ("examples/tep_term: add TSO offload configuration") Signed-off-by: Michael Qiu Acked-by: Jianfeng Tan --- diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c index 155415c873..109e93aa83 100644 --- a/examples/tep_termination/vxlan.c +++ b/examples/tep_termination/vxlan.c @@ -148,7 +148,7 @@ process_inner_cksums(struct ether_hdr *eth_hdr, union tunnel_offload_info *info) if (tso_segsz != 0) { ol_flags |= PKT_TX_TCP_SEG; info->tso_segsz = tso_segsz; - info->l4_len = sizeof(struct tcp_hdr); + info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2; } ol_flags |= PKT_TX_TCP_CKSUM; tcp_hdr->cksum = get_psd_sum(l3_hdr, ethertype, ol_flags);