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 E1228A0523; Thu, 2 Jul 2020 05:24:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DFBE81D41B; Thu, 2 Jul 2020 05:24:13 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 83F331C1BF; Thu, 2 Jul 2020 05:24:12 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0623Ai3q000758; Wed, 1 Jul 2020 20:24:11 -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=b7bFWKxgz16ZTnoelDl1F12ZsHh36BLUeoC68X14Ngg=; b=ObetLTecptf8T+LfaPA19AW3SxF7OtkCjC+gqDHV/MpZ0p+nhaF3NhM8AjwKx5pN5KKz xOQQeTWoMCvPCGHc1OX9LLJX2Wyz3ue2Byj/GvGqJB5SBR8CqVyFEqb0zbdfukTU9B3x c1ZHhUeyY2xRx6p5kengC6oRG/Tmg5l4mHxczwIIyQO0xZcMIGkhd8qZ8/Y5JaYtPMLK JZ51gmxGckuzs541tvvxA7VJeK3yLEviw9CenO/xxlbfzPjKHKcXT7nFy10BQkdALgN/ pnOIMAhzUO2lizO4DtmPT3pHn2dhD8sudTC4uF3n0lhtxGlzvA+Gaeqw2ofX9pR/Kv/o tw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 31x5mnuer0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 01 Jul 2020 20:24:11 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 1 Jul 2020 20:24:10 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 1 Jul 2020 20:24:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NAEj+FfebTeeLTMPiX794EEYwcqXROW7M7f6t2te9crZ8UUg+z6CloYo5KdDJ9cjqeE54MgpW6/xtFMdbfDH9Rh+QysueMAPEgUTt2KFDKKGw2p1Rr0gGTNi1tqlr1WWjiGjP+POWQMzzpYu3NAhnJdbKzv0HdOTIyBpO2gb4cl5VkU2XJcTtxDg+ysYbvgNRUVcjT+pAaOqQTcdz9TwWA3bVDmVMR2MfnH2sJ2rpjn0fZ5oLFBVfC5WTAHc4CsYHkA91mAMmhNWSIC3MyTKlk5sU3Ukaj6Gam5FcoYhj5Yuo0aY1aI8TMnWq1/M30ta90Yp86W1fzT8izdraOiZDw== 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=b7bFWKxgz16ZTnoelDl1F12ZsHh36BLUeoC68X14Ngg=; b=ih0fQu0J5I2j3ulb4KVX48QHH36uAnVPq5f32nHXqlvnhQmWeRBiUg6guyMb3+2xqObXXLd7szI4tdIIXyQMWiBcaG8uMedI6Wp45Z+GDYj6pI0RshnR56j0uObnxUPQlwIztuZw7FUZtUQ+86avUGVbYv61MACJ54kHC7w8H96kglKE2KhmuQviA7hig1zYmuD4yu6WozZgi25zKFss0jacWnEYczUBmJOGfrjRxiDpZTpNQTOSZbdbqrQAC9okiXtJUJHiF0BcdGQPYwUokWFifgtp5qyW1QZVqoMfKgRj0RXsqfbT94RVqjOcvdrEYMT9vbpUh2ZV1sP/XUprHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b7bFWKxgz16ZTnoelDl1F12ZsHh36BLUeoC68X14Ngg=; b=NXfCbN5Ks4dNTb5UAsEQJQzq52wHn69xWP4sNDi94Mc6F/5y7q4ljrOZ+soveBdMxfw8Y10pndCmCpDorbQAFiBvk78MvwIbBVc3F0jQnM9JA5BVFe5ffmgxCiHZgOTpju1Y2rEFlbFx91JRzjWdIZcK3xU3aPDlt8icLYSrhuE= Received: from BN6PR18MB1140.namprd18.prod.outlook.com (2603:10b6:404:6a::10) by BN6PR18MB1043.namprd18.prod.outlook.com (2603:10b6:404:71::21) 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 03:24:07 +0000 Received: from BN6PR18MB1140.namprd18.prod.outlook.com ([fe80::c999:98bd:79c6:315a]) by BN6PR18MB1140.namprd18.prod.outlook.com ([fe80::c999:98bd:79c6:315a%12]) with mapi id 15.20.3153.023; Thu, 2 Jul 2020 03:24:07 +0000 From: Pavan Nikhilesh Bhagavatula To: Apeksha Gupta , "jerin.jacob@caviumnetworks.com" CC: "dev@dpdk.org" , "thomas@monjalon.net" , "hemant.agrawal@nxp.com" , "nipun.gupta@nxp.com" , "akhil.goyal@nxp.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/6] app/test-eventdev: Enhancing perf-queue packet flow Thread-Index: AQHWT23Nwfi1RUpQgUunREgSaKzxXajzoMeA Date: Thu, 2 Jul 2020 03:24:07 +0000 Message-ID: References: <20200701060626.28627-1-apeksha.gupta@nxp.com> In-Reply-To: <20200701060626.28627-1-apeksha.gupta@nxp.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=marvell.com; x-originating-ip: [122.171.121.97] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4923457b-1aa0-4818-87d9-08d81e37611c x-ms-traffictypediagnostic: BN6PR18MB1043: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 0452022BE1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NkNyVOlBr7xNdbGNCAyOfGWor92v7xtTSDSxBBs/ye2lupeH4hYFa0hYsrHxvEbuQDi8PPJ3PAKFE9tvktF6WauoTyxdw3KPu62Em7dNFtjkU2V5BArJKEgLleSW6De4FMUpnVtOKQKzg6LitlrveGmxSwMhATLsE9xxZQAs3XuRxCwaQn4uLgvBMRyxmcy8+Vy+QAdqB6agoDGxGvrdJ1+hu5fDwtjoFQYh+SEOVYSj2Z2hpIiXFdCUSlKPO0jERkvUCNFmd0J5dIJ3vqgUFbmW6a6HGf6s6WY9t0ULu2YkcRCpgULNKNGLHtBglqvam7Fe8+0cKxDW/Yc2cm0ymg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR18MB1140.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(39850400004)(346002)(396003)(136003)(376002)(8936002)(76116006)(64756008)(66446008)(66556008)(4326008)(71200400001)(66946007)(66476007)(83380400001)(7696005)(54906003)(55016002)(9686003)(316002)(110136005)(478600001)(33656002)(52536014)(6506007)(26005)(5660300002)(86362001)(186003)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: Uk52EwunNsHGfX9igZ1zYZQdilrbXfQNCl9m3dFJb7tkwfLZCSoKPCl9Y7tt9ODlb0tl5cpdglwRdoovy7d4PgGva98MZ0mNv3a6PNZRfZ76eISw1TcOvCm4+4XvjxqgmPzW5tyoLA0fWtuaI7ilL5KkgmUS+QlpPrIxgCnimOfnhIVQQKInWVcIqrh810lCO9vqyBIJgKZp27ut5Jd8pSWcXA6oWUmeaQNCMHoCavswB2WOwx+PwHI2lSBnjFiztKRFc/phIsIjV+k5JlayyJOPicL23K+D3JE67sGCAix1ISMyt3TQBPW8zHhBSImFmudSRBIoDYZlg9RA/dmKOCJRPWu35+ByYUvGAQRGUXC4cU9I7dKVzqMAOOAyyZeWm0MrI9pcmqt7fwkqCuOGMWBKeerC5qnlPGABN9oAIq2jPsQTRwk38eEL7isS6dMQxxnimooFkrcWqh3nM78grBX72SSJPZVb5i16yWOySQ1Bhpk1aBwd0SqJ2RcR45BM x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN6PR18MB1140.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4923457b-1aa0-4818-87d9-08d81e37611c X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2020 03:24:07.2260 (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-CrossTenant-userprincipalname: C1cE5fYg0gUcU1h5WDkOVu+sfSSqunIVxp0yBO5YbNR0Le5kQ+ygJoyOezrc4Ybl7lFnC5IDPKEsRBJCa2NhXcVA4E+5Am4aLcUGHOH0UI4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR18MB1043 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-02_01:2020-07-01, 2020-07-01 signatures=0 Subject: Re: [dpdk-dev] [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" >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. > 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. >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