From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E4EBAA0520; Thu, 2 Jul 2020 16:46:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11B201D711; Thu, 2 Jul 2020 16:46:34 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60052.outbound.protection.outlook.com [40.107.6.52]) by dpdk.org (Postfix) with ESMTP id 4194B1D70B; Thu, 2 Jul 2020 16:46:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e55vWGGINjMlwyPd8S78LjXIEum/4e9RSzRXgrvBOKFxP2l5NEJhDipOqRrRKjqtDipZXwqc/vpyMP3SlRpMw7q44CtsQS7XhLF6B6iGJT+wsxhlO1aGOQcOhAf7+qRMrc/8l9dYGZNLHN6NUsm2IiwB6l7btLwIXclVHMXIa7ZY5IqmHyqNSsa7ovZCmwEUi6Kli7iOVzcCXGWIk4TPEmjhDoydjiEogXbwCBjxJV+2Is4Ph1ouL6oIkWGw2AkFfG/+u8y+MIisuhQYaWxsv6IN/92NOQvMYA7HslR6ThRn+yqdv/tGqHYUIFAlitfcQNZMsZ0r76udrYBpKrWKWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9NVJn/hw4irBpsmoy0FlVcb13vZ5gCmjkCalUh9xhQs=; b=aUJ4v2jSjvn66vQBE+FtoUtljs2AEjEOUCDRFmu1fILmT3H7Axzs9X1zC8AeFtwoSnvPrJu5+LBTrtx26eqadvYg912Q4cq9fliD7JcctVjYkzOAs/xR8noJuvKyvHbjfz1ZBoOMq5cPpPjcCYWjIO3qBA0U+GRGkHb8/5AtMMnAVv55mKFdhFNBKjANX5B0MAdblqQLBZSwA1MG1uRTWrRkQhikWW1PnufSJI4U1EbKudkmzwbLnHNVzWpjScs/Z4u0LiDFjWglM+WT2xx5RxEHnkfF5dGO5429flcITpXVg7jhk+tE+guqxZDb8enTen3R9e+I6EL+Zg49/xMSag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9NVJn/hw4irBpsmoy0FlVcb13vZ5gCmjkCalUh9xhQs=; b=T8ZKkTMFdBkZN9xNxoIRp6VpG3NZreaOm2GtedTUDSu4QE/wAkud0eASzR9rgvwIndrYoOmciaigLPrKHF+6PcFBX4TFdH8Sgafsg2Hn8Lts6zaejzNx1sOVsCoEEFk8l7r5sPGr5rZcUGk4j3rJXROO5z+hEfKtPGi5GiG8KCs= Received: from HE1PR0402MB3531.eurprd04.prod.outlook.com (2603:10a6:7:83::24) by HE1PR0401MB2235.eurprd04.prod.outlook.com (2603:10a6:3:27::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Thu, 2 Jul 2020 14:46:30 +0000 Received: from HE1PR0402MB3531.eurprd04.prod.outlook.com ([fe80::29c3:f85a:c7b1:5ea6]) by HE1PR0402MB3531.eurprd04.prod.outlook.com ([fe80::29c3:f85a:c7b1:5ea6%6]) with mapi id 15.20.3131.036; Thu, 2 Jul 2020 14:46:30 +0000 From: Apeksha Gupta To: Pavan Nikhilesh Bhagavatula , "jerin.jacob@caviumnetworks.com" CC: "dev@dpdk.org" , "thomas@monjalon.net" , Hemant Agrawal , Nipun Gupta , Akhil Goyal , "stable@dpdk.org" Thread-Topic: [EXT] RE: [dpdk-dev] [PATCH 1/6] app/test-eventdev: Enhancing perf-queue packet flow Thread-Index: AQHWUCBF0YCVnV8Oikar1ewpmHiB8qj0XrLg Date: Thu, 2 Jul 2020 14:46:30 +0000 Message-ID: References: <20200701060626.28627-1-apeksha.gupta@nxp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [47.247.180.7] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: da3493f0-bb1a-45ce-3755-08d81e96b518 x-ms-traffictypediagnostic: HE1PR0401MB2235: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3276; x-forefront-prvs: 0452022BE1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QwanrFMOL+JVlPLbfszfOlfe0mM5ypsWpSbizorQfYCHlltBcO25GzUYm7trBJIGlEB34QWU0UJzEf9RKwoHgSTd9N4XrYRtVIoGygBXPTVOFZepnTBJT5BIqQMZ4j+75jQI+SFWBmjqFgIE31NlM0b9QGNalRg65A6puX3wYNOjOBkplAJ9N0Q22LZnH3LjFtfsRa8Is830THsEaaBivGbIW6p8IyZkXuBUMxK2p4j9yOFiUc9UFNYWF05B3ao16EQxyP7lr89V1pB7hnZmZhev9+ivHQp3QeGm0RVKeYCIj7+hJ/+pvafabiBzbgaUuGDhA18nQgpEc6rxDVeprw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0402MB3531.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(346002)(136003)(39860400002)(366004)(396003)(186003)(316002)(110136005)(54906003)(66556008)(5660300002)(71200400001)(66476007)(64756008)(66946007)(66446008)(2906002)(52536014)(76116006)(26005)(44832011)(6506007)(53546011)(86362001)(7696005)(55016002)(478600001)(8936002)(9686003)(83380400001)(33656002)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: j1Z5ylaLsveUF7GlM3QKN4zhGYxmnYP7NhbBzSBPEoy/+3M1ReIhSIY9/qTBENmMK2mVCxrhYIu6WyW9VmQ4RSTX2HklD0l+0A0EsnnwaF8U+SIIMthNwyMwzqtLYDcwYd9nXiyXnIDa16f5j8X5xb1vfDF/VvTBSTjG7fSrcpoyrOjWykbBoJEmnifZ0i8UbKL1vxcOnfimuC27SVxtamMHQoHMbZzl8pNyegYJ+twFdFYk4veLtgVXhZ32hbooO9K7fpUuBh75tblQczA6Oa8akB1+pgWdj+pV3kbiZakzOKT2M1qCBPCFVL6+URaT5tySQZAxo57rzTgK4K67t2V4JwonX+pb7fP/blrq1KCt5iRNnJM061DbBurYlZ2vuvP7FBE0JcijbCJeyrnZHzTCj9fZR0FXVsEHBjwah/hjJlmJr5FYxz/2OwGMhZ9sRmQoeM4M7rz7zwjHs4qgKeZGaRxlJw09wJmqXbm2vBk= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: HE1PR0402MB3531.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: da3493f0-bb1a-45ce-3755-08d81e96b518 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2020 14:46:30.3826 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: WxKpqCqBa9sXhZ6hbfRdX5A5bvdYxdNxnBZdIRJC7ujGW3IJonFVroTZk/qQVXAegYtnaJWvB0Yu1rfWJvwEPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0401MB2235 Subject: Re: [dpdk-dev] [EXT] RE: [PATCH 1/6] app/test-eventdev: Enhancing perf-queue packet flow 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Pavan Nikhilesh Bhagavatula > Sent: Thursday, July 2, 2020 8:54 AM > To: Apeksha Gupta ; > jerin.jacob@caviumnetworks.com > Cc: dev@dpdk.org; thomas@monjalon.net; Hemant Agrawal > ; Nipun Gupta ; Akhil > Goyal ; stable@dpdk.org > Subject: [EXT] RE: [dpdk-dev] [PATCH 1/6] app/test-eventdev: Enhancing > perf-queue packet flow >=20 > Caution: EXT Email >=20 > >Subject: [dpdk-dev] [PATCH 1/6] app/test-eventdev: Enhancing perf- > >queue packet flow > > > >The event ethernet Tx adapter provides data path for the ethernet > >transmit > >stage. Enqueue a burst of events objects supplied on an event device. > > >=20 > NAK, please use pipeline_atq/queue to test Rx->Tx performance. > Perf_atq/queue should only be used to test event device > performance/latency such as > -> worker. >=20 [Apeksha] Okay, agree. > >Fixes: 2369f73329 ("app/testeventdev: add perf queue worker > >functions") > >Cc: stable@dpdk.org > > > >Signed-off-by: Apeksha Gupta > >--- > > app/test-eventdev/test_perf_common.c | 11 ++++++++ > > app/test-eventdev/test_perf_common.h | 1 + > > app/test-eventdev/test_perf_queue.c | 42 ++++++++++++++++++++--- > >----- > > 3 files changed, 43 insertions(+), 11 deletions(-) > > > >diff --git a/app/test-eventdev/test_perf_common.c b/app/test- > >eventdev/test_perf_common.c > >index b3af4bfeca..341e16eade 100644 > >--- a/app/test-eventdev/test_perf_common.c > >+++ b/app/test-eventdev/test_perf_common.c > >@@ -687,9 +687,20 @@ perf_ethdev_setup(struct evt_test *test, > >struct evt_options *opt) > > return -ENODEV; > > } > > > >+ t->internal_port =3D 1; > > RTE_ETH_FOREACH_DEV(i) { > > struct rte_eth_dev_info dev_info; > > struct rte_eth_conf local_port_conf =3D port_conf; > >+ uint32_t caps =3D 0; > >+ > >+ ret =3D rte_event_eth_tx_adapter_caps_get(opt->dev_id, > >i, &caps); > >+ if (ret !=3D 0) { > >+ evt_err("failed to get event tx adapter[%d] > >caps", i); > >+ return ret; > >+ } > >+ > >+ if (!(caps & > >RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) > >+ t->internal_port =3D 0; > > > > ret =3D rte_eth_dev_info_get(i, &dev_info); > > if (ret !=3D 0) { > >diff --git a/app/test-eventdev/test_perf_common.h b/app/test- > >eventdev/test_perf_common.h > >index d8fbee6d89..716199d8c9 100644 > >--- a/app/test-eventdev/test_perf_common.h > >+++ b/app/test-eventdev/test_perf_common.h > >@@ -48,6 +48,7 @@ struct test_perf { > > int done; > > uint64_t outstand_pkts; > > uint8_t nb_workers; > >+ uint8_t internal_port; > > enum evt_test_result result; > > uint32_t nb_flows; > > uint64_t nb_pkts; > >diff --git a/app/test-eventdev/test_perf_queue.c b/app/test- > >eventdev/test_perf_queue.c > >index 29098580e7..f79e4a4164 100644 > >--- a/app/test-eventdev/test_perf_queue.c > >+++ b/app/test-eventdev/test_perf_queue.c > >@@ -71,10 +71,12 @@ perf_queue_worker(void *arg, const int > >enable_fwd_latency) > > } > > > > static int > >-perf_queue_worker_burst(void *arg, const int enable_fwd_latency) > >+perf_queue_worker_burst(void *arg, const int enable_fwd_latency, > >+ const uint32_t flags) > > { > > PERF_WORKER_INIT; > > uint16_t i; > >+ uint16_t nb_tx; > > /* +1 to avoid prefetch out of array check */ > > struct rte_event ev[BURST_SIZE + 1]; > > > >@@ -111,12 +113,20 @@ perf_queue_worker_burst(void *arg, const > >int enable_fwd_latency) > > } > > } > > > >- uint16_t enq; > >- > >- enq =3D rte_event_enqueue_burst(dev, port, ev, nb_rx); > >- while (enq < nb_rx) { > >- enq +=3D rte_event_enqueue_burst(dev, port, > >+ if (flags =3D=3D TEST_PERF_EVENT_TX_DIRECT) { > >+ nb_tx =3D > >rte_event_eth_tx_adapter_enqueue(dev, port, > >+ ev, > >nb_rx, 0); > >+ while (nb_tx < nb_rx && !t->done) > >+ nb_tx +=3D > >rte_event_eth_tx_adapter_enqueue(dev, > >+ port, ev + > >nb_tx, > >+ nb_rx - nb_tx, > >0); > >+ } else { > >+ uint16_t enq; > >+ enq =3D rte_event_enqueue_burst(dev, port, ev, > >nb_rx); > >+ while (enq < nb_rx) { > >+ enq +=3D rte_event_enqueue_burst(dev, > >port, > > ev + enq, nb_rx > >- enq); > >+ } > > } > > } > > return 0; > >@@ -130,16 +140,26 @@ worker_wrapper(void *arg) > > > > const bool burst =3D evt_has_burst_mode(w->dev_id); > > const int fwd_latency =3D opt->fwd_latency; > >- > >+ const bool internal_port =3D w->t->internal_port; > >+ uint32_t flags; > > /* allow compiler to optimize */ > > if (!burst && !fwd_latency) > > return perf_queue_worker(arg, 0); > > else if (!burst && fwd_latency) > > return perf_queue_worker(arg, 1); > >- else if (burst && !fwd_latency) > >- return perf_queue_worker_burst(arg, 0); > >- else if (burst && fwd_latency) > >- return perf_queue_worker_burst(arg, 1); > >+ else if (burst && !fwd_latency && internal_port) { > >+ flags =3D TEST_PERF_EVENT_TX_DIRECT; > >+ return perf_queue_worker_burst(arg, 0, flags); > >+ } else if (burst && !fwd_latency && !internal_port) { > >+ flags =3D TEST_PERF_EVENT_TX_ENQ; > >+ return perf_queue_worker_burst(arg, 1, flags); > >+ } else if (burst && fwd_latency && internal_port) { > >+ flags =3D TEST_PERF_EVENT_TX_DIRECT; > >+ return perf_queue_worker_burst(arg, 0, flags); > >+ } else if (burst && fwd_latency && !internal_port) { > >+ flags =3D TEST_PERF_EVENT_TX_ENQ; > >+ return perf_queue_worker_burst(arg, 1, flags); > >+ } > > > > rte_panic("invalid worker\n"); > > } > >-- > >2.17.1