From patchwork Thu Oct 14 14:51:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Van Haaren, Harry" X-Patchwork-Id: 101623 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4F37FA0C4B; Thu, 14 Oct 2021 16:52:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D52F54128D; Thu, 14 Oct 2021 16:52:10 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 0B0F6411FE for ; Thu, 14 Oct 2021 16:52:06 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="214855044" X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="214855044" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 07:52:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="563853375" Received: from silpixa00401089.ir.intel.com ([10.55.128.47]) by FMSMGA003.fm.intel.com with ESMTP; 14 Oct 2021 07:52:05 -0700 From: Harry van Haaren To: dev@dpdk.org Cc: jerinj@marvell.com, pravin.pathak@intel.com, rashmi.shetty@intel.com, Harry van Haaren Date: Thu, 14 Oct 2021 14:51:40 +0000 Message-Id: <20211014145141.679372-3-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211014145141.679372-1-harry.van.haaren@intel.com> References: <20210909125422.31144-2-harry.van.haaren@intel.com> <20211014145141.679372-1-harry.van.haaren@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 3/4] test-eventdev: add event port hints for perf mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" This commit adds producer, worker and consumer port hints for the test-eventdev application performance tests. Signed-off-by: Harry van Haaren --- app/test-eventdev/test_perf_common.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index cc100650c2..766ea22a27 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -480,7 +480,10 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, w->processed_pkts = 0; w->latency = 0; - ret = rte_event_port_setup(opt->dev_id, port, port_conf); + struct rte_event_port_conf conf = *port_conf; + conf.event_port_cfg |= RTE_EVENT_PORT_CFG_HINT_WORKER; + + ret = rte_event_port_setup(opt->dev_id, port, &conf); if (ret) { evt_err("failed to setup port %d", port); return ret; @@ -500,7 +503,10 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, p->t = t; } - ret = perf_event_rx_adapter_setup(opt, stride, *port_conf); + struct rte_event_port_conf conf = *port_conf; + conf.event_port_cfg |= RTE_EVENT_PORT_CFG_HINT_PRODUCER; + + ret = perf_event_rx_adapter_setup(opt, stride, conf); if (ret) return ret; } else if (opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR) { @@ -525,8 +531,12 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, p->queue_id = prod * stride; p->t = t; - ret = rte_event_port_setup(opt->dev_id, port, - port_conf); + struct rte_event_port_conf conf = *port_conf; + conf.event_port_cfg |= + RTE_EVENT_PORT_CFG_HINT_PRODUCER | + RTE_EVENT_PORT_CFG_HINT_CONSUMER; + + ret = rte_event_port_setup(opt->dev_id, port, &conf); if (ret) { evt_err("failed to setup port %d", port); return ret;