From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 2FCA64CC3 for ; Mon, 11 Mar 2019 08:59:57 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2B7ti8D011437; Mon, 11 Mar 2019 00:59:56 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=WOCWmKf34wh+aYygwqqeSR6ZeI8pEWMz1WBH3Sd9PBc=; b=hmX34uTlTwbSJKQ487PvnQbeJ5XULSFPqjB6OENpwOs27b3vsmQJ8OE4WzT0M8ERir1K QfFfXi3ErHxMG3CnxXtdOicvXlKTYzgmj/teqqsXWm5jHnCeT4hNfZjcJuvD8KJZPQbH KG02KPJk1XJwM4Uv+swSsphtbsD77kszvAHYF/FAdZWetvcMGoY9H8CfLR1oeApqdneG KwJQiKh7C76DddM6EVQbKa0eaLvL9ln92IdMf9na71xnVF93lctSAMUw3scZBWCkBGpd dHlJwaDjhTObESQQ0h0u+cpLrL59wX7WI7Pf0py+ru1aV1XNyF4AYX7TpxJp3A0kCBwK WQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2r5f7u0r5k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 11 Mar 2019 00:59:55 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 11 Mar 2019 00:59:54 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.51) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 11 Mar 2019 00:59:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WOCWmKf34wh+aYygwqqeSR6ZeI8pEWMz1WBH3Sd9PBc=; b=cQkk08f4fgAWHcUxZd6GwuewVT+32IXWCUUfyuJF9hTJG2cxsJL17SeIZ1D3o+qT0K4Csm38mO0vM3bYokXCUcSjFdHzhA5gAo6b4WZ+E7mtAHpqT84zEBdbm7M8eCJDc/x2elYkEEy5Agke9l3ktUKrmnd5IQG9KHF/MzmTGtI= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB1895.namprd18.prod.outlook.com (10.171.255.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Mon, 11 Mar 2019 07:59:51 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::286d:5e93:974e:8bfa]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::286d:5e93:974e:8bfa%2]) with mapi id 15.20.1686.021; Mon, 11 Mar 2019 07:59:51 +0000 From: Pavan Nikhilesh Bhagavatula To: Jerin Jacob Kollanukkaran , "nikhil.rao@intel.com" , "erik.g.carrillo@intel.com" , "abhinandan.gujjar@intel.com" , "john.mcnamara@intel.com" CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula Thread-Topic: [dpdk-dev] [PATCH v2 1/2] app/eventdev: start event producers after eventdev Thread-Index: AQHU1+BnTYF11Xdybkm6jjPV3cdxgQ== Date: Mon, 11 Mar 2019 07:59:51 +0000 Message-ID: <20190311075922.9937-1-pbhagavatula@marvell.com> References: <20190227200019.1085-1-pbhagavatula@marvell.com> In-Reply-To: <20190227200019.1085-1-pbhagavatula@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BMXPR01CA0029.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::15) To CY4PR1801MB1863.namprd18.prod.outlook.com (2603:10b6:910:7a::14) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.21.0 x-originating-ip: [117.203.49.141] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2b6a9705-d0b4-4103-9274-08d6a5f78a03 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:CY4PR1801MB1895; x-ms-traffictypediagnostic: CY4PR1801MB1895: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; CY4PR1801MB1895; 23:+KPUZ5JHzfgRh7LPMh4idf0gWU//Au9+3wEMZ?= =?iso-8859-1?Q?vxyWXWWgRhgCesMuBjfCM8LKkP/gtS869w1dfmg34mXKCwz7ztVNYP6PZr?= =?iso-8859-1?Q?1Yhzi5GebQZQ8JtT3st0kK0A09KjPbA1E6UhppjEcUBLAwuajfH+B4Cf3w?= =?iso-8859-1?Q?me0Wx/nfILKvy2Oarz3n3OXkuPECzveQidfUE++1uCm+AMEkDy4i3hxO8Z?= =?iso-8859-1?Q?1KVIpkeWscU11ViCHTXQUc5rJW8PVmuvJMgW/3grDVqpz2aVl/EsSNBwZx?= =?iso-8859-1?Q?ypjjafH9hl+o/XPcT1ugIAc61EotbpfGOI08ZSnV55G3/1ihQLjzDX0oLO?= =?iso-8859-1?Q?Vt9diZz3wXrSCoYu8zLDYxQRXlRlPy8FLwH/qnnQ2THw9ZDGZUMKQBpw36?= =?iso-8859-1?Q?W7Gvk0d+05PQn1eq+ppXSSfruLCjoxtzL6KzaGcgZST/kAcsBY0NDqOrIm?= =?iso-8859-1?Q?z0LxUTW4G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D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09730BD177 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(366004)(396003)(39850400004)(376002)(199004)(189003)(6512007)(53936002)(6436002)(107886003)(68736007)(110136005)(81156014)(81166006)(54906003)(52116002)(50226002)(386003)(8936002)(55236004)(6116002)(102836004)(3846002)(2501003)(105586002)(106356001)(1076003)(26005)(478600001)(14454004)(186003)(36756003)(6506007)(316002)(256004)(5660300002)(446003)(8676002)(11346002)(476003)(2616005)(2906002)(25786009)(6486002)(305945005)(7736002)(97736004)(486006)(76176011)(71190400001)(71200400001)(66066001)(86362001)(99286004)(2201001)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1895; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: N2upSvKYzSRzO2lmcFAbhMXCDzStE3Uhwhxj5QxeBF+hxWYkq7CS1YrCJbnMShmo5QozlxNuC4TIecOE5gjc4gtC6TDL4i3rbyVfJMZZLW8WQ4SL695gxR+bTu5byEbYxxT6M1H3TVOC+1NM46x31h9f0Tz/ZHKgYtjrlFp2kYK66QxlAvPpxIp9ht9PeunTihbE491czP2fmi75C/oxCsgaVws988I9kcwF7ipj0ZXpIQF8bsDPgly91vUtru/rz6z+8H48dCx/tYQSp+DI1Eysu882Awc+jHcV6ckFflUZ2bLBrjvB1uaSzNfp3AUCvKcxJbCD/JHkforogLaDUYOI8sO7YYd3uA/Z/Gobd8pl7tGDY+4tnf07pHvsEbrjgNR3W/pTjEmqforSmQVQMeIJCQE2bNow/NP8LlGn8fw= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2b6a9705-d0b4-4103-9274-08d6a5f78a03 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2019 07:59:51.4701 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1895 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-11_06:, , signatures=0 Subject: [dpdk-dev] [PATCH v2 1/2] app/eventdev: start event producers after eventdev 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: Mon, 11 Mar 2019 07:59:57 -0000 From: Pavan Nikhilesh Start event producers after eventdev i.e. consumer is started as in some architectures it might lead to undefined behaviour or events being dropped. Signed-off-by: Pavan Nikhilesh Reviewed-by: Jerin Jacob --- app/test-eventdev/test_perf_atq.c | 31 +++++++++++++++++++++++++ app/test-eventdev/test_perf_common.c | 21 ----------------- app/test-eventdev/test_perf_queue.c | 31 +++++++++++++++++++++++++ app/test-eventdev/test_pipeline_atq.c | 13 ++++++----- app/test-eventdev/test_pipeline_queue.c | 13 ++++++----- 5 files changed, 76 insertions(+), 33 deletions(-) diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_per= f_atq.c index b76ca605b..73f31e564 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -157,7 +157,9 @@ perf_atq_eventdev_setup(struct evt_test *test, struct e= vt_options *opt) uint8_t queue; uint8_t nb_queues; uint8_t nb_ports; + uint16_t prod; struct rte_event_dev_info dev_info; + struct test_perf *t =3D evt_test_priv(test); =20 nb_ports =3D evt_nr_active_lcores(opt->wlcores); nb_ports +=3D (opt->prod_type =3D=3D EVT_PROD_TYPE_ETH_RX_ADPTR || @@ -236,6 +238,35 @@ perf_atq_eventdev_setup(struct evt_test *test, struct = evt_options *opt) return ret; } =20 + if (opt->prod_type =3D=3D EVT_PROD_TYPE_ETH_RX_ADPTR) { + RTE_ETH_FOREACH_DEV(prod) { + ret =3D rte_eth_dev_start(prod); + if (ret) { + evt_err("Ethernet dev [%d] failed to start. Using synthetic producer", + prod); + return ret; + } + + ret =3D rte_event_eth_rx_adapter_start(prod); + if (ret) { + evt_err("Rx adapter[%d] start failed", prod); + return ret; + } + printf("%s: Port[%d] using Rx adapter[%d] started\n", + __func__, prod, prod); + } + } else if (opt->prod_type =3D=3D EVT_PROD_TYPE_EVENT_TIMER_ADPTR) { + for (prod =3D 0; prod < opt->nb_timer_adptrs; prod++) { + ret =3D rte_event_timer_adapter_start( + t->timer_adptr[prod]); + if (ret) { + evt_err("failed to Start event timer adapter %d" + , prod); + return ret; + } + } + } + return 0; } =20 diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_= perf_common.c index f99a6a607..24ece75c3 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -393,21 +393,6 @@ perf_event_rx_adapter_setup(struct evt_options *opt, u= int8_t stride, return ret; } } - - ret =3D rte_eth_dev_start(prod); - if (ret) { - evt_err("Ethernet dev [%d] failed to start." - " Using synthetic producer", prod); - return ret; - } - - ret =3D rte_event_eth_rx_adapter_start(prod); - if (ret) { - evt_err("Rx adapter[%d] start failed", prod); - return ret; - } - printf("%s: Port[%d] using Rx adapter[%d] started\n", __func__, - prod, prod); } =20 return ret; @@ -461,12 +446,6 @@ perf_event_timer_adapter_setup(struct test_perf *t) } rte_service_runstate_set(service_id, 1); } - - ret =3D rte_event_timer_adapter_start(wl); - if (ret) { - evt_err("failed to Start event timer adapter %d", i); - return ret; - } t->timer_adptr[i] =3D wl; } return 0; diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_p= erf_queue.c index 8efdec6f9..d89491364 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -158,7 +158,9 @@ perf_queue_eventdev_setup(struct evt_test *test, struct= evt_options *opt) int ret; int nb_ports; int nb_queues; + uint16_t prod; struct rte_event_dev_info dev_info; + struct test_perf *t =3D evt_test_priv(test); =20 nb_ports =3D evt_nr_active_lcores(opt->wlcores); nb_ports +=3D opt->prod_type =3D=3D EVT_PROD_TYPE_ETH_RX_ADPTR || @@ -251,6 +253,35 @@ perf_queue_eventdev_setup(struct evt_test *test, struc= t evt_options *opt) return ret; } =20 + if (opt->prod_type =3D=3D EVT_PROD_TYPE_ETH_RX_ADPTR) { + RTE_ETH_FOREACH_DEV(prod) { + ret =3D rte_eth_dev_start(prod); + if (ret) { + evt_err("Ethernet dev [%d] failed to start. Using synthetic producer", + prod); + return ret; + } + + ret =3D rte_event_eth_rx_adapter_start(prod); + if (ret) { + evt_err("Rx adapter[%d] start failed", prod); + return ret; + } + printf("%s: Port[%d] using Rx adapter[%d] started\n", + __func__, prod, prod); + } + } else if (opt->prod_type =3D=3D EVT_PROD_TYPE_EVENT_TIMER_ADPTR) { + for (prod =3D 0; prod < opt->nb_timer_adptrs; prod++) { + ret =3D rte_event_timer_adapter_start( + t->timer_adptr[prod]); + if (ret) { + evt_err("failed to Start event timer adapter %d" + , prod); + return ret; + } + } + } + return 0; } =20 diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test= _pipeline_atq.c index fc4cb3bb7..998a56cfd 100644 --- a/app/test-eventdev/test_pipeline_atq.c +++ b/app/test-eventdev/test_pipeline_atq.c @@ -442,6 +442,13 @@ pipeline_atq_eventdev_setup(struct evt_test *test, str= uct evt_options *opt) } } =20 + ret =3D rte_event_dev_start(opt->dev_id); + if (ret) { + evt_err("failed to start eventdev %d", opt->dev_id); + return ret; + } + + RTE_ETH_FOREACH_DEV(prod) { ret =3D rte_eth_dev_start(prod); if (ret) { @@ -451,12 +458,6 @@ pipeline_atq_eventdev_setup(struct evt_test *test, str= uct evt_options *opt) } } =20 - ret =3D rte_event_dev_start(opt->dev_id); - if (ret) { - evt_err("failed to start eventdev %d", opt->dev_id); - return ret; - } - RTE_ETH_FOREACH_DEV(prod) { ret =3D rte_event_eth_rx_adapter_start(prod); if (ret) { diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/te= st_pipeline_queue.c index e35e9eb4c..7da89dad5 100644 --- a/app/test-eventdev/test_pipeline_queue.c +++ b/app/test-eventdev/test_pipeline_queue.c @@ -456,6 +456,13 @@ pipeline_queue_eventdev_setup(struct evt_test *test, s= truct evt_options *opt) } } =20 + ret =3D rte_event_dev_start(opt->dev_id); + if (ret) { + evt_err("failed to start eventdev %d", opt->dev_id); + return ret; + } + + RTE_ETH_FOREACH_DEV(prod) { ret =3D rte_eth_dev_start(prod); if (ret) { @@ -466,12 +473,6 @@ pipeline_queue_eventdev_setup(struct evt_test *test, s= truct evt_options *opt) =20 } =20 - ret =3D rte_event_dev_start(opt->dev_id); - if (ret) { - evt_err("failed to start eventdev %d", opt->dev_id); - return ret; - } - RTE_ETH_FOREACH_DEV(prod) { ret =3D rte_event_eth_rx_adapter_start(prod); if (ret) { --=20 2.21.0