From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B05F5A0096 for ; Sun, 2 Jun 2019 12:46:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 27C4E49DF; Sun, 2 Jun 2019 12:46:29 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B7F262AB; Sun, 2 Jun 2019 12:46:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jun 2019 03:46:25 -0700 X-ExtLoop1: 1 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 02 Jun 2019 03:46:24 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 2 Jun 2019 03:46:24 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 2 Jun 2019 03:46:24 -0700 Received: from shsmsx106.ccr.corp.intel.com ([169.254.10.113]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.98]) with mapi id 14.03.0415.000; Sun, 2 Jun 2019 18:46:22 +0800 From: "Wang, Xiao W" To: "Singh, Jasvinder" CC: "dev@dpdk.org" , "Dumitrescu, Cristian" , "stable@dpdk.org" Thread-Topic: [PATCH] net/softnic: fix pipeline time calculation Thread-Index: AQHVCyi60AUum/nqs0uYdsR6yzvfvaaE4pSAgANih0A= Date: Sun, 2 Jun 2019 10:46:22 +0000 Message-ID: References: <20190515135904.81415-1-xiao.w.wang@intel.com> <54CBAA185211B4429112C315DA58FF6D3FD15433@IRSMSX101.ger.corp.intel.com> In-Reply-To: <54CBAA185211B4429112C315DA58FF6D3FD15433@IRSMSX101.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzkyNjU0OTMtYmZiZS00NzJkLWFlZDQtMmI5MGUwNzFhNzkzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibUlwTXhuQnI3UEZXMVJiTndnUndidUlDcjBhK25WYmdsSHVuYmZ2d3NLcGV0ZElGTzlUc1NsTVNSZU93Y0RGKyJ9 dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/softnic: fix pipeline time calculation 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: Singh, Jasvinder > Sent: Friday, May 31, 2019 10:46 PM > To: Wang, Xiao W > Cc: dev@dpdk.org; Dumitrescu, Cristian ; > stable@dpdk.org > Subject: RE: [PATCH] net/softnic: fix pipeline time calculation >=20 >=20 >=20 > > -----Original Message----- > > From: Wang, Xiao W > > Sent: Wednesday, May 15, 2019 2:59 PM > > To: Singh, Jasvinder > > Cc: dev@dpdk.org; Dumitrescu, Cristian ; > > Wang, Xiao W ; stable@dpdk.org > > Subject: [PATCH] net/softnic: fix pipeline time calculation > > > > When a new pipeline is added to a thread, the "time_next_min" value may > > need update, otherwise this pipeline won't get served timely. > > > > Fixes: 70709c78fda6 ("net/softnic: add command to enable/disable pipeli= ne") > > Cc: stable@dpdk.org > > > > Signed-off-by: Xiao Wang > > --- > > drivers/net/softnic/rte_eth_softnic_thread.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c > > b/drivers/net/softnic/rte_eth_softnic_thread.c > > index 855408e98..2b482117d 100644 > > --- a/drivers/net/softnic/rte_eth_softnic_thread.c > > +++ b/drivers/net/softnic/rte_eth_softnic_thread.c > > @@ -337,6 +337,9 @@ softnic_thread_pipeline_enable(struct > pmd_internals > > *softnic, > > tdp->timer_period =3D (rte_get_tsc_hz() * p->timer_period_ms) > / > > 1000; > > tdp->time_next =3D rte_get_tsc_cycles() + tdp->timer_period; > > > > + if (tdp->time_next < td->time_next_min) > > + td->time_next_min =3D tdp->time_next; > > + > > td->n_pipelines++; > > > > /* Pipeline */ > > @@ -522,6 +525,9 @@ thread_msg_handle_pipeline_enable(struct > > softnic_thread_data *t, > > (rte_get_tsc_hz() * req->pipeline_enable.timer_period_ms) / > > 1000; > > p->time_next =3D rte_get_tsc_cycles() + p->timer_period; > > > > + if (p->time_next < t->time_next_min) > > + t->time_next_min =3D p->time_next; > > + > > t->n_pipelines++; > > > > /* Response */ > > -- > > 2.15.1 >=20 >=20 > Hi Wang, >=20 > Timer values for pipelines and thread level message handlers are already > adjusted in runtime function rte_pmd_softnic_run_internal(). In runtime > function, the values of t->time_next_min is updated as well. IMO, above > changes not needed. Could you help with the case where timer adjustments = in > runtime not working? Hi Jasvinder, the values of t->time_next_min is updated only when the pipeline message an= d thread message get handled, but not when the pipeline is added to that th= read. E.g. when a thread t->time_next_min is ~100ms later, and a new pipeli= ne is added to that thread with timer_period_ms parameter set to 10ms, then= this pipeline's control message will not be served until 100ms later. BRs, Xiao >=20 > Thanks, > Jasvinder >=20