DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix IP checksum calculation
@ 2020-12-03 13:59 George Prekas
  2020-12-03 16:08 ` Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: George Prekas @ 2020-12-03 13:59 UTC (permalink / raw)
  To: Wenzhuo Lu, Beilei Xing, Bernard Iremonger; +Cc: dev, George Prekas

Insert a compiler barrier to make sure that the IP checksum calculation
happens after setting all the fields of the IP header.

Signed-off-by: George Prekas <prekageo@amazon.com>
---
 app/test-pmd/flowgen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index acf3e2460..893b4b0b8 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -150,6 +150,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 							   next_flow);
 		ip_hdr->total_length	= RTE_CPU_TO_BE_16(pkt_size -
 							   sizeof(*eth_hdr));
+		rte_compiler_barrier();
 		ip_hdr->hdr_checksum	= ip_sum((unaligned_uint16_t *)ip_hdr,
 						 sizeof(*ip_hdr));
 
-- 
2.17.1


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

end of thread, other threads:[~2021-01-18 15:21 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 13:59 [dpdk-dev] [PATCH] app/testpmd: fix IP checksum calculation George Prekas
2020-12-03 16:08 ` Stephen Hemminger
2020-12-03 16:35   ` George Prekas
2020-12-03 18:33     ` Stephen Hemminger
2020-12-04  8:59 ` Ferruh Yigit
2020-12-05  5:47   ` George Prekas
2020-12-05  5:42 ` [dpdk-dev] [PATCH v2] " George Prekas
2021-01-05 16:26   ` George Prekas
2021-01-06 18:02   ` Ferruh Yigit
2021-01-07  5:25     ` Stephen Hemminger
2021-01-07  5:39     ` George Prekas
2021-01-07 11:32       ` Ferruh Yigit
2021-01-07 13:06         ` Ferruh Yigit
2021-01-07 14:20         ` George Prekas
2021-01-07 15:22           ` Ferruh Yigit
2021-01-07 20:45             ` George Prekas
2021-01-07 15:50       ` Stephen Hemminger
2021-01-07 15:59         ` Ferruh Yigit
2021-01-07 16:29           ` Stephen Hemminger
2021-01-07 20:42   ` [dpdk-dev] [PATCH v3] " George Prekas
2021-01-18 15:20     ` 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).