From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 48E2A2C2B for ; Fri, 10 May 2019 10:19:13 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2019 01:19:12 -0700 X-ExtLoop1: 1 Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga005.fm.intel.com with ESMTP; 10 May 2019 01:19:11 -0700 Received: from orsmsx160.amr.corp.intel.com (10.22.226.43) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 10 May 2019 01:19:11 -0700 Received: from orsmsx122.amr.corp.intel.com ([169.254.11.68]) by ORSMSX160.amr.corp.intel.com ([169.254.13.110]) with mapi id 14.03.0415.000; Fri, 10 May 2019 01:19:11 -0700 From: "Rao, Nikhil" To: Thomas Monjalon CC: "dev@dpdk.org" , "jerinj@marvell.com" , "matias.elo@nokia.com" Thread-Topic: [dpdk-dev] [PATCH v2] eventdev: fix Rx adapter event flush logic Thread-Index: AQHVBlliUMWd7NIBBUaZ0CGTjuw2FqZjoHEAgABiBiA= Date: Fri, 10 May 2019 08:19:10 +0000 Message-ID: <1F668163772FA946975B9466A9DFF729EDE0653F@ORSMSX122.amr.corp.intel.com> References: <1557376797-10609-1-git-send-email-nikhil.rao@intel.com> <1557377440-11616-1-git-send-email-nikhil.rao@intel.com> <51938683.yaEMjVf3gu@xps> In-Reply-To: <51938683.yaEMjVf3gu@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGY0ZmU1ZGItMTcyMy00NjRiLTliZTUtMjEzNmYzNzlmMWY1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibnZKVDZVXC9cL0dqWjdSQkpXckRqMHNnZmJ5eTBJUnVscXJuWEN0aUNkZkJaMFozb2lhMlRQXC9nZE9icnlKb1h3OCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] eventdev: fix Rx adapter event flush logic 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: Fri, 10 May 2019 08:19:13 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Friday, May 10, 2019 12:48 AM > To: Rao, Nikhil > Cc: dev@dpdk.org; jerinj@marvell.com; matias.elo@nokia.com > Subject: Re: [dpdk-dev] [PATCH v2] eventdev: fix Rx adapter event flush l= ogic >=20 > 09/05/2019 06:50, Nikhil Rao: > > The Rx adapter flushes events only if it has BATCH_SIZE events > > buffered where BATCH_SIZE is set to 32, e.g., if a single packet is > > sent, it is never passed to eventdev. Fix this issue by adding an > > event buffer flush either when a Rx queue is found to be empty or the > > adapter service function has processed the max number of packets for > > an invocation. > > > > Bugzilla ID: 277 > > > > Fixes: 6b83f5935543 ("eventdev: add event buffer flush in Rx adapter") > > > > Reported-by: Matias Elo > > > > Signed-off-by: Nikhil Rao > > --- > > --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c > > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > > @@ -872,7 +872,7 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b) > > - if (buf->count >=3D BATCH_SIZE) > > + if (buf->count) >=20 > I don't this code, but it looks you are removing a test which was probabl= y > done on purpose. The previous test (against BATCH_SIZE) resulted in events permanently sitt= ing in the buffer if the number of events in the buffer was less than BATCH_SIZ= E.=20 > By the way, you should make your test explicit with "!=3D 0". >=20 Done. Thanks, Nikhil=20 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 B003FA0096 for ; Fri, 10 May 2019 10:19:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 65BA14C8D; Fri, 10 May 2019 10:19:14 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 48E2A2C2B for ; Fri, 10 May 2019 10:19:13 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2019 01:19:12 -0700 X-ExtLoop1: 1 Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga005.fm.intel.com with ESMTP; 10 May 2019 01:19:11 -0700 Received: from orsmsx160.amr.corp.intel.com (10.22.226.43) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 10 May 2019 01:19:11 -0700 Received: from orsmsx122.amr.corp.intel.com ([169.254.11.68]) by ORSMSX160.amr.corp.intel.com ([169.254.13.110]) with mapi id 14.03.0415.000; Fri, 10 May 2019 01:19:11 -0700 From: "Rao, Nikhil" To: Thomas Monjalon CC: "dev@dpdk.org" , "jerinj@marvell.com" , "matias.elo@nokia.com" Thread-Topic: [dpdk-dev] [PATCH v2] eventdev: fix Rx adapter event flush logic Thread-Index: AQHVBlliUMWd7NIBBUaZ0CGTjuw2FqZjoHEAgABiBiA= Date: Fri, 10 May 2019 08:19:10 +0000 Message-ID: <1F668163772FA946975B9466A9DFF729EDE0653F@ORSMSX122.amr.corp.intel.com> References: <1557376797-10609-1-git-send-email-nikhil.rao@intel.com> <1557377440-11616-1-git-send-email-nikhil.rao@intel.com> <51938683.yaEMjVf3gu@xps> In-Reply-To: <51938683.yaEMjVf3gu@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGY0ZmU1ZGItMTcyMy00NjRiLTliZTUtMjEzNmYzNzlmMWY1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibnZKVDZVXC9cL0dqWjdSQkpXckRqMHNnZmJ5eTBJUnVscXJuWEN0aUNkZkJaMFozb2lhMlRQXC9nZE9icnlKb1h3OCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] eventdev: fix Rx adapter event flush logic 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" Message-ID: <20190510081910.GkapTk5H1TmTJx1hy91h4gZ1TJH1y0vdcAqj6tvy6rY@z> > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Friday, May 10, 2019 12:48 AM > To: Rao, Nikhil > Cc: dev@dpdk.org; jerinj@marvell.com; matias.elo@nokia.com > Subject: Re: [dpdk-dev] [PATCH v2] eventdev: fix Rx adapter event flush l= ogic >=20 > 09/05/2019 06:50, Nikhil Rao: > > The Rx adapter flushes events only if it has BATCH_SIZE events > > buffered where BATCH_SIZE is set to 32, e.g., if a single packet is > > sent, it is never passed to eventdev. Fix this issue by adding an > > event buffer flush either when a Rx queue is found to be empty or the > > adapter service function has processed the max number of packets for > > an invocation. > > > > Bugzilla ID: 277 > > > > Fixes: 6b83f5935543 ("eventdev: add event buffer flush in Rx adapter") > > > > Reported-by: Matias Elo > > > > Signed-off-by: Nikhil Rao > > --- > > --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c > > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > > @@ -872,7 +872,7 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b) > > - if (buf->count >=3D BATCH_SIZE) > > + if (buf->count) >=20 > I don't this code, but it looks you are removing a test which was probabl= y > done on purpose. The previous test (against BATCH_SIZE) resulted in events permanently sitt= ing in the buffer if the number of events in the buffer was less than BATCH_SIZ= E.=20 > By the way, you should make your test explicit with "!=3D 0". >=20 Done. Thanks, Nikhil=20