From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: stable@dpdk.org
Subject: [dpdk-stable] Fwd: [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue
Date: Tue, 18 Oct 2016 08:00:48 +0200 [thread overview]
Message-ID: <CAATJJ0LmexpdEHV6nkHU85X_g2BeRWzz7MeGVRdCmUzw7YWU+w@mail.gmail.com> (raw)
In-Reply-To: <1476769747-23289-1-git-send-email-qiudayu@chinac.com>
CC Stable
---------- Forwarded message ----------
From: Michael Qiu <qdy220091330@gmail.com>
Date: Tue, Oct 18, 2016 at 7:49 AM
Subject: [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue
To: dev@dpdk.org
Cc: jianfeng.tan@intel.com, Michael Qiu <qiudayu@chinac.com>
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(-)
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
--
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
next parent reply other threads:[~2016-10-18 6:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1476769747-23289-1-git-send-email-qiudayu@chinac.com>
2016-10-18 6:00 ` Christian Ehrhardt [this message]
[not found] ` <1476769747-23289-2-git-send-email-qiudayu@chinac.com>
2016-10-18 6:01 ` [dpdk-stable] Fwd: [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf Christian Ehrhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAATJJ0LmexpdEHV6nkHU85X_g2BeRWzz7MeGVRdCmUzw7YWU+w@mail.gmail.com \
--to=christian.ehrhardt@canonical.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).