From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0049.outbound.protection.outlook.com [104.47.32.49]) by dpdk.org (Postfix) with ESMTP id EBF6D1B24D for ; Fri, 20 Oct 2017 21:09:50 +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=OiASADGbAugZK5QdpNCtT7bb+qWtVRkmx/P+ZzYmMW8=; b=h/STLvWyC/QtZtZDNssgAny90PPeJaFfs6vtOKve9rXlRck+OXD32hOoWxM1VPajojPVh1GYifuCnAZk1OCr7WKdo15VEaHBG8JXU9AG1mDJ7iUweubiauYEKwJEKcL/qijLmEUsMjimjVsfedJE+VlJjrpl3JSNrIg1Hl/uKrQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT (103.16.71.47) by MWHPR07MB3472.namprd07.prod.outlook.com (10.164.192.23) 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 19:09:48 +0000 Date: Sat, 21 Oct 2017 00:39:28 +0530 From: Pavan Nikhilesh Bhagavatula To: "Van Haaren, Harry" Cc: dev@dpdk.org Message-ID: <20171020190927.GA18722@PBHAGAVATULA-LT> References: <1507814147-8223-1-git-send-email-pbhagavatula@caviumnetworks.com> <20171020103032.GA7404@PBHAGAVATULA-LT> 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: SG2PR06CA0097.apcprd06.prod.outlook.com (10.170.138.23) To MWHPR07MB3472.namprd07.prod.outlook.com (10.164.192.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 094482b2-29b0-4193-3a19-08d517ee22ac X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:MWHPR07MB3472; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 3:N34iBzcjdP3F+VXbYa4FocTWCFdCXwsfhodGminpvk6FO/VHGleFh6yz/N3rSxqAguwmhp+dJ/4TvUIXwBtfAxPXvqa2DqkVTVULHLm2Xy85TqoEXBLGv+i66snMBff032YObyKLnJ/wkB/TMSfaudceTbfKZsx+XnUTZVjCctF1f0yBvFfGJkWA6Pplz5eo5rQ58YRaM6yoZZIgVsLdSWH5AZg319dval3DxlfBPJHRphOSibEQOuObbFvrYM60; 25:vgUPgLXhPKsTUM6kWfAm80yJvosmZOy4rB0YsRFpOkVTgFuiv32hvAZY7JUzpgOr2AS9lAWeOHNC8Jb0eP0DCf9T2k4EG/5X8lSGW7vWDPTDxoFU+P/ee/rahwZZ+3vep71jEYW7lz5QIC0DiCn4V7DrFQtQPnyTXE9kSufsCVUFqtQPYAY9Qgkq+6Yxm1KffqSJSV0iRaIs8ekxcJ6nixOBxNwTA/aLUi93law+X29peC/U8A2nhZqc2pURf0YewntIt528PCrR8HZAG4/nfz6TMDx6VppX+kcIUwFJhooMyiRmCqhsn9Hw0uaeNaDsqhUT8Y5zwhBunhVn0SrjCg==; 31:zFyGfvf36xHinXS3aYsEsiteAY/7P0WDu9dn6Z5rEe+wBr97DRj+/97H4c1d5lm/UAUIrlAF1ODBLgVRM1R5zr09YLj7xg9RJCf4c2T7/OR+hMYr/4AG/yZTRQpI6Ro4Gy0Vq+EKJPK0/A7iN4HspctHXa4B9Kuggh8lzG1ERWJa+fJSvpItg7HqgVkm85wPALPSvcHNQ6jQIJYQq58RMBhEiXpHY6e2FZlTsMIgSh4= X-MS-TrafficTypeDiagnostic: MWHPR07MB3472: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 20:5nl1dTHcRNfM6wKgxo3BWU8Fq35E5cDKaXQW42JLYjkQWBPYhSw4osjN3LX7PJIx8fTybfrulX//sinH5DlsaZ2FF4vABB9bu7AFwmTZJKI8wloKMeAeYhHOzyFZHtrKZLfpDso/X+D71ABeTgy5My4n0kWhQrizRjmqER/5H9CQlexKAjP+cYl2dZzhGod25lVDmU8Z+wACMvg/ycRyGdz7eHzEY8HOO2dDSfp2hag7/0fnN0ZREObZRI/EFUCQToz6h/DvImlfphDINUO1DXgecKvN4618fdtm8L0il1GhiQWX1s08SFmUNRqWZNdL7LY72lXPN58akfqm2W+o82tu+Y7ZmOcdSx8g2EfZMe/F1JSqD7sCxT3z1D61UDHwQdV3iE0z2YhMF0NJMibsg64iIGvEzqU6nExx//QC++tesjoHLx3xDHgfXRDNTW3gfwUepT1n4c2xgofGqgFU+Q7fmQZq/rCZDmS3xUI99TOKOHcqdLBtwoEjXCZ11jtQOlB+N2CtE2folItyBy0o7ZxYlZ5ZXPKOc0IJS5wI9Id6Kz5dTvXZiBwYdY66utYWI2hKyHJdy7aqXAF8/r12zlW2nCXMcTZJ1oIjzw0xhf0= X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(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)(10201501046)(3231020)(3002001)(6041248)(20161123562025)(20161123558100)(20161123564025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3472; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3472; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 4:03hmLvPeBMIE2Aq1plRfKz1APHTqi5b6paXMLqyVqHtOLUhb1uYoADR2d7tSQNlRYvuKRofoUbFMvY7NBNboQAtvaCPscWz9vHfOqfU/jpb/3q0PlZgeFTLIuL5i0dV5hh0xRWwW7krIReBTPv44Rosm284QafRJGuYPIZ6gSDYAe/Hr6ltY7ZmHh0kPZBEpbdnzz+yiH/ovcgm1bYHlDYVuoYM0J28lQZIn+n0fgcOhN07divWl4Xvw8EozAN+jwSdH6RiZcGmohzmYwgHxNKqlStxM2Xn4ZnYRDimwSRt3iTE9Msy2HCj6d+OYHVw7SEd6HOx0dhkvxup/uNedS9xVCoyT64Toq+gPcxx7VAfBDBubfgA6sj7o0yusKOdm X-Forefront-PRVS: 0466CA5A45 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(199003)(189002)(24454002)(4326008)(6496005)(97736004)(5660300001)(105586002)(106356001)(72206003)(81156014)(23726003)(81166006)(8676002)(53546010)(33656002)(3846002)(6116002)(50986999)(2906002)(76176999)(1076002)(54356999)(66066001)(6246003)(478600001)(189998001)(6666003)(8936002)(101416001)(305945005)(229853002)(2950100002)(7736002)(33716001)(16586007)(42882006)(55016002)(58126008)(316002)(47776003)(6916009)(68736007)(16526018)(9686003)(50466002)(53936002)(93886005)(83506002)(25786009)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3472; 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; MWHPR07MB3472; 23:8Fk4N6nKPq6AEu3clwv5Qe3hTAuICGkStaDKbXf8d?= =?us-ascii?Q?Z+6J2krWYuoUFCPcOFfH3H7hlufsSWTnpA20iBkLLA71m9ozWSS2+QY1BgEW?= =?us-ascii?Q?lwCTL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vJm4PPcpr2DJ76RTqoZFoUfDnAbYWMIlzvBCVo+Nr9KZ/Ra1QSnclovjpyIkR8Cuza/Y3oLuA8gARGhSYtI8LcUi2zLOHrMKYEfvTwITlRSile0r6YyEYSCZhK/TKsNmV7+0gsK1TISEjW2dEef15UldLh9E0E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2017 19:09:48.1668 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3472 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 19:09:51 -0000 On Fri, Oct 20, 2017 at 04:38:57PM +0000, Van Haaren, Harry wrote: > > From: Pavan Nikhilesh Bhagavatula [mailto:pbhagavatula@caviumnetworks.com] > > Sent: Friday, October 20, 2017 11:31 AM > > To: Van Haaren, Harry > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event > > queue config > > > > 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 > > > > > > > > - } > > > > - 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. > > > Sure, I see two sane-ish options: > > 1) Return an error code from get_attr(), which actually means "ALL TYPES". Feels a bit weird, because an error value is really a valid return. > > 2) Return UINT_MAX (aka, -1) as the scheduling value. Applications that use/care about the scheduling type must check, others can ignore it. > > I'm not sure which of these is the better/less-bad solution. Opinions? -H > I think 1st option would be good, we could use ENOTUNIQ to represent that the queue type is "ALL TYPE". Thoughts? Pavan.