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 51C52A0613 for ; Fri, 27 Sep 2019 15:22:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E6A271BE96; Fri, 27 Sep 2019 15:22:14 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40082.outbound.protection.outlook.com [40.107.4.82]) by dpdk.org (Postfix) with ESMTP id 29BD41BE93 for ; Fri, 27 Sep 2019 15:22:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QE7z7ML7vkGh2CldripiIy6EyGxRRE+Uz9weNFMLL6VOVpfw2xTj4hWxgyAWN9rvXPTNgcneK/kNKe8Wg6ItqqbE0do4VI0adgFqTQTxq9x+8KYq3XW0vCOVIbHyAkE1Ras0YsZGQndWoExrYS3zJrLo6STLkhmJ/JN8og/HVtiftWLYSlJ7F5H5gHdOQDAn0THzwqsrKKGtMfDv60x1IcIsGjKVbC5IegF9YvJ64iyJ+in1Ms/D4lhR8pZjQBBeuMI6tf8F8gL7j9Zi8+4AZWSUvelH4F24sIxw36dq7L1PLFbN2ToFJsmJ/bdRtUjieVCbI559AFc5oFbLz03zPA== 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=udHqyK3C92dhJZ0EkM7QAvf7XzRFnfKttfx+v7tOGgY=; b=Ps7CBajJcFoak+0tuWZcfEaEvagBOF8rMSA4g3oxpMMgfpoRjZSQUAxyT9uQ60tBXf/sty5nenp/kk6mV+LtFS3Uxe6kPTGuEyCVBA3oUIT5WId3P4aCGKd3YPuTlEDYbVF0SibgbiikSxunO+Lr2aDtGFuKwe2E7XiIvPkb3w/uNJkGSD6XxBBPukQpSALdIEUf3u8uxPVsOl0CN3gQ7qNDARs3mH+TADdNppiIxkPCEuaBZWOc0khAo6Syv83Rg738N54qRC3hINLCPDIwHO2wTzIVuj7xvfZAM0MGkr3jcfIoXDcn9o2A9BSHZc1dc/M5q+lAqUY38bkBDcf1HQ== 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=udHqyK3C92dhJZ0EkM7QAvf7XzRFnfKttfx+v7tOGgY=; b=cxhHG83rfvqkVA/Prv+ahbeVCYNLopLdVjMK3e9K/ACI4Wun73juw8WMJRgWkCnRO6pwjjgi9M+yrhpRKbjZfSs03tOTE2dkL++wv6FjhVfbQ0UxnOGV5Lp/Dbn45wiUdmMlz5UFV04aZ8vJ+1kokA6oVbRs/uh8JStArVMm9bI= Received: from VI1PR04MB4480.eurprd04.prod.outlook.com (20.177.53.224) by VI1PR04MB6142.eurprd04.prod.outlook.com (20.179.27.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.20; Fri, 27 Sep 2019 13:22:12 +0000 Received: from VI1PR04MB4480.eurprd04.prod.outlook.com ([fe80::74ce:408a:d65a:3f4a]) by VI1PR04MB4480.eurprd04.prod.outlook.com ([fe80::74ce:408a:d65a:3f4a%4]) with mapi id 15.20.2284.028; Fri, 27 Sep 2019 13:22:12 +0000 From: Nipun Gupta To: "pbhagavatula@marvell.com" , "jerinj@marvell.com" , "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: AQHVcrx454LtTVfFj0SQox5PfNi9+ac/hfdQ Date: Fri, 27 Sep 2019 13:22:12 +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: <20190924094209.3827-6-pbhagavatula@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nipun.gupta@nxp.com; x-originating-ip: [92.120.1.68] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9172368b-049a-4484-66fc-08d7434db53f x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: VI1PR04MB6142:|VI1PR04MB6142: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 0173C6D4D5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(396003)(136003)(376002)(346002)(39860400002)(13464003)(189003)(199004)(446003)(5660300002)(81166006)(66946007)(81156014)(66476007)(3846002)(71200400001)(66446008)(478600001)(8936002)(2201001)(6246003)(14454004)(26005)(64756008)(66556008)(76116006)(186003)(229853002)(102836004)(71190400001)(6116002)(2501003)(76176011)(44832011)(33656002)(53546011)(305945005)(52536014)(316002)(256004)(14444005)(7736002)(6506007)(4326008)(86362001)(7696005)(110136005)(25786009)(74316002)(476003)(9686003)(486006)(11346002)(55016002)(99286004)(6436002)(66066001)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB6142; H:VI1PR04MB4480.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GR/NYrIPOZHKvIfh3PH/TFKLdTEwekS/eFcGFThtXFjiDILfTReIgMfOqDAz8xfAv1169OTcBheVX6FplHqXl4Lw6lEngm6vlPheGDd7J20cYsvG3Dgv6BK4GbkSy6+hoERoWVpMiNhQxnxQVVx0LDpsVk5yXWUMNSSmAFhoMxbGWyBK5G0OsyesBiH5OENLxdjQnmL2JMTwZyXWCXFKmduaTr6VlVR6Xv+p2wUOL474VPQF3HsPtJdCxwbfld51o4bRvgeysDXRjl96fXuYqCLcpmjEZXmzI5wqVgLHO0zPXLvjxH03v1Qab4OVQJ1/q+r0c0ezHZ795BN3VOrxlYm0WZ4f85HeWONc6DbnLzLaO12ImP5KXuD9uudyI8asoTL7I8snd1BfuQMZL8d91vY+GEXgjluRkxVT1KsQoFk= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9172368b-049a-4484-66fc-08d7434db53f X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Sep 2019 13:22:12.6079 (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: tgf8LftGqly07IfTJXV34cBiIaXsY5HP12hIiAAjES3/nfYTW/j6o9FdrypUT4Nfu4q5I16rORc8Tr82ziC8cQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6142 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" > -----Original Message----- > From: dev On Behalf Of > pbhagavatula@marvell.com > Sent: Tuesday, September 24, 2019 3:12 PM > To: jerinj@marvell.com; bruce.richardson@intel.com; Akhil Goyal > ; Marko Kovacevic ; > Ori Kam ; Radu Nicolau ; > Tomasz Kantecki ; Sunil Kumar Kori > ; Pavan Nikhilesh > Cc: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v4 05/10] examples/l2fwd-event: add eventdev > queue and port setup >=20 > From: Pavan Nikhilesh >=20 > Add event device queue and port setup based on event eth Tx adapter > capabilities. >=20 > 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(-) >=20 > 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" >=20 > +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' i= s more than max event queues. This will also require change in 'event_queue_setup_gener= ic' API where this parameter is being used. > + if (dev_info.max_event_queues < event_d_conf.nb_event_queues) > + event_d_conf.nb_event_queues =3D > dev_info.max_event_queues; > +