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 62E6444C3 for ; Tue, 12 Mar 2019 21:41:15 +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 x2CKZu1i007660; Tue, 12 Mar 2019 13:41:14 -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=TUu3kES+2wY2S4Fyzp12uVTxkIvXoA9PFf0IJFxD3YRX7xiEYnnjk9Dzm8qE1gH83Bbf YPiVq/EQ/P0kISuARYR8Kkr+yirrnu7tjk0mK+vbrjbk2ghzuQtVX1KYSKXzVl74HoUZ wGCvXxmEEVprPBkxvB5+/TifguiM1jMh+RIZ5u7WDip+o92O33FkURXMv76PaqhXfF/O ldazWo8r9vRO88C8tmz/HfVX4X8i/VIHJbQsdjnur29lOn5gsb9NJoNfVMVE0oJQUBhO ScCQJBBpLKBm3RdDU2l3OxnHK6e8Ciug32hZuffDgjyMNwFY4OSvoVldGOV/jygNPM/S DA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2r69kgtacj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 12 Mar 2019 13:41:14 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 12 Mar 2019 13:41:08 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.54) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 12 Mar 2019 13:41:08 -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=cyVP0+69iNNx3q+08zWqGJp5S+2+3nYdONzg7VGixDHkaFKXPX8dSImjcJZDjneT3MsV5a+AeF278/f2M4U2ckUgL7D4WRV7R6cC30ZaRh+E6D1FQmMo3HLMghf8qqg71FWqerbRYJk2kTJ07FryKoUo/zA2YsWUqdlfsby1jeI= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB1848.namprd18.prod.outlook.com (10.171.255.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.21; Tue, 12 Mar 2019 20:41:06 +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; Tue, 12 Mar 2019 20:41:06 +0000 From: Pavan Nikhilesh Bhagavatula To: Jerin Jacob Kollanukkaran , "harry.van.haaren@intel.com" , "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 v3 1/3] app/eventdev: start event producers after eventdev Thread-Index: AQHU2RPqv+esPUlEZ0CD6tVh7+4I+w== Date: Tue, 12 Mar 2019 20:41:05 +0000 Message-ID: <20190312204037.16141-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: MAXPR0101CA0029.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::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.216.244.113] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4d1667b4-0d05-4bf1-0847-08d6a72b0c4d x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:CY4PR1801MB1848; x-ms-traffictypediagnostic: CY4PR1801MB1848: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; CY4PR1801MB1848; 23:qAOh80001gvan08vruk8imxfdWnBA958EtexW?= =?iso-8859-1?Q?ZGjD75CEmsFOplGep6S08h7m1IroOBvLEM5Uzxnvx13AYtnJI/8v8XXKA5?= =?iso-8859-1?Q?bYFJQn0ZnHYSI1DbVmSe10RlMELHfVZNXJEYGEP9CIw36Ml7+vbCtiaJRD?= =?iso-8859-1?Q?Bmm3Z48r8/Rjqcie/9xiVLH2qw3tLaJcHt37sFGKKSt1+8h3DtVqjIkgPW?= =?iso-8859-1?Q?SA+qKANfxUZMzOVgYGr6jnsmw+n4b1xrf3ElkAT4GlqX/5PFMme6Yblo+z?= =?iso-8859-1?Q?MpHTLuCskrS9tIpnhL4swFnJ7G0K0Q5lvZGDcDdg3LoCa9jlNw/YRf+03C?= =?iso-8859-1?Q?UwjFSzR3ryiCb3jxOUgkL6U3DC5zv+5A5ILO6cJVMDmjiwptX63ku8iHA3?= =?iso-8859-1?Q?/zA1goNTkuPrlE+0QkO3A+k+uS0tQf8h36soWe77wunzxymQ4PAAKajkVK?= =?iso-8859-1?Q?4m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=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09749A275C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(396003)(346002)(376002)(136003)(189003)(199004)(55236004)(25786009)(81156014)(3846002)(81166006)(11346002)(486006)(476003)(2616005)(316002)(305945005)(8676002)(68736007)(2501003)(8936002)(7736002)(66066001)(6116002)(446003)(110136005)(54906003)(1076003)(186003)(256004)(14454004)(99286004)(106356001)(71200400001)(6506007)(105586002)(52116002)(50226002)(107886003)(2906002)(86362001)(71190400001)(4326008)(102836004)(2201001)(5660300002)(478600001)(76176011)(36756003)(26005)(386003)(6436002)(6512007)(6486002)(97736004)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1848; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: ogU3REWFZHfqCsLrTXtKBx2oCeRGUrZAht19mlLckMrtLdksK4Rj9pPbIE2Eu+IP+uZaJd9uM6TNbMowNFPAX+TPNTmv6KkwALgFq3XZ6EvRcdAwbOqm3O5w+mpKXLqCsEaVKHtYV3BGcNq8kA8ia+RF5g4okkpDdCiOmdsJqsVZ4R0/H2WND8YL3sbKtyqCO5WM/2Z0kkq4P/mNjeoEJLjwlTeoc6i3QyrxJU0x9EGY8DAve9xaby7jST5QBCFPtE1PKwS/Zgf0JwOcfJcKFEBiUuWRfiw6Xhe4AbjQ5u1n81aWvZ+9Jjoyw8t1TYNzfb5G9afXsm4ftam9Ps+S86WObagtDvV3clksCDchj3NVE8yeqN49653GdxnazRTzIhVCCFD1WwgtHQaRe63iHgYCVnHi63n7IUMtSyzzBCE= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4d1667b4-0d05-4bf1-0847-08d6a72b0c4d X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Mar 2019 20:41:05.9106 (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: CY4PR1801MB1848 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-12_12:, , signatures=0 Subject: [dpdk-dev] [PATCH v3 1/3] 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: Tue, 12 Mar 2019 20:41:15 -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