From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Qiu Subject: [PATCH 1/2] examples/tep_term: Fix l4_len issue Date: Tue, 18 Oct 2016 13:49:06 +0800 Message-ID: <1476769747-23289-1-git-send-email-qiudayu@chinac.com> Cc: jianfeng.tan@intel.com, Michael Qiu To: dev@dpdk.org Return-path: Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by dpdk.org (Postfix) with ESMTP id 8D59D2C29 for ; Tue, 18 Oct 2016 07:50:33 +0200 (CEST) Received: by mail-pf0-f195.google.com with SMTP id r16so14205682pfg.3 for ; Mon, 17 Oct 2016 22:50:33 -0700 (PDT) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- examples/tep_termination/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c index 5ee1f95..b57f867 100644 --- a/examples/tep_termination/vxlan.c +++ b/examples/tep_termination/vxlan.c @@ -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) { -- 1.8.3.1