patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/1] app/test: fix TCP header initialization
@ 2021-03-30 13:23 Lance Richardson
  2021-04-08 16:07 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Lance Richardson @ 2021-03-30 13:23 UTC (permalink / raw)
  To: Jasvinder Singh, Bernard Iremonger; +Cc: dev, stable

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

Initialize TCP data offset field with TCP header length, this
field is used to derive L4 header length and by hardware to
validate a TCP header.

Fixes: 41f72ec94074 ("test: add packet burst generator functions")
Cc: stable@dpdk.org

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
---
 app/test/packet_burst_generator.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8b390853a2..0fd7290b0e 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -117,6 +117,7 @@ initialize_tcp_header(struct rte_tcp_hdr *tcp_hdr, uint16_t src_port,
 	memset(tcp_hdr, 0, sizeof(struct rte_tcp_hdr));
 	tcp_hdr->src_port = rte_cpu_to_be_16(src_port);
 	tcp_hdr->dst_port = rte_cpu_to_be_16(dst_port);
+	tcp_hdr->data_off = (sizeof(struct rte_tcp_hdr) << 2) & 0xF0;
 
 	return pkt_len;
 }
-- 
2.25.1


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

end of thread, other threads:[~2021-04-09 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 13:23 [dpdk-stable] [PATCH 1/1] app/test: fix TCP header initialization Lance Richardson
2021-04-08 16:07 ` Ferruh Yigit
2021-04-09 10:44   ` Ferruh Yigit

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