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 718D4A0597; Wed, 8 Apr 2020 12:15:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 73D7E1C12E; Wed, 8 Apr 2020 12:15:03 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2076.outbound.protection.outlook.com [40.107.22.76]) by dpdk.org (Postfix) with ESMTP id 6E3571C0D8; Wed, 8 Apr 2020 12:15:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r0cnX5uLpW7iNPR5rW9SbYwTNxI/fhhRvodc9+G20MY=; b=4hUBHmYjwCpFi0sDXVmzbmc4UQJsQvQAbe5W9ulrZIKG38MSRzp9P6ed2pMi3NtnUsHfTZ/5/wd8DZ0wrbDB1ofc7RByqvuTNS/0XXoSY62fRdcKUOiBar4854QlT8xEqqjFEUxevaBJe9qGjTtr/qinlHdXe0qvWC1u8k2DAdQ= Received: from AM6PR10CA0026.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:89::39) by AM0PR08MB3905.eurprd08.prod.outlook.com (2603:10a6:208:10a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Wed, 8 Apr 2020 10:15:01 +0000 Received: from AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:89:cafe::96) by AM6PR10CA0026.outlook.office365.com (2603:10a6:209:89::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Wed, 8 Apr 2020 10:15:01 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT037.mail.protection.outlook.com (10.152.17.241) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.17 via Frontend Transport; Wed, 8 Apr 2020 10:15:01 +0000 Received: ("Tessian outbound eadf07c3b4bb:v50"); Wed, 08 Apr 2020 10:15:00 +0000 X-CR-MTA-TID: 64aa7808 Received: from f2788a5082ff.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 22500BEC-EA9E-4C10-8172-6DA5943B9310.1; Wed, 08 Apr 2020 10:14:55 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f2788a5082ff.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Apr 2020 10:14:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cIHcZn0/TQTQzIldV3FwU3AWJcF8IktakyU4g+qusLHFmJ69hSvojxbaY3ulQHtq6eJVIASTSKvHmaaIlo4RWlo6qO7SbngU6KPF3agdJz5HgL2UX65YV0JN71+OdwazlyriIBqcB2HBEoE5isGqL/KsJeKVvHJY+Vx3GERqnVV2IFzG2NAfKPAaMJAWp+Fv7iOk1qThPdYSYIJxVRxzaxVXq2/3a7tM6Diu7fMFJ5U81d6gyiLFkLTeoMhjtgISajd0oesXauCbHE+RHVaI9uT8BDUD7nF6ZL3+n6xP+OnF5oM/UfDhMrzV6hnO1btqSOZseWpr7d26GX2bzvYjrQ== 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=r0cnX5uLpW7iNPR5rW9SbYwTNxI/fhhRvodc9+G20MY=; b=IWltZUAYGz6NbIs2IODqYbA/dqpEltUdU+zT37vShdrbGtGI7Lg/iXlmkZB65YIxBKgRVEK/hKC+QgSumuSbKlvS3fjzKGWuHV72QSMa3FJo9vEA5K47dCdgPn/egiAjEgjxdtZC7AAks9ofN7eZU7gZd0eFFqnc5YBw16cEgeVIccbsEc0MS5PhMJylHQ5jkkAHPSoiD5knzsA2EObJabKJB6RBIPQAiUVI9nulFfe0WRsQrTBTBfUAiXC47mYphR9MF4fpZdj4wlOiQr91To3Tmr+YPm9cGz7+Du+N+xLU/NTR10IPVTR3v8N/iNQm25Mz4Cfd5I9EG5MT0RvxIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r0cnX5uLpW7iNPR5rW9SbYwTNxI/fhhRvodc9+G20MY=; b=4hUBHmYjwCpFi0sDXVmzbmc4UQJsQvQAbe5W9ulrZIKG38MSRzp9P6ed2pMi3NtnUsHfTZ/5/wd8DZ0wrbDB1ofc7RByqvuTNS/0XXoSY62fRdcKUOiBar4854QlT8xEqqjFEUxevaBJe9qGjTtr/qinlHdXe0qvWC1u8k2DAdQ= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (10.255.27.75) by VE1PR08MB4687.eurprd08.prod.outlook.com (10.255.113.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Wed, 8 Apr 2020 10:14:54 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::7df3:e3c8:54f7:57c2]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::7df3:e3c8:54f7:57c2%6]) with mapi id 15.20.2878.021; Wed, 8 Apr 2020 10:14:54 +0000 From: Phil Yang To: Honnappa Nagarahalli , "thomas@monjalon.net" , "harry.van.haaren@intel.com" , "konstantin.ananyev@intel.com" , "stephen@networkplumber.org" , "maxime.coquelin@redhat.com" , "dev@dpdk.org" CC: "david.marchand@redhat.com" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , Gavin Hu , Ruifeng Wang , Joyce Kong , nd , "stable@dpdk.org" , nd , nd Thread-Topic: [PATCH v3 07/12] service: remove rte prefix from static functions Thread-Index: AQHWC5IkufRjE4vvrU+egx+1zwCaBqhu/2LA Date: Wed, 8 Apr 2020 10:14:54 +0000 Message-ID: References: <1583999071-22872-1-git-send-email-phil.yang@arm.com> <1584407863-774-1-git-send-email-phil.yang@arm.com> <1584407863-774-8-git-send-email-phil.yang@arm.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: aaae24bf-84d7-4217-bf8b-a31b99066580.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; x-originating-ip: [58.39.116.39] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c181fa8d-415d-4cff-f633-08d7dba5b2cd x-ms-traffictypediagnostic: VE1PR08MB4687:|VE1PR08MB4687:|AM0PR08MB3905: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:551;OLM:551; x-forefront-prvs: 0367A50BB1 X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4640.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(396003)(39860400002)(136003)(366004)(346002)(376002)(55016002)(478600001)(66556008)(66476007)(4326008)(71200400001)(26005)(110136005)(54906003)(316002)(5660300002)(9686003)(2906002)(66946007)(81166007)(64756008)(86362001)(66446008)(52536014)(76116006)(186003)(7416002)(8936002)(6506007)(53546011)(8676002)(7696005)(33656002)(81156014); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: iz3Mtg3+2cpDG9zRMrMDwLvCyCnKwrNukIiZ6yF2m4PWcmzLOzhFMICqTMY1j4LoJ71TsczuRPR2ceRxUBCITxDMNBxHKyHs2RF8yyK2yCuAXJAGU7gGAUUDvUb+DLgecIR370sFADj1yEpLHt8LDKw52B5WG2SuKbWlUU+QhOVc3zdMY/aYNbQ1ilkTl6OOz5wiXomAXtAES3kJCtdxHLWRPXfIJLj4IGHkjrYC9hUbvawXWO+t3yp33nHMSiloiXwvDrFtI0AntF86qmlF5fHHT20nV3xXskIVYBYNLe902NH6a+2I8LwmJ6AqkCx0ZRBRfqEsBv0/V6D9dtweXzt1QSdB8JB23u7sJoE9LFKCbCDzhrEwvvQWMb89SdU1oBqvdewCJHDROMyztfIIyzFvaitwLI13QvG2c4ZZdpjv9uueWQM9wqmZs5pWv94t x-ms-exchange-antispam-messagedata: tGBV6phbWcxd+byRbyd5hULXI+b19TFBGfqy8Bpvhi14pVTEWiIFlTrdvCD6BAhEhc2tkipXGgzam49twIO0NUc10u/bMqb+kbVWLlLhpCtoQl7gAcA7UPOD+Ia9YGSgVQCqP9SIaq0Jw804z8ehHw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4687 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(136003)(346002)(376002)(396003)(39860400002)(46966005)(2906002)(336012)(5660300002)(450100002)(478600001)(86362001)(33656002)(8936002)(26826003)(81166007)(52536014)(9686003)(4326008)(54906003)(356004)(316002)(55016002)(81156014)(8676002)(47076004)(186003)(82740400003)(70206006)(7696005)(26005)(70586007)(110136005)(6506007)(36906005)(53546011); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: f5abef69-1c5e-483a-c218-08d7dba5aea0 X-Forefront-PRVS: 0367A50BB1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PUew1XO2hxctHOyBniMprUUXx+ybFsWhGrF0idMP3Fnc4Mto5iJsJfQkjbirYO7GPRIh+ejNOch2V8zEMxs3joP85A0OcVKhuQMAOzh3663mID3LpQEuUQoSb9RNBSIIco9dvjUKz4CwEjQq5CsPHuXpS4Fcil+DjvJ5G8ihWEzsaCXW7/mYVG5Auwh5KMvD5Wf1QqwVNh1MU3KdSj/j24rcyB0m84FMHcIVkkAoYA1LvWsBeWXmgkUGAUFG3btZRiZH2KEmRoncOYA7dPMy+1Tow3/usVVrW3q1UhRSoCVFnaGCq66amZI2nwh71YLvKqLSGFEtf1NM0cawxjUbrPh8j7qlXtaTijxmzbniHfAi5WcN5aXtCu/3M6Ka79tnvusZsoWbx/LyMFlLFUWB0Qx+uXU0Tfdju2Qo+sBgLV6QkXIPsar2qtRO6u/jFabI2/AqdFGiTWkA/et6YxdzE1frRJQGB7hDw9iu5L9FCuU4XRFiy6s3Bj7QjVGIj0nMvBf5YGTa4tilNM3MZYImqQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 10:15:01.1212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c181fa8d-415d-4cff-f633-08d7dba5b2cd X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3905 Subject: Re: [dpdk-dev] [PATCH v3 07/12] service: remove rte prefix from static functions 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: Honnappa Nagarahalli > Sent: Monday, April 6, 2020 5:35 AM > To: Phil Yang ; thomas@monjalon.net; > harry.van.haaren@intel.com; konstantin.ananyev@intel.com; > stephen@networkplumber.org; maxime.coquelin@redhat.com; > dev@dpdk.org > Cc: david.marchand@redhat.com; jerinj@marvell.com; > hemant.agrawal@nxp.com; Gavin Hu ; Ruifeng Wang > ; Joyce Kong ; nd > ; stable@dpdk.org; Honnappa Nagarahalli > ; nd > Subject: RE: [PATCH v3 07/12] service: remove rte prefix from static func= tions >=20 > >=20 > > Subject: [PATCH v3 07/12] service: remove rte prefix from static functi= ons > > > > Fixes: 3cf5eb1546ed ("service: fix and refactor atomic service accesses= ") > > Fixes: 21698354c832 ("service: introduce service cores concept") > > Cc: stable@dpdk.org > > > > Signed-off-by: Phil Yang > > Reviewed-by: Honnappa Nagarahalli > > --- > > lib/librte_eal/common/rte_service.c | 18 +++++++++--------- > > 1 file changed, 9 insertions(+), 9 deletions(-) > > > > diff --git a/lib/librte_eal/common/rte_service.c > > b/lib/librte_eal/common/rte_service.c > > index b0b78ba..2117726 100644 > > --- a/lib/librte_eal/common/rte_service.c > > +++ b/lib/librte_eal/common/rte_service.c > > @@ -336,7 +336,7 @@ rte_service_runstate_get(uint32_t id) } > > > > static inline void > > -rte_service_runner_do_callback(struct rte_service_spec_impl *s, > > +service_runner_do_callback(struct rte_service_spec_impl *s, > > struct core_state *cs, uint32_t service_idx) { > > void *userdata =3D s->spec.callback_userdata; @@ -379,10 +379,10 > > @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask= , > > if (!rte_atomic32_cmpset((uint32_t *)&s->execute_lock, 0, > 1)) > > return -EBUSY; > > > > - rte_service_runner_do_callback(s, cs, i); > > + service_runner_do_callback(s, cs, i); > > rte_atomic32_clear(&s->execute_lock); > > } else > > - rte_service_runner_do_callback(s, cs, i); > > + service_runner_do_callback(s, cs, i); > > > > return 0; > > } > > @@ -436,7 +436,7 @@ rte_service_run_iter_on_app_lcore(uint32_t id, > > uint32_t serialize_mt_unsafe) } > > > > static int32_t > > -rte_service_runner_func(void *arg) > > +service_runner_func(void *arg) > > { > > RTE_SET_USED(arg); > > uint32_t i; > This is a minor comment. > Since you are touching 'service_runner_func', please consider doing the > below improvement: >=20 > struct core_state *cs =3D &lcore_states[lcore]; > while (lcore_states[lcore].runstate =3D=3D RUNSTATE_RUNNING) { >=20 > The while above can be changed as follows to make it more readable >=20 > while (cs->runstate =3D=3D RUNSTATE_RUNNING) { OK. I will clean it up in the next version. Thanks, Phil >=20 > > @@ -706,7 +706,7 @@ rte_service_lcore_start(uint32_t lcore) > > */ > > lcore_states[lcore].runstate =3D RUNSTATE_RUNNING; > > > > - int ret =3D rte_eal_remote_launch(rte_service_runner_func, 0, lcore); > > + int ret =3D rte_eal_remote_launch(service_runner_func, 0, lcore); > > /* returns -EBUSY if the core is already launched, 0 on success */ > > return ret; > > } > > @@ -785,7 +785,7 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t > > attr_id, } > > >