From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0073.outbound.protection.outlook.com [104.47.34.73]) by dpdk.org (Postfix) with ESMTP id 1C1917CB3 for ; Wed, 18 Oct 2017 14:40:10 +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=/95JNiax9NjlhpEjtVi0PYMUzHVEqNRjlnGWm0l/UPE=; b=FXKIhBdKBZwhXI4gcokj9PK+DBxr08WckVU1DQuO4QUW1EDhATQ1mbJh0tHqOG/4ZlObaOda2X17uYYPsgQiBOQTBC314AeIVQ5AtalJiEJhnVlwqP0Dy3sWoqHa6Ro4eGJyhL4laHfdmTQCdE5oAbXnIXfm1VgxR1oP4C97fl8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 18 Oct 2017 12:40:05 +0000 From: Pavan Nikhilesh To: bruce.richardson@intel.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, nikhil.rao@intel.com, santosh.shukla@caviumnetworks.com, jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 18 Oct 2017 18:09:02 +0530 Message-Id: <1508330348-30060-3-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0040.INDPRD01.PROD.OUTLOOK.COM (10.174.214.26) To DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 54a6f88b-935e-48db-e76b-08d516255e08 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR07MB3467; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 3:TCe0Gw0qBPRiItxOnRhLNMvTqUQ3WJ8WJMzMCAJOON9bMFxayOS6L9Lgn5NwtaMJka0ToxNJBAQU45As+3xj78uFoCXzmkvaoNRtQjPiDIc9dALfg7iU5dX2C04YZzE7GoF7wxTZ/mJAQs7JQREsg778ikOHMkrmBAr2CoA44s9/QlAAE7Hog2Ke8IuMRvrx+4tK3tnWmOoHohSg4GB5j4kvI1VIZc97amc+2Edtzm6l2cIE9amo84x5CnqlqZvk; 25:dgX/jFeVsAZNiUheS0R62kivjfdkJnEIRB1QlvqgbLJXjPoQeGFDFa/HDwJ2dllamhACj0kunAot2K7c1nYt7k9Ah6DbvRTh1Yh5LCNaWCCccC7TewJtyAXwqnfAyhtxp4Ew1rH3Oy8uNIu6dzV9L+9hBXUAwG0pvbrRdag85iYWJ7EQme7lsJOYFJpaYU7rjQbYnQs9ixcVwlek7TIcdWpSTKeTUq26nvICVPaaHXxBOfmR2Flxg4x1Xfb2Gcd60TZQnRBLWsVa/jPuAqeAP57R8GMdSOyQSIeJq8X9ikO3jFbEtsBHnTd2puYKNB3bjq3XmHR1QqwQSP4hZU9JYA==; 31:5T+FAiYLss37abo54Q/KTjLz39p3mQMoyCihpArbUucRhk7XqUT6WOSX8RdjFHgAmJ53S6OKLJkxPn6spKIX5XrmCXcsKKGBrNpMSD4p5thclFAWANH83EMXPLZS/mBw7SZAiBPsCtjM6WrLhkT719V2sKmYQbivR2bkjJK+gA2LIpaYlCKkZEL055EWynJHFA/JPS4TnyohSmIlpivTyux23C5/jwQEfxoyY1SJZug= X-MS-TrafficTypeDiagnostic: DM5PR07MB3467: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 20:O7BD7ZtiXpLr+D+DYhoAdRJFuirDgixOe7ng9+nbR7WD8WLCVjSsbMAFGbZKvxGzAXFbnMQ2jgmK3mzoUn0aXYcgNQCkYKfVzQFyurAsgzv4QmChHq/PbJEEkyYV0+VENLoqzXjCX/NCiMO60d7PaiL7Xk8ZHuQALw6XbBcikEqclEsI4mn/yw9nSrZGlTgNbOvG9LnxuYCGzwWJS+G8t/yWjpuGO9rJeV9nuXPUDGzPRWHCUeeJASPDkRJoDu9jhq3PVb+YwkflvLa4zyJ7hbAS4d6yzOqYd1bs6rK/9tGw783nU7S0WR+U4KpV0+E1dNLleEtlyu7aK6A7t7gXDhQvQc9R+LGZq3eL4MqbQ3xiVjLVc/BNqPSsXE71iQniPP+LH7363OvgU1F4OlMjaq5BA/+vupdmxJsjWSl+clHjGUXkJgweadvAlEHqV5hl8CTBqAiTv7n/w96p1ZZNcpsXLO6IDfZ2QuGkeLKL7rr7gxWw7bLIIHwwz1TpsLA1Wj8wiUqAWxaniekuE2BxxQadKiKl71C7hdjXegxUmn7EjMirAs+ixCM8MCvtLo6CYra8lDZfsH9PVNoAOgwMXX3SDo6SfKr5zwgovZPwgec=; 4:IJD2EXsP1KEqEAU9DLErmlDPIG4rOq+OH1mbInEC6HTXkXyy2THYR/lqagH7WErI/IFDwgyiTfqPM0hqs6+uKnK2RONTK0atvUWZlifDm0Dqm8XJOxQpxJO47w78EJr8YiDLp6trhktzemtpu2gJvFYZ9wi8TZKcwumG89HVniSRfXccvMOIhKlLmjAuPAnWqx1Dqe89oBYgaAhbFcxhAzuBxk/VkD5IGl1I4MCJj7+CaOojNS33voY+nhRaPDKt 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)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123558100)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3467; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3467; X-Forefront-PRVS: 0464DBBBC4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(199003)(189002)(36756003)(316002)(72206003)(478600001)(48376002)(575784001)(16586007)(106356001)(25786009)(53936002)(107886003)(6666003)(50226002)(8656005)(6636002)(105586002)(2950100002)(42882006)(8656005)(50466002)(5003940100001)(6512007)(6506006)(101416001)(189998001)(6116002)(33646002)(4326008)(5660300001)(2906002)(81166006)(7736002)(5009440100003)(6486002)(3846002)(97736004)(305945005)(53416004)(81156014)(66066001)(76176999)(8676002)(8936002)(16526018)(68736007)(50986999)(47776003)(69596002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3467; H:PBHAGAVATULA-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; DM5PR07MB3467; 23:6t1koG4IAmZHZyLmOMG0/+r6NG3sWVZHiHWXRK1CD?= =?us-ascii?Q?/RKSmFGf5jnKbDNGgHR1HFzahUMdEyTIfgp2/ar1cjQlzxyLjCPxXEhoHw/a?= =?us-ascii?Q?K7Gj/aaQLtlj0FS9raZr28Dccxl0qUspb6gYyfaLDo6U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L/EjPq7taaQPojQN34de47VWQZKxyFxwed+2VTgT6R8PCDY6Bpe4Wz6beEWRVW4cLC18DswNXlWnGLi16yS2eHd4ryIBN2hH1APt+hb++Un1u4g2SuQFSUWhY7oP49ghoDkJ5fSXTZhgo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2017 12:40:05.8160 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3467 Subject: [dpdk-dev] [PATCH 2/8] app/eventdev: modify app setup to support ethdev 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: , X-List-Received-Date: Wed, 18 Oct 2017 12:40:11 -0000 Modify app setup to accommodate event port and queue setup based on the number of ethernet ports. Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/test_perf_atq.c | 18 ++++++++++++++---- app/test-eventdev/test_perf_common.c | 27 +++++++++++++++++++++------ app/test-eventdev/test_perf_common.h | 1 + app/test-eventdev/test_perf_queue.c | 21 ++++++++++++++++----- 4 files changed, 52 insertions(+), 15 deletions(-) diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c index 0e9f2db..f6fd5d9 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -185,10 +185,20 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) { int ret; uint8_t queue; + uint8_t nb_queues; + uint8_t nb_ports; + RTE_SET_USED(test); + + nb_ports = evt_nr_active_lcores(opt->wlcores); + nb_ports += opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? 0 : + evt_nr_active_lcores(opt->plcores); + + nb_queues = opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? + rte_eth_dev_count() : atq_nb_event_queues(opt); const struct rte_event_dev_config config = { - .nb_event_queues = atq_nb_event_queues(opt), - .nb_event_ports = perf_nb_event_ports(opt), + .nb_event_queues = nb_queues, + .nb_event_ports = nb_ports, .nb_events_limit = 4096, .nb_event_queue_flows = opt->nb_flows, .nb_event_port_dequeue_depth = 128, @@ -208,7 +218,7 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) .nb_atomic_order_sequences = opt->nb_flows, }; /* queue configurations */ - for (queue = 0; queue < atq_nb_event_queues(opt); queue++) { + for (queue = 0; queue < nb_queues; queue++) { ret = rte_event_queue_setup(opt->dev_id, queue, &q_conf); if (ret) { evt_err("failed to setup queue=%d", queue); @@ -217,7 +227,7 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) } ret = perf_event_dev_port_setup(test, opt, 1 /* stride */, - atq_nb_event_queues(opt)); + nb_queues); if (ret) return ret; diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index 9d2865e..f7961be 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -88,6 +88,18 @@ perf_producer(void *arg) return 0; } +static int +perf_producer_wrapper(void *arg) +{ + RTE_SET_USED(arg); + struct prod_data *p = arg; + struct test_perf *t = p->t; + /* Launch the producer function only in case of synthetic producer. */ + if (t->opt->prod_type == EVT_PROD_TYPE_SYNT) + return perf_producer(arg); + return 0; +} + static inline uint64_t processed_pkts(struct test_perf *t) { @@ -142,8 +154,8 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt, if (!(opt->plcores[lcore_id])) continue; - ret = rte_eal_remote_launch(perf_producer, &t->prod[port_idx], - lcore_id); + ret = rte_eal_remote_launch(perf_producer_wrapper, + &t->prod[port_idx], lcore_id); if (ret) { evt_err("failed to launch perf_producer %d", lcore_id); return ret; @@ -193,14 +205,17 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt, fflush(stdout); if (remaining <= 0) { - t->done = true; t->result = EVT_TEST_SUCCESS; - rte_smp_wmb(); - break; + if (opt->prod_type == EVT_PROD_TYPE_SYNT) { + t->done = true; + rte_smp_wmb(); + break; + } } } - if (new_cycles - dead_lock_cycles > dead_lock_sample) { + if (new_cycles - dead_lock_cycles > dead_lock_sample && + opt->prod_type == EVT_PROD_TYPE_SYNT) { remaining = t->outstand_pkts - processed_pkts(t); if (dead_lock_remaining == remaining) { rte_event_dev_dump(opt->dev_id, stdout); diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index c6fc70c..ab2e599 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -38,6 +38,7 @@ #include #include +#include #include #include #include diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c index c0ea894..3467bb5 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -182,10 +182,21 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) uint8_t queue; int nb_stages = opt->nb_stages; int ret; + int nb_ports; + int nb_queues; + RTE_SET_USED(test); + + nb_ports = evt_nr_active_lcores(opt->wlcores); + nb_ports += opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? 0 : + evt_nr_active_lcores(opt->plcores); + + nb_queues = opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? + rte_eth_dev_count() * nb_stages : + perf_queue_nb_event_queues(opt); const struct rte_event_dev_config config = { - .nb_event_queues = perf_queue_nb_event_queues(opt), - .nb_event_ports = perf_nb_event_ports(opt), + .nb_event_queues = nb_queues, + .nb_event_ports = nb_ports, .nb_events_limit = 4096, .nb_event_queue_flows = opt->nb_flows, .nb_event_port_dequeue_depth = 128, @@ -204,8 +215,8 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) .nb_atomic_order_sequences = opt->nb_flows, }; /* queue configurations */ - for (queue = 0; queue < perf_queue_nb_event_queues(opt); queue++) { - q_conf.event_queue_cfg = + for (queue = 0; queue < nb_queues; queue++) { + q_conf.schedule_type = (opt->sched_type_list[queue % nb_stages]); if (opt->q_priority) { @@ -228,7 +239,7 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) } ret = perf_event_dev_port_setup(test, opt, nb_stages /* stride */, - perf_queue_nb_event_queues(opt)); + nb_queues); if (ret) return ret; -- 2.7.4