From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0079.outbound.protection.outlook.com [104.47.38.79]) by dpdk.org (Postfix) with ESMTP id 0380F1B21B for ; Fri, 20 Oct 2017 12:30:54 +0200 (CEST) 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=gLUnM5egEn4mdORXm7h6whE61KiIrs4dbFosB0ofYqg=; b=oOCTcmzDnjNocOyq3P2mlyEw103APdgn8cmohzR2KW5Cq0wd1yD8/u2Jg4KuDW7SzQTcX0OqqOY7O1cORfqtxwOyVfIRcWFb0pBxpHphEY8wHtwZb06TwkpvgUOYquNQw8hrFPhoCrtXqvKn0wHnsMcBANoiOBLuaieIn/Vc/dU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT (103.16.71.47) by DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 20 Oct 2017 10:30:51 +0000 Date: Fri, 20 Oct 2017 16:00:33 +0530 From: Pavan Nikhilesh Bhagavatula To: "Van Haaren, Harry" Cc: dev@dpdk.org Message-ID: <20171020103032.GA7404@PBHAGAVATULA-LT> References: <1507814147-8223-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [103.16.71.47] X-ClientProxiedBy: SG2PR0302CA0017.apcprd03.prod.outlook.com (10.170.129.27) To DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 20a636e9-0d0b-415d-ce88-08d517a5a3b6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:DM5PR07MB3467; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 3:WPz1gW3DxVRW8IrOFEWAISFKa494quP+iEBig8kldKC9KbAFudTmvE5gB8FqoVoA1ODXLozWLdc6yaFpgcyKTiI0mnbAQSRzkf+54atluXTeLR2z2IqLQg2Sgk7HDEGPFmnAX83EAzNzUELf5WYy5/bLDDyejzqOC9NhUjxlDsPTQ0sbOlwWtlq5FMjZ3f1yav4QHp3E/23KGy5q/PrvfDhj38K3eEd9ZCGTG/Mkd3mNelFuVzBEiogLm4cGDjet; 25:r8pL9SSWHVcIJfKjc1RJDngZhQfrX0QawtrwavnFl5NxiTOKVTBRsDEq95WZouLHo+3CgeLeYKoS/FA+uC1r5ApG+yCl4FZTW2E8oE3KATCcHgCq9L0gmAzUrWwuxXHJfNYUZ9rjJkTzRx+fv0vlrj1Xpb4GbB2E4n8RVHZ0DLVoFZYH49E09s8uLtvSMC+SZnEefoGSELxt0652ovWYoSNIJ0AbAQlD68YkgMzLGqAY759epNg31ct1D5I+V+WEIQOjRCWQtrkD1tFmEk6LZ2SYv4dt8gdJ1EVW7cMZXizOkpNTkRRmBU2CH0nSL3HHeyps8uHlh29nmJjvtBfOcw==; 31:fulz1uLHBHcyYK92uAR3NUHTJNPL1BsmD83F1gSRWddn/k7XPWvOy1RisTWqcK6n4I0+aD/FfFKkUf4a6jFySsxvXfmByvCuEYDzV/dhzCzmxU0SG1+NSy7nBvTQxI3DXBJVgUYjLHeZ+RbqH3miIt2qQPDGwgZGe4zeXaB62v9h2EdD+M7fjEEsqRQLPMQPIF5UmW7WUqX0ElqN69qMzY54rpNJU2iCr2CMUc27fb8= X-MS-TrafficTypeDiagnostic: DM5PR07MB3467: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 20:a+QoU56kEjOL5ihQl/aYeO255pdVAphxV0854UFjWW7w94K0J8yaLcdvsYKZMDCFz/KfHEjrzdF5vDyLI8BGtZBO01weQJs81kR748/TitXvGVoWA4PSgC1zz4XJJ4i3uPkZCILSiXvMWoVv4YMC8K832UrU92UfDrKcpbayPTC9LO15qnzoIDXDKqkuwa41H8Uoff+Ecur9sHOxdnk7i/X23QyxSWK2Y/9S2dyCvzACVCqBJGbgkVc+AtapidtX7tyFM1GQI4FS60WPAevsw24k1ZSVOC1HWRFMbG8QoR1nDlxuqe7+rq8lIwk5wGPKeWg0Jbvl8zM5k4Z0z/HL0rxXlcUAep1bqTQUrVxPvbR4uasxVxL3kQvi83gi5zlzqqpMyEFzS2SQJkQtP9s4HZERth/iMGXSNFkb47KkQk144YMmqoIZyGuMHudacW8n9fNPGMQSblDpdtxTbnna2zGKPlaf+yGnmZMPNkDAHXfyI6AED+rKczRyGqrexcEeJidR+Xrm7VGsHpNIyUVGpfYiTHie0e7YSJPb8VP3WzjMRyaX1cbvBP02vbjcAvkQ8xwOhpQJTsc7bOG1tviuu7mevT15kXkICYGraGxfvdw= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(100000703101)(100105400095)(3002001)(3231020)(10201501046)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3467; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3467; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 4:c3c7+LN92/QQl0mgZnqBW/ZNwA7FCgQmcToANe6ntoBJNNpFylc4io3dhqCblkxE6OisfnZHw4pOu7CqGE4nJlMdcC1jEdV2qpZtVfYNlsvyvQ1ohz7zrZ7avnt31K8ZrYpAcBdtv3MEliUrdXillcC3TYgTMTITeCTfhmZ20LntdAQCho9ytIFT2XF63sSKwAKHRCuI/spB6ZwQ7/YF5a3mvqtiC+mHFOFLmhbQDdAMIzKn09CfHq1CdXYYTrg9Nt811snzUjX6be6qb65fhHd6bDia8r4keIEb7auz14BvDi6S9HfwneIe8y7aYTG3tRpDxjgupyJoy7grkiDFaA== X-Forefront-PRVS: 0466CA5A45 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(24454002)(199003)(189002)(229853002)(54356999)(2906002)(1076002)(3846002)(81166006)(6116002)(7736002)(101416001)(97736004)(189998001)(5660300001)(4326008)(33656002)(68736007)(305945005)(76176999)(83506002)(8676002)(16526018)(66066001)(47776003)(50986999)(8936002)(478600001)(72206003)(58126008)(16586007)(106356001)(316002)(6246003)(81156014)(6496005)(9686003)(55016002)(6916009)(53546010)(33716001)(6666003)(25786009)(53936002)(42882006)(50466002)(23726003)(2950100002)(105586002)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3467; H:PBHAGAVATULA-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; DM5PR07MB3467; 23:PeE4PO4dJBRxjr3yOPwvZsUYj67v1igQZ2w4aBq02?= =?us-ascii?Q?oxaOovJN5ce5maMl42Q8LOjeWIY411iFRQI/k/0XWQpw4QMBtzmWwGgPHsEp?= =?us-ascii?Q?3IQ1ii7x0I2mvwCjni3UXwJHmpLQzzFFZUVxtp5VEKyzpaOdxqkc4j0f8ds3?= =?us-ascii?Q?zZ14bwFca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c0xqKxUH52n/Zllhr3nc2qAxCQ15QOzgKWehD2e4Xf2Ci2DXgM1pJrxcKoi7mJCK7t4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2017 10:30:51.3377 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3467 Subject: Re: [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event queue config 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, 20 Oct 2017 10:30:55 -0000 On Fri, Oct 20, 2017 at 09:54:36AM +0000, Van Haaren, Harry wrote: > > From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com] > > Sent: Thursday, October 12, 2017 2:16 PM > > To: jerin.jacob@caviumnetworks.com; hemant.agrawal@nxp.com; Van Haaren, > > Harry > > Cc: dev@dpdk.org; Pavan Nikhilesh > > Subject: [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event queue > > config > > > > With the current scheme of event queue configuration the cfg schedule > > type macros (RTE_EVENT_QUEUE_CFG_*_ONLY) are inconsistent with the > > event schedule type (RTE_SCHED_TYPE_*) this requires unnecessary > > conversion between the fastpath and slowpath API's while scheduling > > events or configuring event queues. > > > > This patch aims to fix such inconsistency by using event schedule > > types (RTE_SCHED_TYPE_*) for event queue configuration. > > True - worth cleaning up. > > > > This patch also fixes example/eventdev_pipeline_sw_pmd as it doesn't > > convert RTE_EVENT_QUEUE_CFG_*_ONLY to RTE_SCHED_TYPE_* which leads to > > improper events being enqueued to the eventdev. > > > > Fixes: adb5d5486c39 ("examples/eventdev_pipeline_sw_pmd: add sample app") > > > > Signed-off-by: Pavan Nikhilesh > > > > > > app/test-eventdev/evt_common.h | 21 ------------- > > app/test-eventdev/test_order_queue.c | 4 +-- > > app/test-eventdev/test_perf_queue.c | 4 +-- > > drivers/event/dpaa2/dpaa2_eventdev.c | 4 +-- > > drivers/event/sw/sw_evdev.c | 28 +++++------------ > > examples/eventdev_pipeline_sw_pmd/main.c | 18 +++++------ > > lib/librte_eventdev/rte_eventdev.c | 20 +++++------- > > lib/librte_eventdev/rte_eventdev.h | 54 ++++++++++------------------- > > --- > > test/test/test_eventdev.c | 12 +++---- > > test/test/test_eventdev_sw.c | 16 +++++----- > > 10 files changed, 60 insertions(+), 121 deletions(-) > > > > diff --git a/app/test-eventdev/evt_common.h b/app/test-eventdev/evt_common.h > > index 4102076..ee896a2 100644 > > --- a/app/test-eventdev/evt_common.h > > +++ b/app/test-eventdev/evt_common.h > > @@ -92,25 +92,4 @@ evt_has_all_types_queue(uint8_t dev_id) > > true : false; > > } > > > > -static inline uint32_t > > -evt_sched_type2queue_cfg(uint8_t sched_type) > > -{ > > - uint32_t ret; > > - > > - switch (sched_type) { > > - case RTE_SCHED_TYPE_ATOMIC: > > - ret = RTE_EVENT_QUEUE_CFG_ATOMIC_ONLY; > > - break; > > - case RTE_SCHED_TYPE_ORDERED: > > - ret = RTE_EVENT_QUEUE_CFG_ORDERED_ONLY; > > - break; > > - case RTE_SCHED_TYPE_PARALLEL: > > - ret = RTE_EVENT_QUEUE_CFG_PARALLEL_ONLY; > > - break; > > - default: > > - rte_panic("Invalid sched_type %d\n", sched_type); > > - } > > - return ret; > > -} > > > We should note here, that SCHED_TYPE are integer values: > #define RTE_SCHED_TYPE_ORDERED 0 > #define RTE_SCHED_TYPE_ATOMIC 1 > #define RTE_SCHED_TYPE_PARALLEL 2 > > While the EVENT_QUEUE_CFG_ types were bitmasks (before being removed in this patch) > #define RTE_EVENT_QUEUE_CFG_ATOMIC_ONLY (1ULL << 0) > #define RTE_EVENT_QUEUE_CFG_ORDERED_ONLY (2ULL << 0) > #define RTE_EVENT_QUEUE_CFG_PARALLEL_ONLY (3ULL << 0) > #define RTE_EVENT_QUEUE_CFG_SINGLE_LINK (1ULL << 2) > > > I'm not against this change - but we must be careful that if there was any bit-masking being used previously, > that that will subtly have broken if we change to sched types. I'm reviewing with that in mind.. > > The RTE_EVENT_QUEUE_CFG_ALL_TYPES config flag now means that all SCHED_TYPEs > are valid. Previously this was contained in the bitmask.. this may lead to issues. > > See patch 2/3, where *only* the schedule_type is read, and returned. What if it the "ALL_TYPES" flag is > set on the queue? It will be reported wrongly. Currently there is no integer value for "ALL_TYPES", > so we cannot represent "ALL TYPES" in the return value from get_attr(). > > Am I explaining my reasoning clearly enough? > Hey Harry, I do understand what you mean, my initial thought was to include "ALL_TYPES" as a schedule_type in queue config but this would just complicate things. As these values are only used in config phase we could have a check to see if event_queue_cfg is not "ALL_TYPES" and only then return the value of sched_type else return a error value in case of get_attr(). I think most of the places this specific check is handled, one such missed place would be get_attr(). If we could come to a conclusion to fix it in a correct way I will send out a v2. Thanks, Pavan. > > The patch correctly leaves QUEUE_CFG_SINGLE_LINK as a bitmask, so that bit is ok. > > > > > #endif /* _EVT_COMMON_*/ > > diff --git a/app/test-eventdev/test_order_queue.c b/app/test- > > eventdev/test_order_queue.c > > index beadd9c..1fa4082 100644 > > > Remaining diff was updating the QUEUE_CFG to SCHED_TYPE