From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0049.outbound.protection.outlook.com [104.47.36.49]) by dpdk.org (Postfix) with ESMTP id 7D8B61B300 for ; Sat, 21 Oct 2017 19:28:19 +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=B+Bqs9ccOhwQc641vb6BFYEt8+CbamazsazrM3KQwaA=; b=LJPwyl5yFACviYzSwSrAx3eCg58nnqLGPhuPQjgeSBLaXMnAXYwhklD0MEfw1k04Hm1sWhP4/LYlo2JCkQRjZ2d7M+5zt/vJKSBehHrHB8gb3uZCmsUpS6CtIOMgLT9BXpmpo/8YMbGFtu6n/z9YSQvIn3xtC06a6IWiRQmwdUU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (171.76.118.225) by CO2PR07MB2519.namprd07.prod.outlook.com (10.166.201.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Sat, 21 Oct 2017 17:28:16 +0000 Date: Sat, 21 Oct 2017 22:57:58 +0530 From: Jerin Jacob To: Pavan Nikhilesh Bhagavatula Cc: "Van Haaren, Harry" , dev@dpdk.org Message-ID: <20171021172757.GA1468@jerin> References: <1507814147-8223-1-git-send-email-pbhagavatula@caviumnetworks.com> <20171020103032.GA7404@PBHAGAVATULA-LT> <20171020190927.GA18722@PBHAGAVATULA-LT> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171020190927.GA18722@PBHAGAVATULA-LT> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [171.76.118.225] X-ClientProxiedBy: MA1PR0101CA0055.INDPRD01.PROD.OUTLOOK.COM (52.134.136.17) To CO2PR07MB2519.namprd07.prod.outlook.com (10.166.201.6) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 278979df-042f-4faa-d61b-08d518a91e1c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:CO2PR07MB2519; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 3:+uxavijJCcBgwUsp4IaS6cR2PKubIn1M9Tv1WNvr7oiHVm+kLQMdMmXo+wIPL4LKyrbIHVBQNKY03Hk7jZrfDSczLbOpHtBUgISongpBXN6QNB8LWJHva//upqgzszmMVZ+5ztzLRPPJLjbquOmz8/xKojaKUPnS0PHK25slyYFEpsOj4iGgD2FWbdNK6DWGdfXAA9Xdg4C/GT5A/SiMByBvL3nR1mwEkGhWQYDqa7tUNj1+Ag9m6cGQ+H3e7izf; 25:HuTry4udR6fixW9l5tiOoVIob23/XCvmQ6SqJEK0eupMuKMDz8ZxRD/xCQmHREq35deFjc4tGCP5qMxSd5j9VqirGJQl2CLDBVLxHNhK06BaM4CfxAgskXULN/59tGFQYJXeQXhTa9FqnJoACHJ3xJebraxO22X3ZQ49+0mOCIzLJ/LJbzuYfCRIhEXxW8VhXL+xpEKSonw7mnXFnSyS5MS2deq5AwmNRmBzyaIFGMvQzUgVw9rfiAlyMBFke9YJpp7iUI9aWmSdu3DAk3oGpHbG0aMBHuVVibAvS9UXVbRFrXb7CCyMlqM5lUWkNS0lVFYPVJdQ3ePfCy97C9t4ug==; 31:dkJWwctHVftx7J5m4xyBw8g7NXsnpXRtJTtRCUIdeEX53D7lodJ1RsPKxebG2sDFsJYpYxQWC4v5/AjEU6l+zMPPRqWc0voG7XazDEdSuSGNVwIwgmvd+Uu9bfTelv4kNy0LpwERdwBa0CUMc8Ud0+sopepmcpar8hpO2zO7YQXAS7ZsiBgGsPAbDA19FChbUfL0dbUx/3TYO7ItNEsVRWLp4TH3/yCANview2Wabzw= X-MS-TrafficTypeDiagnostic: CO2PR07MB2519: X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 20:mDJf9NFKX4Y6ABSo/w9c4w9Jgt4ZkucrVpYHKhQpBbNNXr6o0sU4ID7SetHg4mCM9drOvUOgk//y5SODP8iiDHEW5CqBHh3gg0dku5PCKES+9+t10YNdJEUEp2Q4yvcDkuQ1FE1EEM4OBX0xeABFShrEtco/x751PKCLPHAtUhQLKhShsaUP6fqqlDkYyH2unw/CdPGKG97R3+jihcRSIl4nR/Frc/NQ0+86DNNYW+GQj521BLPYrmV3em3nIYzq/SK2aoeGvynztslClDLdUoXjId3X3kyX4A/MZ6DP5s2VK0E0Oi6/0A2dZ9QIvNKpUA3zpBwdb8kt15KI/8YKgZ0hSBa2NH01Uku0ruR9712B/DZ9ERlM8NEuPajs8YIeUX3T5llMJQdg3xf3/WY/jEpIpot4D8WcRiusH1XqyjhVkgO8ncwSkmHU/dyegnrlyIuc/S7JGS0kaSf6ZiW7yRTyEUrodnPG3LwMdcehpN8s6XTyr4W8t4QAu85aRWW6EtJSaXqVoF1FWeEFuMrOOgMpT1PFnyLvuujuy6dcjWm3myLPdu9be2Zkl1lbBHHjsqza5KafAiK3PfcSdDd4J/ueJWm5TNXedcUjIHWlWKE= 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)(8121501046)(5005006)(10201501046)(93006095)(3002001)(3231020)(100000703101)(100105400095)(6041248)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR07MB2519; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR07MB2519; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 4:vuyFEe/5ggT7yOHQv3FKKCFc+9uPCDkKHmYhdFOEs2E/Jt6C72+ElA+78MTgeYGobzHfP4dkgr9NNqrcPhBUMsnDnV9jacqonOrhMy8+hxLWDz+3MxeOB2k4EjC52MODfReONNktDwVVv5xOC/vtfTq06NuyHe9uulRV63o8sJvDOYRHMWwv+2Z6CwUI8YKw4IFfmBrKZiwrTUas468NsUqgacSo7OkpoiOagS1L2ejV3EAYzJSxmEpi/GAWtjGkn1x4uvdd0x23o/LGC43tsqmTHvQxJrsv7oqxTlngse9LKQ4n8i8yE27YlK5V1U8pe+/P3wQyVBSa+1hNqGSlaDA6tTeTgQinOol+S3eJ7t4dxHQ1Qu/h8OuUYSwJ0FOh X-Forefront-PRVS: 046753C63C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(13464003)(189002)(377424004)(199003)(24454002)(1076002)(97736004)(2906002)(23726003)(3846002)(68736007)(6246003)(33656002)(105586002)(106356001)(5660300001)(6116002)(6496005)(189998001)(101416001)(33716001)(25786009)(229853002)(4326008)(81156014)(8936002)(81166006)(50466002)(8676002)(305945005)(66066001)(7736002)(6636002)(6306002)(9686003)(42882006)(2950100002)(6666003)(53376002)(55016002)(47776003)(53936002)(6862004)(93886005)(50986999)(54356999)(76176999)(16586007)(478600001)(316002)(53546010)(16526018)(58126008)(72206003)(83506002)(966005)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2519; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; CO2PR07MB2519; 23:1pP4lEufLnjSDLdFTQP8UilwjIQXDRQXK38D7zUkD?= =?us-ascii?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hzG8jw+RAwzwi5Jjx0Q==; 24:4CajPj1mSkqAkKQ6CDGY4Ce87ncOBvXgnMy/1WcPcNbwlqqKP62M/BGpPftLQdZY6DD6uT/ucsnS7FgFBcHeItlleLxvkT58461MXBvH2ME=; 7:ZGZiHkapMAcAQZeLia0aRq20P1QU/9SlCCArE6OXQvXiEDB5TVVTwvcF62nnBQmOl1Iax3O2Bd2vAZzRkQX8khi4VGIwmZPa2PHCAmofurDF7jHkWduvF23IF/Lh9cmvcZkXVPzQhS/Hg+7JFFHz1d8eMjCGxw4cLlyJq8jW1FClWGXIgDMNt3gx37EJxCaxqmthUic+XsvXeK3j0q1gNIyZQURvwj+x8K6eX1OJY0k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2017 17:28:16.2789 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2519 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: Sat, 21 Oct 2017 17:28:20 -0000 -----Original Message----- > Date: Sat, 21 Oct 2017 00:39:28 +0530 > From: Pavan Nikhilesh Bhagavatula > To: "Van Haaren, Harry" > CC: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event > queue config > User-Agent: Mutt/1.5.24 (2015-08-30) > > 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? If we were to choose between option 1 and option 2, I think, option 1 is better instead of special interpretation of option 2. Looks like ENOTUNIQ is not available for freebsd. Choose a errno that works for linux and freebsd https://www.freebsd.org/cgi/man.cgi?query=errno&sektion=2 http://man7.org/linux/man-pages/man3/errno.3.html