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 E1BB2A0613 for ; Fri, 27 Sep 2019 16:43:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC4961BEFD; Fri, 27 Sep 2019 16:43:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 077091BEFB for ; Fri, 27 Sep 2019 16:43:48 +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 x8REeAnR013824; Fri, 27 Sep 2019 07:43:47 -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=lj3fngdtluy5TQfsWtV8Ma+QLhZDjkftYr5WKIIblac=; b=VCNo+D/lgLbPluAYxEzPX9FYqwhwLtMZ6i1iZT+NzDIFMFCPKG1QuFCKqee9VWxKhj68 hQJs3Z3OVB9zrwXuQKDE5HXageXC/qB53Czv/s1MxQH3/Q86E9000cFjIR12gPLgyiEY I9vAxIw8KCbYIgNOsU2oxXF+NUmS6hOOUKqgiENi5oy8X8yX2MNowzrUjA74nsYA+tXm wttYadYqS7rv9zc1TckTYfNCLIYJL0O9QkLOnJF+KgLOR7PecLo8X9rw6ldGECvPWkxH 4DlzOgH26LdmNTCW6M6LsaQrXzHr/OhtzgYnSx9NGOpKuICXXQ4Gw/7cITQ9b15CPKMy NQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2v8vf25r70-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2019 07:43:47 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 27 Sep 2019 07:43:45 -0700 Received: from NAM05-BY2-obe.outbound.protection.outlook.com (104.47.50.55) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 27 Sep 2019 07:43:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dgHagrEfsFe/o8Pr5mTq+yWlkksfrdKGAYuVY6e/Wp21MuuF+wlhUOO48Lbp0ZJsUpJW1LBPoNaE7EpdNwWuxUJxARyi/uNKngDTQamvsKk6bX2jaxG0RJ8svoIRD2n/VmB3hFd/zJJKopVDeHEIyGXvgxnd5THG3qRODTw31E7ym7hlJHqZwNTTFRGeoZnfrKhsFg4SQGH7+7xfmPQi59IJjEFTrxV54MrP4cjCJ9aJiPz8eaG0vg3Nf4I8peISeod0Z+Uh8nDtK45VDXIbpTOj7JmohUIKP2ylrgOFKpyrhwt4nGdLg4PPHZ+9VoPo6ikwvYbEN0mwnGmATpMzvw== 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=lj3fngdtluy5TQfsWtV8Ma+QLhZDjkftYr5WKIIblac=; b=OtMj5GFRCgFCIdy62c1jsIRy1sW11nxSg6+8VyIZ52M+FKhsROByr47KE7VxovQWIFbFVtUqrcmWmEQljA+tIE5ocCUcE9scmXJGEtO9EX50EIHlhtyHrPlaKeKh8tWc7iMMurQw7kX+5LNtfvm4bhGcatqEmwXiklDutCm/jvx+Gh0fnWC8sB0Yb+HmUvrLz5tkjI2cFV7rjqg0yUc0chyrfVv16bqfpbguKjTaHLnOuJ1HYjpvjvmP3HECrvnM9GNYHCLHjKI5tYGt7j3Zg6reAyorQKQ9beYlXtJMJdSrS0zqix6Dp4LwpLqDZyRQgdkTxqAKVO+CyZPuQrqXZg== 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=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lj3fngdtluy5TQfsWtV8Ma+QLhZDjkftYr5WKIIblac=; b=eh622Ilb6OBW9NUBIOga453eZbhE+8/vs6lbjpY69H9d101UwYBvfM/tDF2ufgYPnYcA77OU5pl953NPz3aS+y02XtNeSrgiBve85ALKFCKWtGvo+G5ZfLXgE2YQrPnxFvR7741qbZs0C+JTK8AwqfTWgGa0DEjXzKzFUag6CcY= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.160) by CY4PR1801MB1976.namprd18.prod.outlook.com (10.171.255.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.17; Fri, 27 Sep 2019 14:43:43 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::15d1:f4cf:f510:8fa]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::15d1:f4cf:f510:8fa%4]) with mapi id 15.20.2305.017; Fri, 27 Sep 2019 14:43:43 +0000 From: Pavan Nikhilesh Bhagavatula To: Nipun Gupta , Jerin Jacob Kollanukkaran , "bruce.richardson@intel.com" , Akhil Goyal , "Marko Kovacevic" , Ori Kam , "Radu Nicolau" , Tomasz Kantecki , Sunil Kumar Kori CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 05/10] examples/l2fwd-event: add eventdev queue and port setup Thread-Index: AQHVdTaXbmCcXs5e0kW0y99PPaz6qKc/mQ/A Date: Fri, 27 Sep 2019 14:43:43 +0000 Message-ID: References: <20190919101346.8832-1-pbhagavatula@marvell.com> <20190924094209.3827-1-pbhagavatula@marvell.com> <20190924094209.3827-6-pbhagavatula@marvell.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [122.171.79.240] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 602a2ed9-cff2-40da-3267-08d743591852 x-ms-traffictypediagnostic: CY4PR1801MB1976: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0173C6D4D5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(346002)(39860400002)(136003)(376002)(396003)(189003)(199004)(256004)(52536014)(110136005)(25786009)(33656002)(74316002)(486006)(446003)(86362001)(71190400001)(71200400001)(99286004)(186003)(2906002)(26005)(102836004)(3846002)(7696005)(6116002)(7736002)(476003)(11346002)(305945005)(6636002)(66066001)(5660300002)(8936002)(478600001)(316002)(66946007)(66476007)(66556008)(81156014)(64756008)(66446008)(76116006)(81166006)(14454004)(6506007)(76176011)(9686003)(6246003)(6436002)(55016002)(229853002)(14444005)(4326008)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1976; 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: BCL:0; x-microsoft-antispam-message-info: 2D6zgrNZQjIUWARTJFD5a/k4N5EA0TFqmPs1zqM7NdKFKTM3vWJrRs2BHKQiC6zEfNhcphyv9138RjQWpYbwC9z0YjiZ+1p58fWKKVvRqmFDWUuZZYqbdJ1tduMQj+k0ZdlRzmF5J/fSm2aEq+z7wwnIpPUflbPIp8xQJA+4unxkzBoyTndWucwpfS3kyHS/5+6LGySD3d+MkulDdBJ1+WPBO4+2XnsO96FPNzV8z53CXolCXEMEtKBk0zU/lePj63mWcUIFtqxbJuDfBd4l/zKEtNbkBm2nbXGBEO8KmyYXSottPUmt1Tu6vu9qS4ipzWV2tVKRqydceGHhcKQO0rb2HsD3easMYiUc6qrWJNr7FquQfWwmEfHeHo+x8AaFyM8TrGm5MjkhE2E/7b5nz05OsLi+aWLlxO831sP8udM= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 602a2ed9-cff2-40da-3267-08d743591852 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Sep 2019 14:43:43.3356 (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: Rt2Kbm6oFZjuMWx+fDkiKKoTl82yTrBu2uWWxqTKCvXU3tituQBdKDdPwCL6lloN8RsbHgHGI4lpztfj7FEA6rZzMP6nSnPSAI2O8JvhPzA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1976 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-09-27_06:2019-09-25,2019-09-27 signatures=0 Subject: Re: [dpdk-dev] [PATCH v4 05/10] examples/l2fwd-event: add eventdev queue and port setup 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 v4 05/10] examples/l2fwd-event: add >eventdev >> queue and port setup >> >> From: Pavan Nikhilesh >> >> Add event device queue and port setup based on event eth Tx >adapter >> capabilities. >> >> Signed-off-by: Sunil Kumar Kori >> Signed-off-by: Pavan Nikhilesh >> --- >> examples/l2fwd-event/l2fwd_eventdev.c | 10 + >> examples/l2fwd-event/l2fwd_eventdev.h | 18 ++ >> examples/l2fwd-event/l2fwd_eventdev_generic.c | 179 >> +++++++++++++++++- >> .../l2fwd_eventdev_internal_port.c | 173 ++++++++++++++++- >> 4 files changed, 378 insertions(+), 2 deletions(-) >> > > > >> diff --git a/examples/l2fwd-event/l2fwd_eventdev_generic.c >> b/examples/l2fwd-event/l2fwd_eventdev_generic.c >> index e3990f8b0..65166fded 100644 >> --- a/examples/l2fwd-event/l2fwd_eventdev_generic.c >> +++ b/examples/l2fwd-event/l2fwd_eventdev_generic.c >> @@ -17,8 +17,185 @@ >> #include "l2fwd_common.h" >> #include "l2fwd_eventdev.h" >> >> +static uint32_t >> +eventdev_setup_generic(uint16_t ethdev_count) >> +{ >> + struct eventdev_resources *eventdev_rsrc =3D >get_eventdev_rsrc(); >> + struct rte_event_dev_config event_d_conf =3D { >> + .nb_events_limit =3D 4096, >> + .nb_event_queue_flows =3D 1024, >> + .nb_event_port_dequeue_depth =3D 128, >> + .nb_event_port_enqueue_depth =3D 128 >> + }; >> + struct rte_event_dev_info dev_info; >> + const uint8_t event_d_id =3D 0; /* Always use first event device >only */ >> + uint32_t event_queue_cfg =3D 0; >> + uint16_t num_workers =3D 0; >> + int ret; >> + >> + /* Event device configurtion */ >> + rte_event_dev_info_get(event_d_id, &dev_info); >> + eventdev_rsrc->disable_implicit_release >> =3D !!(dev_info.event_dev_cap & >> + >> RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE); >> + >> + if (dev_info.event_dev_cap & >> RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES) >> + event_queue_cfg |=3D >RTE_EVENT_QUEUE_CFG_ALL_TYPES; >> + >> + /* One queue for each ethdev port + one Tx adapter Single link >> queue. */ >> + event_d_conf.nb_event_queues =3D ethdev_count + 1; > >It may not be true that max event queues are always more than >ethdev_count. >Please use event_d_conf.nb_event_queues as 1, in case ' >ethdev_count + 1' is more than >max event queues.=20 See below. This will also require change in >'event_queue_setup_generic' API where >this parameter is being used. I will fix this in v5. > >> + if (dev_info.max_event_queues < >event_d_conf.nb_event_queues) >> + event_d_conf.nb_event_queues =3D >> dev_info.max_event_queues; >> + The above check would make .nb_event_queues to 1. >