From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0069.outbound.protection.outlook.com [104.47.34.69]) by dpdk.org (Postfix) with ESMTP id 22D54100F for ; Wed, 30 Aug 2017 06:06:08 +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=LSRHanUkVtmmZEo8Bruxc202eWzr8JBBbwrWCI+Re/k=; b=FQN851iHkoxA4RGDU1MSEsKJhber52wRl1fNHPfRbITErY8shVFwYuxacUmW4L380XRewfb8bbZKV8Th622nBBlnmX0hSisO9gHROrZl6WR6y+HiTTpgh9NXNLZyHMzDZAbYb2cVKb/XJQVfhCx4ZbsD/Rcqk5QjhEjKSeosVjM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT (103.16.71.100) by BN6PR07MB3460.namprd07.prod.outlook.com (10.161.153.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9; Wed, 30 Aug 2017 04:06:04 +0000 Date: Wed, 30 Aug 2017 09:35:43 +0530 From: Pavan Nikhilesh Bhagavatula To: Stephen Hemminger Cc: dev@dpdk.org Message-ID: <20170830040540.GA23207@PBHAGAVATULA-LT> References: <1504032378-5483-1-git-send-email-pbhagavatula@caviumnetworks.com> <1504032378-5483-2-git-send-email-pbhagavatula@caviumnetworks.com> <20170829123800.066ee293@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170829123800.066ee293@xeon-e3> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [103.16.71.100] X-ClientProxiedBy: HK2PR02CA0209.apcprd02.prod.outlook.com (10.171.30.149) To BN6PR07MB3460.namprd07.prod.outlook.com (10.161.153.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 05c93471-1c82-43f9-83a2-08d4ef5c6ff0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN6PR07MB3460; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3460; 3:Y3Yyulq6DG9Pl0nKmBwS5s2TAXhfilf43WndKB3orWs3s387jIXnLvsXOWm7BYqHI9a+279hQtnN7zRXYAsEM634QUSPYZUPNe9BAB2xK3nFZjeffBoZs53UFz+AHryAa8ZhnznRSasD/++WsoKO0wBmOc54kiZY43MeOi28LUXFJlOLvSeQiZ4IIaTHghTE9h//nq4aNGgLIojVRJb3ptsQIpqUY/zM/OH6mSZuu7R0JaS6I2z9c1UBwVsBwRnF; 25:d/wmb4bOMDh8Csze0e7G7TQPj8HldbyHgOtS6jAnZEhQudSeLGXFnK0mBcXzTetVdM1f079RfMEXU+IIgDtaGcVOVVL0TAMD9ogc0T7W3XxZfH+bPihGWnUa8+RQoW7MFIP5qDl7Gd6eirlYHjtvtixSarN85Iddu4EK9PIR2HC9sN1LCPcR6uNX2dTbIMmrinWHirpe5s/SKvrEm2LQDHnqkCEhICFufL59BQYxVazM8cV/K6olB0MOStQOE2skGiSj0tWIGyqKfD1GsA+6GoGRgGvm9UO4t89v/Cj5kwb4wPTt7JCy0p3Wzvr+QHBYAOBBmFsFkbLvxGzr0ecK2w==; 31:YtBuRd2KTK1V+R8zI9HyMgYpuIgqQJW7rL3dYpn9EQFm41wN/TzkEB0EGjXKR7UykYJbWyXrQZJPHcFVyLz4sOYeUvUeeJqd/t+nimx0WcnsHb+C1xs36eHDPBr13BtKUtRQH4pvH+EaMK64MpOKdDXySW2lUDtW1u4QrU9X6QT+Yl2PYuqEo376l4xBpXbj51niXUlO4MLKN+DmDn5qZJRPskJn7FRRT1zoKbpTaNY= X-MS-TrafficTypeDiagnostic: BN6PR07MB3460: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3460; 20:Y6NiCjKDfOe082yUGbNNUPnHLqgsTq7AyoTu7wRer9JCo0f6Fw/0gyjJnjU6d9C1DJZXotoYqSZE9meiDVqzn1hmr+51Z6NxtXoyVDp3bQP1Uj9ZEx1s1s2kvh8SxbOKRPJ17jkq55k+6SBubAKBm3eUNCfuxamrhZizXQ4V+p7yeOT4GXcI0sydOQXfa2AAMKMo2Y/AqKYOWzcaxr61R8TaNszwXwJ4duVE1AlZAk/wrn6bk7nWvcmhHGNo/+LfCoVh7dANQoe7cRWUe3q+WBl/OW5VIfUu8vRgSUCAlRTAF5/dJg0AujEqrtbz3PWsSF61v0on+ChJGFC1RTGF+OvpeLN+rVWTbtdjUC8Hit/rELokiHyfNa43ouMDdb1Guw7fA4Tck8tuZAziOVPPECxrcnVdVQMBhUhMTp39x8p8QnXAzKplnX51h3yeUISj2FPSBrlsN6sQ+IbZsOiaR3R0zs4d5i5l3Ze8oO8oH8tmFs6HZqcyr28U2Y5lvDpr4/RNb/MrvhxxoVRDe+5tAbz9wdQ4kMwKcnRRktrv1ByeliVJZYVignKnmCXB42qXmH1T5M1MGUTHMcorMFm0ozRtr8zs8VIT1yUgt4Kjm6c=; 4:OUkw3e/E6k3OiiF6gAQ5kDO4bxwyM6T8z4YMwyAUmeiiKtI/cX/klIVPlDRdg2vTPQFB41OEwATx98kClTN9A8V/i001b23x1OiwF0DREZCVN8pTwHMUW4heEslnEcgVWmkOF7naXXIz/WB7J7E0lOUIH0roZE2zasORB2QWMy433BMBCo5DEXxaKyXaen0LvxvnRV68OJepzpbx3ftOqOoY5YsBDMKfmZVwxRZM1wofiUMJuI6tC5D3VerXYlDW X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(100000703101)(100105400095)(6041248)(20161123558100)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3460; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3460; X-Forefront-PRVS: 041517DFAB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(51914003)(24454002)(189002)(199003)(55016002)(68736007)(305945005)(50986999)(54356999)(2906002)(76176999)(81156014)(50466002)(81166006)(42186005)(106356001)(1076002)(105586002)(2950100002)(42882006)(3846002)(189998001)(97736004)(23726003)(101416001)(25786009)(9686003)(83506001)(6916009)(6496005)(8936002)(110136004)(6666003)(6116002)(33716001)(6246003)(66066001)(33656002)(5660300001)(47776003)(7736002)(229853002)(478600001)(4001350100001)(4326008)(72206003)(8676002)(53936002)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3460; H:PBHAGAVATULA-LT; 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; BN6PR07MB3460; 23:sda8Ut6OHL2moFegyPpYh5PjDBfC1c2fkussMBqMp?= =?us-ascii?Q?SVmc+cbWH/AQ4Mhgtm5y5fSfDyTXjmrvZjWcuanK7bdGaRnQ16LkZALliQ+x?= =?us-ascii?Q?b/fsd7VopebPLg9HSOc4A84o5sebrkxQul0+/KGYsx4WU54ptkWTaWebgC2a?= =?us-ascii?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mAVF/uJ+IUk+p56pa/bg/WNEcMtzuZz?= =?us-ascii?Q?B9sjH7FUG90v1KxTWcywiWHmBawi95A/ooNTBg5jJnLnD5mLq5UpU9O+hWsX?= =?us-ascii?Q?9T5mAxAZgCFePZ1LMJm5eWtjmZx85qcDxIH+iVh4dVyEdDhsYI9uHpSALGYs?= =?us-ascii?Q?yYZgkuwnhxoKNazxjYO31zBciG5YTE8hWDM?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3460; 6:mYZ5jf6jXyDSEfuO5ffQFrxl+xASy9KUmdOzUK4AcMYkRhDfINNdvhW5HgmniOZjqWIF/d62Kqg0+uH+NtA4NG5hY7vZhrTV6j96tbcwVZjHM4P7MVT+P8jalu9tHwu1AZYGER1NbgBiKZRaEZDV9SX6LiYZS0x4UcOZUlMMTe8TUN49ZV6sDApBD35b5YzguRl4mqBOClneFVXYUWEob5k2GdVkTCeeuTO12xCMBLUcT9+fP1BWBxQKoI0EP6OZNos66uRykX1znXZergbNP/w4OMW0qE7zVI67UIuvjmDBdn76+rgxQTiNIFvJH6A945rP2JE6zO9g+bU1UFrD5w==; 5:C1wA8hHO7abpkwDmWymfpeA+xO+fKE5aZGGEO9QwCvIUue0/kKp6TGT4w3ws5noesZXYCCiPHjKMXHFWur7L03z0PnbWfnj16vqoviR38e21qzpL0FxlllAb8mIA11qqwdLZT1bptyuydqSueZSy0w==; 24:VPELug479xLBiItXnRI/dBx4Z1WtVowTP+ydILF8oqa/er7sTzBTGe/0WwuwE2mr/wI+K8b0ltKzwGJIaNjX1vDk5aWakFU54D/wDoRBSp4=; 7:0KVSZn7nTykCfOwL21lWE0HS8XtoLBvbKGX3zXzNabtITtx+DP879QkJdZag8PHKK/XVPgYtfyedEyED7rejO0y5o4+CQYspabweLxMVhHVY0yZoQ1+03eu/dogRq+KMtxH1/9MpIxsVy676EDg/txNhdNBRlDcMydVLhMz8dO61+BlmMFuoRS2Q07Gv1EX/srsDfxIkkvaQ8xTEwyvAxTf1og9zWbS4p+Do27wKm4M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2017 04:06:04.4989 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3460 Subject: Re: [dpdk-dev] [PATCH 2/2] eal: add u64 bit variant for reciprocal 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: Wed, 30 Aug 2017 04:06:09 -0000 On Tue, Aug 29, 2017 at 12:38:00PM -0700, Stephen Hemminger wrote: > On Wed, 30 Aug 2017 00:16:18 +0530 > Pavan Nikhilesh wrote: > Hi Stephen, > > +static inline uint64_t > > +mullhi_u64(uint64_t x, uint64_t y) > > { > > - uint32_t t = (uint32_t)(((uint64_t)a * R.m) >> 32); > > + __uint128_t xl = x; > > + __uint128_t yl = y; > > + __uint128_t rl = xl * yl; > > + return (uint64_t)(rl >> 64); > > +} > > Cast in return not necessary. And cast when setting t not necessary. > Please blank line after declarations. > > Also you don't need to cast both sides of multiply. Some compilers maybe > able to optimize 128 bit * 64 bit. Thanks for the inputs, will do the required changes along with removing license in v2. -Pavan