DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Qiu <qdy220091330@gmail.com>
To: dev@dpdk.org
Cc: jianfeng.tan@intel.com, Michael Qiu <qiudayu@chinac.com>
Subject: [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf
Date: Tue, 18 Oct 2016 13:49:07 +0800	[thread overview]
Message-ID: <1476769747-23289-2-git-send-email-qiudayu@chinac.com> (raw)
In-Reply-To: <1476769747-23289-1-git-send-email-qiudayu@chinac.com>

For multi-seg mbuf, ip->total_length should be pkt_len subtract
ether len.

Fixes: 4abe471ed6fc("examples/tep_term: implement VXLAN processing")

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 b57f867..9142c8d 100644
--- a/examples/tep_termination/vxlan.c
+++ b/examples/tep_termination/vxlan.c
@@ -218,7 +218,7 @@ encapsulation(struct rte_mbuf *m, uint8_t queue_id)
 	/* copy in IP header */
 	ip = rte_memcpy(ip, &app_ip_hdr[vport_id],
 		sizeof(struct ipv4_hdr));
-	ip->total_length = rte_cpu_to_be_16(m->data_len
+	ip->total_length = rte_cpu_to_be_16(m->pkt_len
 				- sizeof(struct ether_hdr));
 
 	/* outer IP checksum */
-- 
1.8.3.1

  reply	other threads:[~2016-10-18  5:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18  5:49 [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue Michael Qiu
2016-10-18  5:49 ` Michael Qiu [this message]
2016-10-24  5:41   ` [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf Tan, Jianfeng
2016-10-25 15:53     ` Thomas Monjalon
2016-10-24  5:41 ` [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue Tan, Jianfeng

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=1476769747-23289-2-git-send-email-qiudayu@chinac.com \
    --to=qdy220091330@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=qiudayu@chinac.com \
    /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).