From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=o8ErF28Ldhy2oddbuhMxocNFkHu7w/OrV7YWUVG+VRU=; b=Jdv8qXjYr5WpTk81MyTq3jsmovCYm/IVbXsgOGeUU2zjfflnzCIHpcJv8bFkZDNdKC V3F2GioaLgdQ7VnbvtOIichFBVYJGpAUPqoEzZZ3Ds4zyzr+q434zvfRkVqbL/0/2fmc scH9er6gwxfR1cb53H5EiOjIiVrcBIUkfJ3TocmcRxsPnqy+yX+splTBqpwMuPvdarYP acpfnBOvYhf9FpvCGPmdNMHTMXF13AYdwOw8NLyFn/78RzGkxibIahutwGc9T/sscABc cEqnkyzVnuCtdW76ICWWD1qRJCCNXuVczlSlGRSrp+zTKQKwNZnddvHcgXK0JphZhlTo F9AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=o8ErF28Ldhy2oddbuhMxocNFkHu7w/OrV7YWUVG+VRU=; b=FBobkYDURp4Up3WNFpBO38jY7croRSGfU2RfKeesmOQi4wFi+RzyXw6g2SYPKxv0EN EiWSIvdX3Xvnc7/ky3Hr0Iv+3wBQOQcrbkpgINSjlPJyb55OWP1BxsGCsAziknRkaC6H +YDRY4nVx2nBASJwHAp45DKtCz+dM1w/ozaV7YFOWnpx7fGNVcw6hmhXp1AjFz8R906b gumxb9OCIFXSt315r3gY9O8TUrINavZYdgARjn0vm9hDsbnjGG1riyunqZmRKeDggeKR XgrU8In+fp//ajwkbL5Sqm4JcRMqiR+PhGvUau6/mMRA9fSjVsuyut9YWzDcJYIVSiDl WRbQ== X-Gm-Message-State: AA6/9RmSbUeNzUWXzie2QOHEqsNjPLfnTIct5TjpD3Ak8dns6i8MLnQPiOyh8vdabEK/yg== X-Received: by 10.98.201.28 with SMTP id k28mr1787254pfg.25.1476769832798; Mon, 17 Oct 2016 22:50:32 -0700 (PDT) Received: from localhost.localdomain ([67.229.141.124]) by smtp.gmail.com with ESMTPSA id ym3sm15241201pac.42.2016.10.17.22.50.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Oct 2016 22:50:32 -0700 (PDT) From: Michael Qiu X-Google-Original-From: Michael Qiu To: dev@dpdk.org Cc: jianfeng.tan@intel.com, Michael Qiu Date: Tue, 18 Oct 2016 13:49:06 +0800 Message-Id: <1476769747-23289-1-git-send-email-qiudayu@chinac.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2016 05:50:34 -0000 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