[dpdk-dev,1/2] examples/tep_term: Fix l4_len issue
Commit Message
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 <qiudayu@chinac.com>
---
examples/tep_termination/vxlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: Michael Qiu [mailto:qdy220091330@gmail.com]
> Sent: Tuesday, October 18, 2016 1:49 PM
> To: dev@dpdk.org
> Cc: Tan, Jianfeng; Michael Qiu
> Subject: [PATCH 1/2] examples/tep_term: Fix l4_len issue
>
> 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 <qiudayu@chinac.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Thanks,
Jianfeng
@@ -147,7 +147,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;
}
} else if (l4_proto == IPPROTO_SCTP) {