From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [net-next 1/1] tipc: improve link resiliency when rps is activated Date: Wed, 08 Nov 2017 13:40:53 +0900 (KST) Message-ID: <20171108.134053.127884187686446469.davem@davemloft.net> References: <1509968651-16168-1-git-send-email-jon.maloy@ericsson.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, mohan.krishna.ghanta.krishnamurthy@ericsson.com, tung.q.nguyen@dektech.com.au, hoang.h.le@dektech.com.au, canh.d.luu@dektech.com.au, ying.xue@windriver.com, tipc-discussion@lists.sourceforge.net To: jon.maloy@ericsson.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:34010 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbdKHEk5 (ORCPT ); Tue, 7 Nov 2017 23:40:57 -0500 In-Reply-To: <1509968651-16168-1-git-send-email-jon.maloy@ericsson.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jon Maloy Date: Mon, 6 Nov 2017 12:44:11 +0100 > + return core & (num_online_cpus() - 1); Well, this isn't exactly correct. The number of online cpus is not necessarily a power of two. And furthermore it shouldn't even be necessary. Just pass the whole key around, it will have the modulus applied to it when needed elsewhere in the call chains.