From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: stable@dpdk.org
Subject: [dpdk-stable] Fwd: [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf
Date: Tue, 18 Oct 2016 08:01:00 +0200 [thread overview]
Message-ID: <CAATJJ0KzcNoRgB92WyougaVtN-ndZ+W_=kEMe3KjiH12i9nneA@mail.gmail.com> (raw)
In-Reply-To: <1476769747-23289-2-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 2/2] examples/tep_term: Fix packet len for
multi-seg mbuf
To: dev@dpdk.org
Cc: jianfeng.tan@intel.com, Michael Qiu <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
--
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
prev 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 ` [dpdk-stable] Fwd: [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue Christian Ehrhardt
[not found] ` <1476769747-23289-2-git-send-email-qiudayu@chinac.com>
2016-10-18 6:01 ` Christian Ehrhardt [this message]
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='CAATJJ0KzcNoRgB92WyougaVtN-ndZ+W_=kEMe3KjiH12i9nneA@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).