diff mbox series

[v3,13/13] test: disable packet parsing in odp_pktio_perf

Message ID 1507557617-32018-14-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v3,1/13] linux-gen: drop unused _odp_packet_cmp_data() function | expand

Commit Message

Github ODP bot Oct. 9, 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>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>


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: c16af6486eea240609f334b1bdc81a11404275de
 ** Merge commit sha: 4ad1d0615a4dcd74d4e9703090149eec1a58d7d2
 **/
 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 210a833fe..b749ee9b9 100644
--- a/test/common_plat/performance/odp_pktio_perf.c
+++ b/test/common_plat/performance/odp_pktio_perf.c
@@ -239,18 +239,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");