From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0081.outbound.protection.outlook.com [104.47.36.81]) by dpdk.org (Postfix) with ESMTP id 70B1C1B01D for ; Thu, 11 Jan 2018 18:28:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qLYZ20Cirhp2hP9c0YGNXFWOo16LK9/rY8WOp3doPcc=; b=a0YYvApDfTFulslA5aSf+bWUImSDi1SwMtdQnvQphTmu9bmFmTsACzQ27lIFjsOHm8edF9nxnDiV7DBIkUxzAVehwQOwt2L+kcxLf13XpuJJqsGbIKdhZaFusjB8MqpwULsvssPs+htabI5O7HKciJ+J2z0OA+K0K/lGJFesHZE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT (103.16.71.47) by CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Thu, 11 Jan 2018 17:28:55 +0000 Date: Thu, 11 Jan 2018 22:58:32 +0530 From: Pavan Nikhilesh To: Erik Gabriel Carrillo , jerin.jacob@caviumnetworks.com, nipun.gupta@nxp.com, hemant.agrawal@nxp.com Cc: dev@dpdk.org Message-ID: <20180111172831.7ljnkrzjxmlxd7vs@Pavan-LT> References: <1512158458-22661-1-git-send-email-erik.g.carrillo@intel.com> <1515630074-29020-1-git-send-email-erik.g.carrillo@intel.com> <1515630074-29020-9-git-send-email-erik.g.carrillo@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515630074-29020-9-git-send-email-erik.g.carrillo@intel.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Originating-IP: [103.16.71.47] X-ClientProxiedBy: SG2PR0601CA0018.apcprd06.prod.outlook.com (10.170.128.28) To CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0977af1e-3a2a-4533-262e-08d55918cb68 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020069)(4652020)(5600026)(4604075)(4534099)(4602075)(4627195)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:CY4PR07MB3462; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3462; 3:ZeCxOaqemKrfXTrgQsBpjUmClC2rFbYMNIIRLagYSxxVNUndMw3ZQ1j4UorgzUQjSDa6mmJyZ7CXu+hrEcYZowH624lzIkDKX4aw5dekkZLWJJ/XL+Vx+AdkIEeJ0yh+5Iqc4I0CKf094o7JdRdJ8M03qfzdp915bNQyxRRsUU6pxD0C4o/vjv/uGBIt8xDwfxnWf8jFjrrqQC0FdRpF+kNeatt+lXNFZmpzFB0WzuBLWaMQZJ39MntUPUmKyT55; 25:xcPeTB0Lp5XAzBt0hB/wSDNUw8JRym6oPIuPGBU86o4eivfgniD+msJ3nKAgTCfplG2Rvh6PyiPCzAmcj+tz1pV37sdTh2qWXozpg4LIlfAC+5QQQoprtd92fCsNTEWPI2o8LI7eqnrnRU1B72xndKE7wPchvn7vWOcLHJqzwRkqhE68RVVpYqsbKmS8ZbKqOihTJiT6agoFDLGGdbgeGUlQVhCKKsEV2T2Ugu3xY/9ETcRoRLRWYxl1OvkMS/Dp4QsFggdigH0LC45FmJ8C0R1Y+SXxw8drbI77CVG6u8nSx4mOunol9We+Mhta3u1lM0+oMj90zeZRCcaDVo9CJQ==; 31:jw39GtAjCx8+NYAvcpT8Zt56WRc3YFZhQ6I7GxKtbl/CiUn0XwGKI4M5w03NMb1FdG5CJVqmRb/Ls0SQsbYfBlzyphWKxh3IFxO0fsXG8iQlca+NCJnPeXF8pAuUQAaQLuqR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3CLd0fmfmWj/sbcEDEFpBq1Aau X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(10201501046)(3002001)(3231023)(944501134)(6041268)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:CY4PR07MB3462; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3462; X-Forefront-PRVS: 0549E6FD50 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(396003)(366004)(39380400002)(39860400002)(376002)(199004)(189003)(24454002)(53936002)(52116002)(81156014)(8676002)(72206003)(42882006)(1076002)(2950100002)(6496006)(97736004)(33896004)(386003)(59450400001)(6246003)(478600001)(4326008)(7736002)(76176011)(81166006)(25786009)(55016002)(6666003)(58126008)(105586002)(305945005)(9686003)(33716001)(106356001)(8656006)(3846002)(68736007)(47776003)(83506002)(316002)(50466002)(16526018)(8936002)(229853002)(6116002)(23726003)(2906002)(5660300001)(66066001)(16586007)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3462; H:Pavan-LT; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3462; 23:nLAv8Ep2v3mhC97Nzg3DaUPIuZog86RJCFT72dIeB?= =?us-ascii?Q?PGPSUNhJwVj18txgUhWgpR0L0+p4pSrEOl+tCOu+rUwlUEp/Oseaef7KdmuD?= =?us-ascii?Q?Ny9r40CS2zylpHfClBRvm/p88rj3AHup1qiraqYmtBX06qnIh3aBiurLx3p5?= =?us-ascii?Q?KeEgLV4rKqBhmbTzN628wN3Fm4hNasG5epl0ZFplTGG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ke8vofZdBvQZH77npkQtLCH3beQL+7K9q4YF/c7IaTQJPdMyFpG1Poa75wfqNqBueLMH+rGSPM/VxEPH5Tl6OuGJbFgPFiM+eGSM1ToGNFU+EEvt6 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2018 17:28:55.1355 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0977af1e-3a2a-4533-262e-08d55918cb68 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3462 Subject: Re: [dpdk-dev] [PATCH v6 08/23] eventtimer: add adapter start/stop definitions 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: , X-List-Received-Date: Thu, 11 Jan 2018 17:28:58 -0000 On Wed, Jan 10, 2018 at 06:20:59PM -0600, Erik Gabriel Carrillo wrote: > Add definitions to the default software implementation for the functions > that start and stop adapter instances. > > Signed-off-by: Erik Gabriel Carrillo > --- > lib/librte_eventdev/rte_event_timer_adapter.c | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 deletions(-) > > diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c > index 38f4dcf..27e6226 100644 > --- a/lib/librte_eventdev/rte_event_timer_adapter.c > +++ b/lib/librte_eventdev/rte_event_timer_adapter.c > @@ -565,7 +565,18 @@ sw_event_timer_adapter_uninit(struct rte_event_timer_adapter *adapter) > static int > sw_event_timer_adapter_start(const struct rte_event_timer_adapter *adapter) > { > - RTE_SET_USED(adapter); > + int ret; > + struct rte_event_timer_adapter_sw_data *sw_data; > + > + sw_data = adapter->data->adapter_priv; > + > + ret = rte_service_component_runstate_set(sw_data->service_id, 1); > + if (ret < 0) > + return ret; > + > + /* If no service core is mapped to the service, fail */ > + if (!rte_service_runstate_get(sw_data->service_id)) > + return -ENOENT; If a service is mapped to more than one service core then the service is executed in parallel if it is multi thread safe else every core takes a lock and executes the service callback. Now in case of timer adapter the following piece of code arms the timer on the service core that currently runs the service. rte_timer_reset_sync(tim, cycles, SINGLE, rte_lcore_id(), sw_event_timer_cb, msg->evtim); This might lead to delay in timer expiry being called as rte_timer_manage() has to be scheduled on the same service core again. The immediate solution that comes to my mind is to limit the number of service cores mapped to 1. Thoughts? Cheers, Pavan. > > return 0; > } > @@ -573,9 +584,9 @@ sw_event_timer_adapter_start(const struct rte_event_timer_adapter *adapter) > static int > sw_event_timer_adapter_stop(const struct rte_event_timer_adapter *adapter) > { > - RTE_SET_USED(adapter); > - > - return 0; > + struct rte_event_timer_adapter_sw_data *sw_data; > + sw_data = adapter->data->adapter_priv; > + return rte_service_component_runstate_set(sw_data->service_id, 0); > } > > static void > -- > 2.6.4 >