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 D6C1CA046B for ; Thu, 27 Jun 2019 07:50:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 754A525D9; Thu, 27 Jun 2019 07:50:27 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 8397623D for ; Thu, 27 Jun 2019 07:50:26 +0200 (CEST) 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 x5R5oPiJ021314; Wed, 26 Jun 2019 22:50:25 -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=1hdooVgNjt25h702bS1WkmOCSD37QvK/Dtlj3OvzBqs=; b=qfi2Epl3C66H3kqwCM5K+B5Mmb7TmU4d/CImycB/ygj0AsuVBIAzv3C+f0JDYzrN5HLe qttX205ljMN8wT6gnImXqSqKwDaHeCLqcfzrC8uUBF54ml89KVmelLo04UIK+TMwfC1D ImPskM0LAxOgEXbXnenxBjt1EfPmxPPzeN7JGmx7IXyvmQp13uirLESOlMptqMQTubvf TS8qdjkdUuQ1JHG2ddCKXPMZABIW0euHVyaJkfD+g4/Nyukh6Yr9Qq1gWrHwAoJDWAqh HS29naJC2Y1USsHwaDo9iEGOsNA2xLKzh7L5jlrpMcWcC8UV9PR01pZ5Y/XJNfoFJFqO uQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2tch699n76-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 26 Jun 2019 22:50:25 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 26 Jun 2019 22:50:24 -0700 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (104.47.40.55) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 26 Jun 2019 22:50:24 -0700 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=1hdooVgNjt25h702bS1WkmOCSD37QvK/Dtlj3OvzBqs=; b=H5lHG7XkKGdlfMmGKp1cX6L1La3ils2fK8oTW3Xr6FSDqjF6Vcg0QBD+XCBgK3Ez29PpduTKKCV8P1HLXuAvNdYk5iPFRnusn0hscgIEFOCiQOWQJrXm87b/H0QF6+t7rVwFPW4AqcYP/SzZYCTQkIZzNgY+9FqI8eoCisblbqg= Received: from MN2PR18MB2877.namprd18.prod.outlook.com (20.179.20.218) by MN2PR18MB2701.namprd18.prod.outlook.com (20.179.22.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Thu, 27 Jun 2019 05:50:19 +0000 Received: from MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::595e:3b6c:3d12:7285]) by MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::595e:3b6c:3d12:7285%7]) with mapi id 15.20.2008.018; Thu, 27 Jun 2019 05:50:19 +0000 From: Anoob Joseph To: "Carrillo, Erik G" , Jerin Jacob Kollanukkaran , "Rao, Nikhil" , "Gujjar, Abhinandan S" , "Richardson, Bruce" , "De Lara Guarch, Pablo" CC: Narayana Prasad Raju Athreya , "dev@dpdk.org" , Lukas Bartosik , "Pavan Nikhilesh Bhagavatula" , Hemant Agrawal , Nipun Gupta , "Van Haaren, Harry" , =?iso-8859-1?Q?Mattias_R=F6nnblom?= , "Ma, Liang J" Thread-Topic: [PATCH 32/39] eventdev: add routine to launch eventmode workers Thread-Index: AQHVGjLy1z4cUV7AT0Ca+Z1KiJ/QSqaVAhYAgBogGsA= Date: Thu, 27 Jun 2019 05:50:19 +0000 Message-ID: References: <1559583160-13944-1-git-send-email-anoobj@marvell.com> <1559583160-13944-33-git-send-email-anoobj@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: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1323930f-2017-4009-fce6-08d6fac356a1 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MN2PR18MB2701; x-ms-traffictypediagnostic: MN2PR18MB2701: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-forefront-prvs: 008184426E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(376002)(396003)(39860400002)(346002)(13464003)(199004)(189003)(14454004)(33656002)(256004)(6246003)(110136005)(25786009)(3846002)(6116002)(54906003)(14444005)(52536014)(66574012)(8936002)(66066001)(7416002)(5660300002)(66946007)(73956011)(68736007)(76116006)(66446008)(64756008)(66556008)(66476007)(9686003)(71200400001)(486006)(6436002)(478600001)(8676002)(81156014)(99286004)(2906002)(81166006)(74316002)(86362001)(7696005)(76176011)(53936002)(316002)(7736002)(6506007)(11346002)(102836004)(26005)(53546011)(71190400001)(55016002)(446003)(55236004)(229853002)(186003)(476003)(4326008)(305945005)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2701; H:MN2PR18MB2877.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: bZ3t7GW/I4NKAwt5wVTDAUlNtMx/GxuOrHUU5AvEd/JJw0tCRom11t8q6lm/byOHw2xffiwpmv+uEoLoyn07h4OMEhcTES/1rRPQH7W6YBBaLpoM1dy4IwkneKT8K6XYhppWvGwAOw8oJePOX43zetm1H94+/RYDclJykh6ueGXFHaaqNqNFo7L8otBJ+eQsRcx6CPVEU7Lsig/3TmrCj/VmAd5DtTunUu1v68MDzHIPTXUnNapL6nBQjGnHi3eUS9mX/+U1erwvmPi8lbJ0lW/ieG9yynhq23GmosPKW6bMU11g9FkqLwLKWWUWDvQUQjikhe7Df9lcJyrF76YCJN3BotEKFKigc0w1xhdemjcmbfxjqg7koy2gKvoVL4uH90s3UwJtj+05kyY+HIOxV29rlRG/UuehUbB966ReBEI= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 1323930f-2017-4009-fce6-08d6fac356a1 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2019 05:50:19.6348 (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: anoobj@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2701 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-27_02:, , signatures=0 Subject: Re: [dpdk-dev] [PATCH 32/39] eventdev: add routine to launch eventmode workers 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" Hi Erik, Please see inline. Thanks, Anoob > -----Original Message----- > From: Carrillo, Erik G > Sent: Monday, June 10, 2019 8:16 PM > To: Anoob Joseph ; Jerin Jacob Kollanukkaran > ; Rao, Nikhil ; Gujjar, > Abhinandan S ; Richardson, Bruce > ; De Lara Guarch, Pablo > > Cc: Narayana Prasad Raju Athreya ; dev@dpdk.org; > Lukas Bartosik ; Pavan Nikhilesh Bhagavatula > ; Hemant Agrawal > ; Nipun Gupta ; Van > Haaren, Harry ; Mattias R=F6nnblom > ; Ma, Liang J > Subject: RE: [PATCH 32/39] eventdev: add routine to launch eventmode > workers >=20 > Hi Anoob, >=20 > One other observation in-line: >=20 > > -----Original Message----- > > From: Anoob Joseph > > Sent: Monday, June 3, 2019 12:33 PM > > To: Jerin Jacob ; Rao, Nikhil > > ; Carrillo, Erik G ; > > Gujjar, Abhinandan S ; Richardson, Bruce > > ; De Lara Guarch, Pablo > > > > Cc: Anoob Joseph ; Narayana Prasad > > ; dev@dpdk.org; Lukasz Bartosik > > ; Pavan Nikhilesh ; > > Hemant Agrawal ; Nipun Gupta > > ; Van Haaren, Harry > ; > > Mattias R=F6nnblom ; Ma, Liang J > > > > Subject: [PATCH 32/39] eventdev: add routine to launch eventmode > > workers > > > > With eventmode, workers could be drafted differently according to the > > capabilities of the underlying event device. The added function would > > receive an array of such workers and probes the eventmode properties > > to choose the worker. > > > > Signed-off-by: Anoob Joseph > > Signed-off-by: Lukasz Bartosik > > --- >=20 > <...Snipped...> >=20 > > + > > +void __rte_experimental > > +rte_eventmode_helper_launch_worker(struct > > rte_eventmode_helper_conf *mode_conf, > > + struct rte_eventmode_helper_app_worker_params > > *app_wrkr, > > + uint8_t nb_wrkr_param) > > +{ > > + struct rte_eventmode_helper_app_worker_params *match_wrkr; > > + uint32_t lcore_id; > > + struct eventmode_conf *em_conf; > > + > > + if (mode_conf =3D=3D NULL) { > > + RTE_EM_HLPR_LOG_ERR("Invalid conf"); > > + return; > > + } > > + > > + if (mode_conf->mode_params =3D=3D NULL) { > > + RTE_EM_HLPR_LOG_ERR("Invalid mode params"); > > + return; > > + } > > + > > + /* Get eventmode conf */ > > + em_conf =3D (struct eventmode_conf *)(mode_conf->mode_params); > > + > > + /* Get core ID */ > > + lcore_id =3D rte_lcore_id(); > > + > > + /* TODO check capability for rx core */ > > + > > + /* Check if this is rx core */ > > + if (em_conf->eth_core_mask & (1 << lcore_id)) { >=20 > In the above, eth_core_mask is a uint32_t, but RTE_MAX_LCORE=3D128 in the > common config. [Anoob] Will fix this in v2. Will use rte_bitmask APIs instead. =20 >=20 > > + rte_eventmode_helper_start_worker_eth_core(em_conf, > > lcore_id); > > + return; > > + } > > + > > + if (app_wrkr =3D=3D NULL || nb_wrkr_param =3D=3D 0) { > > + RTE_EM_HLPR_LOG_ERR("Invalid args"); > > + return; > > + } > > + > > + /* > > + * This is a regular worker thread. The application would be > > + * registering multiple workers with various capabilities. The > > + * worker to be run will be selected by the capabilities of the > > + * event device configured. > > + */ > > + > > + /* Get the first matching worker for the event device */ > > + match_wrkr =3D rte_eventmode_helper_find_worker(lcore_id, > > + em_conf, > > + app_wrkr, > > + nb_wrkr_param); > > + > > + if (match_wrkr =3D=3D NULL) { > > + RTE_EM_HLPR_LOG_ERR( > > + "No matching worker registered for lcore %d", > > lcore_id); > > + goto clean_and_exit; > > + } > > + > > + /* Verify sanity of the matched worker */ > > + if (rte_eventmode_helper_verify_match_worker(match_wrkr) !=3D 1) > > { > > + RTE_EM_HLPR_LOG_ERR("Error in validating the matched > > worker"); > > + goto clean_and_exit; > > + } > > + > > + /* Launch the worker thread */ > > + match_wrkr->worker_thread(mode_conf); > > + > > +clean_and_exit: > > + > > + /* Flag eth_cores to stop, if started */ > > + rte_eventmode_helper_stop_worker_eth_core(); > > +} >=20 > <...Snipped...> >=20 > Regards, > Erik