diff mbox series

[v6,1/2] test: disable packet parsing in odp_pktio_perf

Message ID 1507644014-13917-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v6,1/2] test: disable packet parsing in odp_pktio_perf | expand

Commit Message

Github ODP bot Oct. 10, 2017, 2 p.m. UTC
From: Ola Liljedahl <ola.liljedahl@arm.com>


Disable packet parsing as it is done in the driver where it affects
scalability of the application. This especially problematic for e.g.
the loopback pktio which has only one RX queue.

Together with the improved sequence number allocation change,
performance improves >2x on Hisilicon D02 (6 and 8 threads) and more of
the scalability of the scheduler itself is exposed.

Signed-off-by: Ola Liljedahl <ola.liljedahl@arm.com>

Reviewed-by: Brian Brooks <brian.brooks@arm.com>


Jira: ENTNET-488

Change-Id: I44035bf5b70af5b5bd9b7163ca55673043d2493b
---
/** Email created from pull request 188 (WonderfulVoid:master)
 ** https://github.com/Linaro/odp/pull/188
 ** Patch: https://github.com/Linaro/odp/pull/188.patch
 ** Base sha: 3bacbfd55edf76b897a4b2e5c62b59ca6fa95331
 ** Merge commit sha: 63cba8b410fd2e58a1d373bea42a956639022782
 **/
 test/common_plat/performance/odp_pktio_perf.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/test/common_plat/performance/odp_pktio_perf.c b/test/common_plat/performance/odp_pktio_perf.c
index a170e1285..e13a850a3 100644
--- a/test/common_plat/performance/odp_pktio_perf.c
+++ b/test/common_plat/performance/odp_pktio_perf.c
@@ -241,18 +241,16 @@  static int pktio_pkt_has_magic(odp_packet_t pkt)
 	size_t l4_off;
 	pkt_head_t pkt_hdr;
 
-	l4_off = odp_packet_l4_offset(pkt);
-	if (l4_off) {
-		int ret = odp_packet_copy_to_mem(pkt,
-						 l4_off + ODPH_UDPHDR_LEN,
-						 sizeof(pkt_hdr), &pkt_hdr);
+	l4_off = ODPH_ETHHDR_LEN + ODPH_IPV4HDR_LEN;
+	int ret = odp_packet_copy_to_mem(pkt,
+					 l4_off + ODPH_UDPHDR_LEN,
+					 sizeof(pkt_hdr), &pkt_hdr);
 
-		if (ret != 0)
-			return 0;
+	if (ret != 0)
+		return 0;
 
-		if (pkt_hdr.magic == TEST_HDR_MAGIC)
-			return 1;
-	}
+	if (pkt_hdr.magic == TEST_HDR_MAGIC)
+		return 1;
 
 	return 0;
 }
@@ -739,6 +737,7 @@  static int test_init(void)
 	odp_pool_param_t params;
 	const char *iface;
 	int schedule;
+	odp_pktio_config_t cfg;
 
 	odp_pool_param_init(&params);
 	params.pkt.len     = PKT_HDR_LEN + gbl_args->args.pkt_len;
@@ -788,6 +787,13 @@  static int test_init(void)
 		return -1;
 	}
 
+	/* Disable packet parsing as this is done in the driver where it
+	 * affects scalability.
+	 */
+	odp_pktio_config_init(&cfg);
+	cfg.parser.layer = ODP_PKTIO_PARSER_LAYER_NONE;
+	odp_pktio_config(gbl_args->pktio_rx, &cfg);
+
 	if (gbl_args->args.num_ifaces > 1) {
 		if (odp_pktout_queue_config(gbl_args->pktio_rx, NULL)) {
 			LOG_ERR("failed to configure pktio_rx queue\n");