[v1,2/2] example: generator: remove useless csum checks

Message ID 1518537609-25649-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • odp_generator: miscellaneous changes to improve RX side
Related show

Commit Message

Github ODP bot Feb. 13, 2018, 4 p.m.
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Remove useless csum checks: packets are dropped at platform level
if have csum errors.

Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org>

---
/** Email created from pull request 475 (bogdanPricope:master_generator_rx_pr)
 ** https://github.com/Linaro/odp/pull/475
 ** Patch: https://github.com/Linaro/odp/pull/475.patch
 ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847
 ** Merge commit sha: 1e80eb73f8a105ac227aa7be2b861e2c12491802
 **/
 example/generator/odp_generator.c | 9 ---------
 1 file changed, 9 deletions(-)

Patch

diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index 440b6b287..d31b68513 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -824,21 +824,12 @@  static void process_pkts(int thr, thread_args_t *thr_args,
 			 odp_packet_t pkt_tbl[], unsigned len)
 {
 	odp_packet_t pkt;
-	odp_packet_chksum_status_t csum_status;
 	uint32_t left, offset, i;
 	odph_ipv4hdr_t *ip;
 
 	for (i = 0; i < len; ++i) {
 		pkt = pkt_tbl[i];
 
-		csum_status = odp_packet_l3_chksum_status(pkt);
-		if (csum_status == ODP_PACKET_CHKSUM_BAD)
-			printf("L3 checksum error detected.\n");
-
-		csum_status = odp_packet_l4_chksum_status(pkt);
-		if (csum_status == ODP_PACKET_CHKSUM_BAD)
-			printf("L4 checksum error detected.\n");
-
 		/* Drop packets with errors */
 		if (odp_unlikely(odp_packet_has_error(pkt)))
 			continue;