From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0054.outbound.protection.outlook.com [104.47.41.54]) by dpdk.org (Postfix) with ESMTP id 395FF2BB1 for ; Sat, 15 Apr 2017 06:58:40 +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=+HYzFq9M/FViNAGbdi7fytCbyfVBHOzBi7MQVgwKlDo=; b=AHd4g0QqfNdMG1U047EP2kkoQTxJoZeBeYatihrhxXi8OYtZMoXUpX4WPZ4AOZGkrzyJQdSia3KiFORjOABpHftO5rmeWZuFGwNpYyMAPnpsbiPLkCEgCj6nbqzO9a6BAwOBpbvgh8cmSHSSMxz4VdEMk4q6uCD5CesAxSM8Q4o= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin (116.68.105.74) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Sat, 15 Apr 2017 04:58:29 +0000 Date: Sat, 15 Apr 2017 10:28:12 +0530 From: Jerin Jacob To: Harry van Haaren Cc: dev@dpdk.org Message-ID: <20170415045811.GA9449@jerin> References: <1492185898-43547-1-git-send-email-harry.van.haaren@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1492185898-43547-1-git-send-email-harry.van.haaren@intel.com> User-Agent: Mutt/1.8.1 (2017-04-11) X-Originating-IP: [116.68.105.74] X-ClientProxiedBy: BM1PR01CA0075.INDPRD01.PROD.OUTLOOK.COM (10.174.208.143) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-Office365-Filtering-Correlation-Id: a35c1089-cefd-4d70-16ee-08d483bc100c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 3:anbHr3j10bf4W/VtJOAUwDDl2osPX1pA6kycGtspMpE7NEiGb/WB9foZPeG7cqsIjZyktfLZqsTgK/ZS3M3w1J59WXH5U4fEUX24E3rgZdLvw/jdf1g6WMHIIah9paXr/cSA8gAMVx4XURV40Y5cz01ybRnSY9JTuawo91RzbAVDVl/RFZjAaDV6yCG0pny8QQIkqZ4McAF3qJXRV+OfHqi7A7nCNZs2q1HcbDXlD27eXqLAyLhkg+Q5xtEjYHmXfxKqxWxjj1RqAv+I5bGZq/5DUAdw66ddPqGJWw+8rwJZlral0NShOUfQ9c/Vy1o4bMcLWjbshDqjV9MZdt3UWA==; 25:EeM4FgLzc+L+8cwHOQgqp6s7XBd6/NopFm6uG7g7hrZwNwQ0KN4qLP56XY0ud6Jl3V5mQD7UAs+cyGgyYj2OUdp9mzMWI1GKIibrYs6D9l4/WpBWIF2Bfwn83ZOzZWFNKewV3FgN6UYgiaH8uYbx/98CByZRlNnRcwTvsPMxwiK9ARs0sau4GvQ6HZeleC5K1in1uIGClEhcBc4qqW9iQOYxYhbQz8XzB5I++eTxKrRU2v6yKFpGZfRtGDynzZ5Yyhr90BBExNLrz/PM+RyD0xpsmJN4cgEPwNmNMDdfhdIQfvSDPKrR+J9XjCgAS8av+bBEEXb0rS4qHmPiHFPaBQccL1zWX9Jdpeix/WV27nEltc3UudxioTa14kY7o3dz3/I1dDzNs3vhKSsWSP3C9YinrIGJLBXY3BUpTSDP4PVJrTvwSa842EdBFVJqSuxRf0EfbWXzywdhW8sxJ8+TFA== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 31:i4cQV2PVB4gS+XmNwiBBsF9g07sBrcj1pc9LtMPwb1KemCgPP7+BZzwgFhH6NC8NlMkFKJXp7uQxM0iPW3L4W1OUjP43cFuUK4ANR5ZDIxq4x+wp2HingWsmVs59vheahYc7yGFG+rhMOpyCfeeYTdcZog6BbICLfOcS76gn8IeRR+9TIr1u0RSBcEDqxAa2vy9ZvyXYP1+MBUgf5IVQer+wg0VKM5aXI5qXrPbs+tSM1QAyfMqm4hZRqKGS8xn7dQAeT/Nfu724aSrgEP7zbg==; 20:rTuNSdOza9gN5MixYkHwR5w+092BZP6sSy+E/srXlj10+pgR1pby/BM9Dvi/CqDw/dnbCPE4+g4twClDUWJ7REg5iuU8rfx+DJnh0dANhLzmX9fjR73Q9CmdamLngobU2UVaOZspDqwMV09cHMLEf+ZO2DEEZ9OAaUyA1Pn13vN7u1vM2Es+2hRwIhpQEmD/5GvRgcD8vfR471shVGhNXTPb6ifDFx8f41yZ3gVB8ZlvmP09EZhz68YijhILA65HSb0S7c8OVbZTx05VFK+8zD4UEeg1dStCL+cfom93PeERc3APpleXsr+MRInvAwqnMvMYHZr8wOXjKyqCQpLVtuJbSpWcJ4XV88oxDEw8/pbeHEbHD+i5XnX8ZnhJUOQmt7KczhLK060q50sPHWyW//oLxMruQt8Quvca15RJ4mT9wNcmeGQMNOVE29UoS1oT6nUEFucrjKDRO+E8H+EubqqL5SrvbP2JMN8+/7nFDdDjDcyyqQ9Flljee6ZRKuMaNG+hjER7dYsERJkOZU3pZ9yoY7rAtntaWM5iQwYR846bOG/r2h2Cm/S2Fea2pNFxSGtVS+alfX5m6u59qznY+iaWzdY4be/s2rnuQoQxSVY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123560025)(20161123564025)(6072148); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:XPp1juIvKHGMevzDWI7r7p7PQfX2AhdioXtidQUIYJ45z87zxhS4V1i4EVWkTetCe0RXqS5c85qUy1TdeRyhr9nAkB1ncmeF8fh1BhK+U3DoTg0beH3p3BdMYfpWeoKpxsVPui2A1o94KJ5gLnfDN1SyJbVQdG0XtpdsQPbrBFWFXC3cPKpfCMS4ehtMJMK4YiwXpMKyR+un7nhWfot4MWXH/NxN7/VWc9ZdhjE3q/y34iFySzAXM4VR4AQiFkoVQPB8By5sHqS10PzXJlVs9jsnXWd3D2xuKjV61NXw23+CPa0maHwRnHgoyVVe5qx8MWBMJsJOMwFbcDRy/JqyvJJsHYR4xs39yMq6X64ScNeCyvfP07g9OayBhoRPFVfDLoFOLzUSkB92iTTc9xMBq136emYv8AhFVHUNrpvfkICMmkcc2aR+SJbpaQh9DIukf8oGk8bVipCeuU6C+aAl45pIV9walUZUAkCIpmpdfuqthrj6MAo8Ij0U0uY2ElzSZxESXlwoByICJFI9PtCGXj3OK6hwY5PoRBX6vJ+RD02W0JQQYyQChl3aJz4uSuj4zf3RzxWYWWpPnLKQ8cZ4ZfXNHTxoH4byWLOnMJdXvffH5t6xdwqC+eeRzjEk6xuv1/Tw0GLCj8UCClPhLpHC8FNxWzLYkqel0s6JFG+2EhqnYMn0iOKUFLKWM5k6cmPaRQtbDMZ0TJL7UZ8mFHeRNsW8N95NvZUgTGR7aNWjyoz37Fp2B0ep8zYMAnJ00UxD X-Forefront-PRVS: 02788FF38E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39450400003)(39840400002)(39410400002)(39400400002)(13464003)(6306002)(966004)(6496005)(6246003)(9686003)(38730400002)(53936002)(5660300001)(23726003)(229853002)(33656002)(6666003)(7736002)(2950100002)(42882006)(6916009)(3846002)(2906002)(305945005)(6116002)(55016002)(53376002)(4326008)(8676002)(81166006)(110136004)(47776003)(25786009)(66066001)(42186005)(189998001)(33716001)(76176999)(54356999)(50986999)(50466002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:jerin; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:21bq/Q8FgBxKQLnciYnOb+cU6vMy9vXmK0kS6JM?= =?us-ascii?Q?5e3ILAIj+LxgjO0xoPvnZhfQ//T1BpxXkghZkieXupC7JlCWWbbaDE0qAG1t?= =?us-ascii?Q?6y10hPx+LAnd/ne4Jn6WeECnsoOdskTsU9acFwwVC4iTc7HiZrR8RHH/ncrW?= =?us-ascii?Q?Q+u6yECpfwfyrbKsmLOI9xEimUDsm0vz/FUOAa+KgAc9PlYVKY6w7Dg9iz2t?= =?us-ascii?Q?b9oSYp7huNadbsitsuiQzb9t2MUd3sNEsI/guXdTCiG6Fmty9MdB3R255ej6?= =?us-ascii?Q?fPdTs8M6CI1ImTATElDnXcEAgSK0odMfmhJBClUlL4bl3TQNFDPgp4d4BGso?= =?us-ascii?Q?2wsI1REInDzDqNYuhYcG8sjBtRLVm40yrLeonIasIDsor2aNM8kYEm4x/3xG?= =?us-ascii?Q?ZaaAfXyY6PfyoHaIC/P/ei4SaQYU1NYy4sFLWwoixclj4/9LRwhIqH311G4J?= =?us-ascii?Q?Kc6eI1G4VzJ97zk9NCOy0LfJn3TQxeqLx8gGbLRorECNBIrMY7M+mcWBpEkJ?= =?us-ascii?Q?Rb+uc9jBFOMzARAIfe74ftQRJ/jpid4C1+ySs8nErJStd+Der9gcG6EYo1Vi?= =?us-ascii?Q?c26K0jcSCRET3Ts2r2sOhzirp/mkbg2dYQ/6c5l7UbTHAT1Oi51258MhPWVq?= =?us-ascii?Q?IdnqyzMJP7r9gT0kuUO1pZQqTNgWXTMJdlFY978XgYEOLl62Wv1Lxnn2HKz4?= =?us-ascii?Q?aepiQ58p75lyJ+8luxOMoaMuBdpJxEh4luTnQG25j6YFXDJ7HScGee/59XZr?= =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9h8F4BxXPxpoqvdXAob5cVr7+Wkz67aaBW2PAG65XypqBKTZ7zS7cFnt1fi/YR5QWqdeP3pCg==; 24:IN/UVIG4vBPOjwGvmkXaF1BvHC+4yko7DSHAEmsDnuGxCjKtlXBch7kPjEKmlk62dg8b4ATqzOgxlIAlRgP8ROr+ujQ6IR0jqA9/UN/pJp4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 7:uMcdhZXqJTrBbi+SxhM7TPgVFZZLmzGoA+hsr/3PQX5SkLLw8iMpST+nEJR+Jeixj1Ixc0R3dhPoYy5Ecj6D1ct/94Pa84JSTV3qu+QhkGuSVENkPKR7ifIaLQP6a+ohMwuk3uLqxm1MTFHAbg9qvyTHaI6Z/KLc5VWYEtiiwc3MnaOlgNIWa03SHUT6VqFABtAuXDeCGlay+D3StbxQNZA4A9ndGyRcn8/EOop1foboVSEB8JB9GxpbFZOajYiaskH7fjenA68gPJC4wc8EgABVYDyvUtxxGq64+vmnDpVlyhHsZBQ9M12ZZaAFLyksGeVsC1obUS9Uq7+vF06w4A== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2017 04:58:29.3133 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: Re: [dpdk-dev] [PATCH] eventdev: fix dequeue timeout bitmask brackets 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, 15 Apr 2017 04:58:40 -0000 -----Original Message----- > Date: Fri, 14 Apr 2017 17:04:58 +0100 > From: Harry van Haaren > To: dev@dpdk.org > CC: jerin.jacob@caviumnetworks.com, Harry van Haaren > > Subject: [PATCH] eventdev: fix dequeue timeout bitmask brackets > X-Mailer: git-send-email 2.7.4 > > Fix brackets around the & operator to first mask a single bit > and then perform the not operator. Previously the result was > not as expected, due to the ! operator being performed first. > > As noted on list[1] Clang 4.0 warns about a possible bug for > this type of line: > if (!variable & FLAG) { > > Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs") > > Signed-off-by: Harry van Haaren Acked-by: Jerin Jacob > > [1] http://dpdk.org/ml/archives/dev/2017-April/064089.html > --- > lib/librte_eventdev/rte_eventdev.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c > index 8042988..a64071e 100644 > --- a/lib/librte_eventdev/rte_eventdev.c > +++ b/lib/librte_eventdev/rte_eventdev.c > @@ -368,7 +368,8 @@ rte_event_dev_configure(uint8_t dev_id, > (*dev->dev_ops->dev_infos_get)(dev, &info); > > /* Check dequeue_timeout_ns value is in limit */ > - if (!dev_conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT) { > + if (!(dev_conf->event_dev_cfg & > + RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT)) { > if (dev_conf->dequeue_timeout_ns < info.min_dequeue_timeout_ns > || dev_conf->dequeue_timeout_ns > > info.max_dequeue_timeout_ns) { > -- > 2.7.4 >