DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue
@ 2016-10-18  5:49 Michael Qiu
  2016-10-18  5:49 ` [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf Michael Qiu
  2016-10-24  5:41 ` [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue Tan, Jianfeng
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Qiu @ 2016-10-18  5:49 UTC (permalink / raw)
  To: dev; +Cc: jianfeng.tan, Michael Qiu

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf
  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
  2016-10-24  5:41   ` Tan, Jianfeng
  2016-10-24  5:41 ` [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue Tan, Jianfeng
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Qiu @ 2016-10-18  5:49 UTC (permalink / raw)
  To: dev; +Cc: jianfeng.tan, Michael Qiu

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue
  2016-10-18  5:49 [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue Michael Qiu
  2016-10-18  5:49 ` [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf Michael Qiu
@ 2016-10-24  5:41 ` Tan, Jianfeng
  1 sibling, 0 replies; 5+ messages in thread
From: Tan, Jianfeng @ 2016-10-24  5:41 UTC (permalink / raw)
  To: Michael Qiu, dev; +Cc: Michael Qiu



> -----Original Message-----
> From: Michael Qiu [mailto:qdy220091330@gmail.com]
> Sent: Tuesday, October 18, 2016 1:49 PM
> To: dev@dpdk.org
> Cc: Tan, Jianfeng; Michael Qiu
> Subject: [PATCH 1/2] examples/tep_term: Fix l4_len issue
> 
> 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>

Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>

Thanks,
Jianfeng

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf
  2016-10-18  5:49 ` [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf Michael Qiu
@ 2016-10-24  5:41   ` Tan, Jianfeng
  2016-10-25 15:53     ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Tan, Jianfeng @ 2016-10-24  5:41 UTC (permalink / raw)
  To: Michael Qiu, dev; +Cc: Michael Qiu



> -----Original Message-----
> From: Michael Qiu [mailto:qdy220091330@gmail.com]
> Sent: Tuesday, October 18, 2016 1:49 PM
> To: dev@dpdk.org
> Cc: Tan, Jianfeng; Michael Qiu
> Subject: [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf
> 
> 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>

Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>

Thanks,
Jianfeng

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf
  2016-10-24  5:41   ` Tan, Jianfeng
@ 2016-10-25 15:53     ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2016-10-25 15:53 UTC (permalink / raw)
  To: Michael Qiu; +Cc: dev, Tan, Jianfeng, Michael Qiu

> > 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>
> 
> Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-25 15:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-18  5:49 [dpdk-dev] [PATCH 1/2] examples/tep_term: Fix l4_len issue Michael Qiu
2016-10-18  5:49 ` [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf Michael Qiu
2016-10-24  5:41   ` 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

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).