From patchwork Wed Oct 11 09:09:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh X-Patchwork-Id: 30104 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E9AD51B1FD; Wed, 11 Oct 2017 11:11:00 +0200 (CEST) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0088.outbound.protection.outlook.com [104.47.42.88]) by dpdk.org (Postfix) with ESMTP id 4FDAF1B1C3 for ; Wed, 11 Oct 2017 11:10:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=TJ9Si1dENEhx7q6MhcaDGrqXrcMdtN2ZM77FTwKK9sM=; b=ntT77AZ8Kht8jjF7h1lFLDROnLXZEdNvjYVHhK5pQeYaAu+zY8b2FdGaIdWJxBDTG0/qiGkNqEekKc/H9BE6iPCuT2zIapu+n3OSybuhgKw7adyQnmUZ0TlAcELvnyqUW5j3d0Zt4ceBZPPMiaNnctz8C3n8TL1w5d1BP3hzzwY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by BN6PR07MB3457.namprd07.prod.outlook.com (10.161.153.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 11 Oct 2017 09:10:54 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, santosh.shukla@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 11 Oct 2017 14:39:47 +0530 Message-Id: <1507712990-13064-5-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507712990-13064-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1507712990-13064-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0014.INDPRD01.PROD.OUTLOOK.COM (10.174.214.152) To BN6PR07MB3457.namprd07.prod.outlook.com (10.161.153.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 24cebb6a-b8f1-4aad-157b-08d51087faf9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR07MB3457; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 3:j2Z/ehfoW0atn/B16BKWHwAwMb6XMGp87cmYnprmliyV1AmMKclMHL8jKAlWO+SvenZkst4/YJTc4S8DnlCRHx+3LnpQjdyXE6wIoZvcLs3V2sbD56L6Ec+rl3kbBbJXkyi6pMPHIxlC4BkWOQYTODvJRhRBWULeMNeMWUVPy/4SZ1vepOel8g4evXj4M4TovfXCdmjSMId4DG5JZ858/sXTonmALkuccKxWkczQK1DgZi71CTHRUBzQkEGYEMAh; 25:aqA4NPGrr1IN8Fy7XQoSBWhFsDbOzj+F32s2QMiHEPvvZQ+N7jD5riX7A7em3eao8opT9jopmvsLFJu2uOd9hDgX9jpZk0m/8iI52Kjo5BH9t6dXPX/2EdJdquWsyOiuxYYkoJLtPJevnL9CoXeyqRjH6RBcUjwxcDgfbaWOwvDD5zAQVvMQohNwuYjuaiM+gRpJNIwtRIaYs7Aa4T/+EtNbgUKVopxyIV8zkfxnPMaCRtia/uO6WMDB+aPt/dAXV7G92OB2k7M6hwJn1eU5q/jqzTt7ekBWU397Hd5445TiEFsAcOnnazK5E6Pqr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7j07eGeMuKR8JG2v59jIyJOHi29L2DjETHMN2MPDB/5wo6PG5lkKtwmJ/RmSHAwQMd2p4CQvFjynNT75Bzel7N7zT8uvYuvPBsx/kbNx4WycODboDM0vO0P18JCKmGmDhXKuDPutgge5 X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(20161123558100)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3457; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3457; X-Forefront-PRVS: 0457F11EAF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(2906002)(50986999)(6116002)(68736007)(5009440100003)(6506006)(6486002)(76176999)(3846002)(4326008)(72206003)(33646002)(478600001)(16586007)(189998001)(15650500001)(316002)(48376002)(16526018)(6636002)(25786009)(6666003)(105586002)(5660300001)(50466002)(66066001)(42882006)(36756003)(47776003)(53416004)(97736004)(53936002)(5003940100001)(8936002)(81166006)(101416001)(106356001)(50226002)(81156014)(107886003)(6512007)(8656003)(8676002)(305945005)(7736002)(69596002)(2950100002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3457; H:PBHAGAVATULA-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3457; 23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put: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2017 09:10:54.0831 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3457 Subject: [dpdk-dev] [PATCH 4/7] test/eventdev: update test to use service core X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use service core for event scheduling instead of calling the event schedule api directly. Signed-off-by: Pavan Nikhilesh --- test/test/test_eventdev_sw.c | 120 ++++++++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 53 deletions(-) diff --git a/test/test/test_eventdev_sw.c b/test/test/test_eventdev_sw.c index 7219886..81954dc 100644 --- a/test/test/test_eventdev_sw.c +++ b/test/test/test_eventdev_sw.c @@ -49,6 +49,7 @@ #include #include #include +#include #include "test.h" @@ -320,6 +321,19 @@ struct test_event_dev_stats { uint64_t qid_tx_pkts[MAX_QIDS]; }; +static inline void +wait_schedule(int evdev) +{ + static const char * const dev_names[] = {"dev_sched_calls"}; + uint64_t val; + + val = rte_event_dev_xstats_by_name_get(evdev, dev_names[0], + 0); + while ((rte_event_dev_xstats_by_name_get(evdev, dev_names[0], 0) - val) + < 2) + ; +} + static inline int test_event_dev_stats_get(int dev_id, struct test_event_dev_stats *stats) { @@ -392,9 +406,9 @@ run_prio_packet_test(struct test *t) RTE_EVENT_DEV_PRIORITY_HIGHEST }; unsigned int i; + struct rte_event ev_arr[2]; for (i = 0; i < RTE_DIM(MAGIC_SEQN); i++) { /* generate pkt and enqueue */ - struct rte_event ev; struct rte_mbuf *arp = rte_gen_arp(0, t->mbuf_pool); if (!arp) { printf("%d: gen of pkt failed\n", __LINE__); @@ -402,20 +416,20 @@ run_prio_packet_test(struct test *t) } arp->seqn = MAGIC_SEQN[i]; - ev = (struct rte_event){ + ev_arr[i] = (struct rte_event){ .priority = PRIORITY[i], .op = RTE_EVENT_OP_NEW, .queue_id = t->qid[0], .mbuf = arp }; - err = rte_event_enqueue_burst(evdev, t->port[0], &ev, 1); - if (err < 0) { - printf("%d: error failed to enqueue\n", __LINE__); - return -1; - } + } + err = rte_event_enqueue_burst(evdev, t->port[0], ev_arr, 2); + if (err < 0) { + printf("%d: error failed to enqueue\n", __LINE__); + return -1; } - rte_event_schedule(evdev); + wait_schedule(evdev); struct test_event_dev_stats stats; err = test_event_dev_stats_get(evdev, &stats); @@ -425,8 +439,8 @@ run_prio_packet_test(struct test *t) } if (stats.port_rx_pkts[t->port[0]] != 2) { - printf("%d: error stats incorrect for directed port\n", - __LINE__); + printf("%d: error stats incorrect for directed port %"PRIu64"\n", + __LINE__, stats.port_rx_pkts[t->port[0]]); rte_event_dev_dump(evdev, stdout); return -1; } @@ -439,6 +453,7 @@ run_prio_packet_test(struct test *t) rte_event_dev_dump(evdev, stdout); return -1; } + if (ev.mbuf->seqn != MAGIC_SEQN[1]) { printf("%d: first packet out not highest priority\n", __LINE__); @@ -507,7 +522,7 @@ test_single_directed_packet(struct test *t) } /* Run schedule() as dir packets may need to be re-ordered */ - rte_event_schedule(evdev); + wait_schedule(evdev); struct test_event_dev_stats stats; err = test_event_dev_stats_get(evdev, &stats); @@ -574,7 +589,7 @@ test_directed_forward_credits(struct test *t) printf("%d: error failed to enqueue\n", __LINE__); return -1; } - rte_event_schedule(evdev); + wait_schedule(evdev); uint32_t deq_pkts; deq_pkts = rte_event_dequeue_burst(evdev, 0, &ev, 1, 0); @@ -736,7 +751,7 @@ burst_packets(struct test *t) return -1; } } - rte_event_schedule(evdev); + wait_schedule(evdev); /* Check stats for all NUM_PKTS arrived to sched core */ struct test_event_dev_stats stats; @@ -825,7 +840,7 @@ abuse_inflights(struct test *t) } /* schedule */ - rte_event_schedule(evdev); + wait_schedule(evdev); struct test_event_dev_stats stats; @@ -963,7 +978,7 @@ xstats_tests(struct test *t) } } - rte_event_schedule(evdev); + wait_schedule(evdev); /* Device names / values */ int num_stats = rte_event_dev_xstats_names_get(evdev, @@ -974,8 +989,8 @@ xstats_tests(struct test *t) ret = rte_event_dev_xstats_get(evdev, RTE_EVENT_DEV_XSTATS_DEVICE, 0, ids, values, num_stats); - static const uint64_t expected[] = {3, 3, 0, 1, 0, 0}; - for (i = 0; (signed int)i < ret; i++) { + static const uint64_t expected[] = {3, 3, 0}; + for (i = 0; (signed int)i < 3; i++) { if (expected[i] != values[i]) { printf( "%d Error xstat %d (id %d) %s : %"PRIu64 @@ -994,7 +1009,7 @@ xstats_tests(struct test *t) ret = rte_event_dev_xstats_get(evdev, RTE_EVENT_DEV_XSTATS_DEVICE, 0, ids, values, num_stats); - for (i = 0; (signed int)i < ret; i++) { + for (i = 0; (signed int)i < 3; i++) { if (expected_zero[i] != values[i]) { printf( "%d Error, xstat %d (id %d) %s : %"PRIu64 @@ -1290,7 +1305,7 @@ port_reconfig_credits(struct test *t) } } - rte_event_schedule(evdev); + wait_schedule(evdev); struct rte_event ev[NPKTS]; int deq = rte_event_dequeue_burst(evdev, t->port[0], ev, @@ -1516,14 +1531,12 @@ xstats_id_reset_tests(struct test *t) } } - rte_event_schedule(evdev); + wait_schedule(evdev); static const char * const dev_names[] = { - "dev_rx", "dev_tx", "dev_drop", "dev_sched_calls", - "dev_sched_no_iq_enq", "dev_sched_no_cq_enq", - }; + "dev_rx", "dev_tx", "dev_drop"}; uint64_t dev_expected[] = {NPKTS, NPKTS, 0, 1, 0, 0}; - for (i = 0; (int)i < ret; i++) { + for (i = 0; (int)i < 3; i++) { unsigned int id; uint64_t val = rte_event_dev_xstats_by_name_get(evdev, dev_names[i], @@ -1888,26 +1901,26 @@ qid_priorities(struct test *t) } /* enqueue 3 packets, setting seqn and QID to check priority */ + struct rte_event ev_arr[3]; for (i = 0; i < 3; i++) { - struct rte_event ev; struct rte_mbuf *arp = rte_gen_arp(0, t->mbuf_pool); if (!arp) { printf("%d: gen of pkt failed\n", __LINE__); return -1; } - ev.queue_id = t->qid[i]; - ev.op = RTE_EVENT_OP_NEW; - ev.mbuf = arp; + ev_arr[i].queue_id = t->qid[i]; + ev_arr[i].op = RTE_EVENT_OP_NEW; + ev_arr[i].mbuf = arp; arp->seqn = i; - int err = rte_event_enqueue_burst(evdev, t->port[0], &ev, 1); - if (err != 1) { - printf("%d: Failed to enqueue\n", __LINE__); - return -1; - } + } + int err = rte_event_enqueue_burst(evdev, t->port[0], ev_arr, 3); + if (err != 3) { + printf("%d: Failed to enqueue\n", __LINE__); + return -1; } - rte_event_schedule(evdev); + wait_schedule(evdev); /* dequeue packets, verify priority was upheld */ struct rte_event ev[32]; @@ -1988,7 +2001,7 @@ load_balancing(struct test *t) } } - rte_event_schedule(evdev); + wait_schedule(evdev); struct test_event_dev_stats stats; err = test_event_dev_stats_get(evdev, &stats); @@ -2088,7 +2101,7 @@ load_balancing_history(struct test *t) } /* call the scheduler */ - rte_event_schedule(evdev); + wait_schedule(evdev); /* Dequeue the flow 0 packet from port 1, so that we can then drop */ struct rte_event ev; @@ -2105,7 +2118,7 @@ load_balancing_history(struct test *t) rte_event_enqueue_burst(evdev, t->port[1], &release_ev, 1); /* call the scheduler */ - rte_event_schedule(evdev); + wait_schedule(evdev); /* * Set up the next set of flows, first a new flow to fill up @@ -2138,7 +2151,7 @@ load_balancing_history(struct test *t) } /* schedule */ - rte_event_schedule(evdev); + wait_schedule(evdev); err = test_event_dev_stats_get(evdev, &stats); if (err) { @@ -2182,7 +2195,7 @@ load_balancing_history(struct test *t) while (rte_event_dequeue_burst(evdev, i, &ev, 1, 0)) rte_event_enqueue_burst(evdev, i, &release_ev, 1); } - rte_event_schedule(evdev); + wait_schedule(evdev); cleanup(t); return 0; @@ -2248,7 +2261,7 @@ invalid_qid(struct test *t) } /* call the scheduler */ - rte_event_schedule(evdev); + wait_schedule(evdev); err = test_event_dev_stats_get(evdev, &stats); if (err) { @@ -2333,7 +2346,7 @@ single_packet(struct test *t) return -1; } - rte_event_schedule(evdev); + wait_schedule(evdev); err = test_event_dev_stats_get(evdev, &stats); if (err) { @@ -2376,7 +2389,7 @@ single_packet(struct test *t) printf("%d: Failed to enqueue\n", __LINE__); return -1; } - rte_event_schedule(evdev); + wait_schedule(evdev); err = test_event_dev_stats_get(evdev, &stats); if (stats.port_inflight[wrk_enq] != 0) { @@ -2464,7 +2477,7 @@ inflight_counts(struct test *t) } /* schedule */ - rte_event_schedule(evdev); + wait_schedule(evdev); err = test_event_dev_stats_get(evdev, &stats); if (err) { @@ -2520,7 +2533,7 @@ inflight_counts(struct test *t) * As the scheduler core decrements inflights, it needs to run to * process packets to act on the drop messages */ - rte_event_schedule(evdev); + wait_schedule(evdev); err = test_event_dev_stats_get(evdev, &stats); if (stats.port_inflight[p1] != 0) { @@ -2555,7 +2568,7 @@ inflight_counts(struct test *t) * As the scheduler core decrements inflights, it needs to run to * process packets to act on the drop messages */ - rte_event_schedule(evdev); + wait_schedule(evdev); err = test_event_dev_stats_get(evdev, &stats); if (stats.port_inflight[p2] != 0) { @@ -2649,7 +2662,7 @@ parallel_basic(struct test *t, int check_order) } } - rte_event_schedule(evdev); + wait_schedule(evdev); /* use extra slot to make logic in loops easier */ struct rte_event deq_ev[w3_port + 1]; @@ -2676,7 +2689,7 @@ parallel_basic(struct test *t, int check_order) return -1; } } - rte_event_schedule(evdev); + wait_schedule(evdev); /* dequeue from the tx ports, we should get 3 packets */ deq_pkts = rte_event_dequeue_burst(evdev, t->port[tx_port], deq_ev, @@ -2754,7 +2767,7 @@ holb(struct test *t) /* test to check we avoid basic head-of-line blocking */ printf("%d: Error doing first enqueue\n", __LINE__); goto err; } - rte_event_schedule(evdev); + wait_schedule(evdev); if (rte_event_dev_xstats_by_name_get(evdev, "port_0_cq_ring_used", NULL) != 1) @@ -2779,7 +2792,7 @@ holb(struct test *t) /* test to check we avoid basic head-of-line blocking */ printf("%d: Error with enqueue\n", __LINE__); goto err; } - rte_event_schedule(evdev); + wait_schedule(evdev); } while (rte_event_dev_xstats_by_name_get(evdev, rx_port_free_stat, NULL) != 0); @@ -2789,7 +2802,7 @@ holb(struct test *t) /* test to check we avoid basic head-of-line blocking */ printf("%d: Error with enqueue\n", __LINE__); goto err; } - rte_event_schedule(evdev); + wait_schedule(evdev); /* check that the other port still has an empty CQ */ if (rte_event_dev_xstats_by_name_get(evdev, other_port_used_stat, NULL) @@ -2812,7 +2825,7 @@ holb(struct test *t) /* test to check we avoid basic head-of-line blocking */ printf("%d: Error with enqueue\n", __LINE__); goto err; } - rte_event_schedule(evdev); + wait_schedule(evdev); if (rte_event_dev_xstats_by_name_get(evdev, other_port_used_stat, NULL) != 1) { @@ -3002,7 +3015,7 @@ worker_loopback(struct test *t) while (rte_eal_get_lcore_state(p_lcore) != FINISHED || rte_eal_get_lcore_state(w_lcore) != FINISHED) { - rte_event_schedule(evdev); + wait_schedule(evdev); uint64_t new_cycles = rte_get_timer_cycles(); @@ -3029,7 +3042,7 @@ worker_loopback(struct test *t) cycles = new_cycles; } } - rte_event_schedule(evdev); /* ensure all completions are flushed */ + wait_schedule(evdev); /* ensure all completions are flushed */ rte_eal_mp_wait_lcore(); @@ -3064,6 +3077,7 @@ test_sw_eventdev(void) printf("Error finding newly created eventdev\n"); return -1; } + rte_service_start_with_defaults(); } /* Only create mbuf pool once, reuse for each test run */