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 83F1D5F28 for ; Wed, 27 Feb 2019 21:00: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 x1RK0SWs031330; Wed, 27 Feb 2019 12:00:46 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=QMwwl95kWIZu5mmAhEX6pE04Q1KU3xNpsfktUi39Uyw=; b=be3UxUL5Z5K99u4qjKo0w1HZAg6Wurnj4VbwNH873FBRZHxRlvzk0qa+s6OSGyyaC2Ei g3NuIsGNAIpuChnJkjxHAvsip35eBVzELTXeizQbLBuareMHg96G26UM1w/b4uFeUMvb 1Tx8+TGPMUxF25xQTWgT2kPHY6IugFLRvOVu1GNdEuYaXYwsiXvffjiq0dAA4s90Gvjc LIFLwqNMQR68wz+tB1pLeu1d6fPSSOALny7rkkzwtwhxrMG2PgohIv5hUGoVUu8F6MkX 2n6wHN2q5UqwBEbH8S74fNl0vZyMO+c78UOtAyto59xj3BvgvUKtWCaCyi7HEQKYzoK6 ag== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2qwt361fe4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 27 Feb 2019 12:00:46 -0800 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 27 Feb 2019 12:00:45 -0800 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.55) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 27 Feb 2019 12:00:45 -0800 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=QMwwl95kWIZu5mmAhEX6pE04Q1KU3xNpsfktUi39Uyw=; b=DoZEePX58Hvf1UUApWxCGo0ffWi0PjHrlC6K+tXZ/9zgkjzz8YdGcpdu877BH3jN4yXZW8eq5MgtGLBSfn/e2/GfvExzZBak8+DD5CKv6kHlA5vcVORcNfsh4gw1LHrB3sY1s85xKhV3PLTd/HNi0/kYeIE093ABjBZFZJjvmY8= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB1862.namprd18.prod.outlook.com (10.171.255.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.15; Wed, 27 Feb 2019 20:00:41 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::51f1:659f:d799:d1ad]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::51f1:659f:d799:d1ad%4]) with mapi id 15.20.1643.022; Wed, 27 Feb 2019 20:00:41 +0000 From: Pavan Nikhilesh Bhagavatula To: Jerin Jacob Kollanukkaran CC: "john.mcnamara@intel.com" , "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula Thread-Topic: [dpdk-dev] [PATCH 1/2] app/eventdev: start event producers after eventdev is started Thread-Index: AQHUztcdbXCV4pkAZ0WHntXrHJHnzg== Date: Wed, 27 Feb 2019 20:00:40 +0000 Message-ID: <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: SG2PR04CA0145.apcprd04.prod.outlook.com (2603:1096:3:16::29) 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: [49.205.223.117] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8a8e133d-de39-422a-69c9-08d69cee3fd6 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:CY4PR1801MB1862; x-ms-traffictypediagnostic: CY4PR1801MB1862: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; CY4PR1801MB1862; 23:hQ/MTITzlMFLe7hdOLUL5+BDZoghoQfqtR4rI?= =?iso-8859-1?Q?F/Wsg/Y+KxTo1Br6tlh7QDL0J+/IEQBKzJpK5XKjxGH59/r9NzXj08t2VQ?= =?iso-8859-1?Q?7e3L7VXyfqqru1RnuR5dyXuf8N5rLRZwlNnmP5EaXHOwzYW0jpxrlm7QJk?= =?iso-8859-1?Q?5UaI6mGq+A31aUlhS1qcOfU8KdEWQ/XpW1/PWbdafaPCXciKTlVkS4QwiU?= =?iso-8859-1?Q?QqlFlYkvU+/59FdS/BgaDHWbu32samUnfpnphwiPAH3lWVpEzDmFYJEqrh?= =?iso-8859-1?Q?Ci+oep8Wgd38EoShLPGHahWEP69p9hAVbYIxKU/JtBVwn3AuSNQuKaqIoD?= =?iso-8859-1?Q?WpnLGzQSoZgXXlYD1RnsxRNNPvh5uJySeI/hTeyncTaqdz0RzysDBORTBf?= =?iso-8859-1?Q?s6r304HfPQL50Agk5g3R11k0Kys9Fhv2f2qHvbunYTEzbM2TlSsxRPTsEz?= =?iso-8859-1?Q?PQPcyW13jVCRQMLt+IwOuytPGwcoCfEs7xOW6omXVf38UhFfLK9IPDj4Fe?= =?iso-8859-1?Q?bEnwnsE+mrzTRXAaN4G/I5u5EBHSFBfP1nCMPdYL4P/wKH6X/petZ2cZSL?= =?iso-8859-1?Q?5Haww352xz41v1aV8+7/0w9pk9C9vusrTYAJ+Ue0JjPkH2PRMgN0afqUAU?= =?iso-8859-1?Q?4Jsq48LIqhWnztcneTm1vVXf5aa0Pk+5g4Jxkz+3in4QkuWGR2Z7uluxcJ?= =?iso-8859-1?Q?Ii4IlSseLvhAvGDifnWrYaENxu1/n2+esN8NvNcE3XomnwPoph9ds+ZWoQ?= =?iso-8859-1?Q?nR+QpRVs5coeQjajaMAoKV/W07RzG5q31HRd4/anmuPxrUtauTp5zRfGGS?= =?iso-8859-1?Q?KbrFy+VWQK45Z78ufhcbUh1FLFBt7tEEEcnEzigeU4iSYDOo0USGxFMor4?= =?iso-8859-1?Q?ATCRwkI0GcX/dwnQbMdr9WwrG0y4yiV0d/QiwzE/5a0AFGiiDj6vuj2yL/?= =?iso-8859-1?Q?62jb/Kc6zctWgzvohqYJxaNpIe8focAdk5UV4Bp5v4+3jLkqnsL4u4mvXE?= =?iso-8859-1?Q?2RTJ+uf/uzRt/vxK4RTyvQ8QuXolry7kTeVZT3b1ZELoNmi5r1UzDKbah9?= =?iso-8859-1?Q?Wd4hmI0ltlZ1zqaN2kSWtUGFqJEev0nw7+h1CYW+YVscuQXwfMs5MUjXFq?= =?iso-8859-1?Q?I23LoamO3dLLpEvGl/11mjsyui+OuAKfp6i9djfkgXTtKau5CcCk1nGI9J?= =?iso-8859-1?Q?5ShrtCI84/fS/phHFRFlSD1iYLX5DfX6v5nD/BzEVl/evO5Qnd/Nq3/7Q7?= =?iso-8859-1?Q?k+Zt2igB8TIQy3KjORm7g3hEFaOqLMyO/d3cGxcJg=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 0961DF5286 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39850400004)(396003)(376002)(346002)(366004)(199004)(189003)(6116002)(186003)(6636002)(53936002)(26005)(6512007)(50226002)(6436002)(6486002)(97736004)(476003)(2616005)(71200400001)(25786009)(3846002)(5660300002)(106356001)(71190400001)(105586002)(68736007)(86362001)(305945005)(316002)(8936002)(2906002)(8676002)(478600001)(7736002)(37006003)(107886003)(6862004)(256004)(36756003)(81166006)(4326008)(54906003)(78486014)(1076003)(99286004)(52116002)(486006)(6506007)(386003)(66066001)(14454004)(102836004)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1862; 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: zvsnUTuPWxBup7V2WjIoIc7QxSjIWydtLDZjQFT9PqoNZZPYmiRlRCKVj8zrVlaNSkDJA1a/o8OZddNaFnBUfL5ZKklc3jaIdu+/FmvcYmFyL9XLV2Gt0laVGRIxqOA5psj7TA6ssbv/tVTzvmqTByPonYpFXk9XbFP/7abSwkW9HkOgj83eO4qhI5DKPFNUUfO5rtOHisZ5DFsx13xu2EN+tmrBeh9iZ1ss26JTmXXDT9qWqhrEORZfySXL1kRhHfjihlKbYfkUGAdktHOswKpwD0klB0gwMAG8eFuZxC38sFrAdITtNQ45MbB3/s5JMjk8ju0Om+TQ53diXuDCnyXw64a1aA6wPKq0L0TzUe/pOqz/D/YNGgeAwLKGVt68LKW0UKFqy5wiSZbsjKNsMHJmub5TyZE8dhjtX5oCC9U= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 8a8e133d-de39-422a-69c9-08d69cee3fd6 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2019 20:00:38.8296 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1862 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-02-27_13:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902270133 Subject: [dpdk-dev] [PATCH 1/2] app/eventdev: start event producers after eventdev is started 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, 27 Feb 2019 20:00: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 --- 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