From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] net: core: improve the tx_hash calculating Date: Fri, 01 Jun 2018 13:27:19 -0400 (EDT) Message-ID: <20180601.132719.127789157890409297.davem@davemloft.net> References: <1527761641-22034-1-git-send-email-xiangxia.m.yue@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: xiangxia.m.yue@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:49324 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751502AbeFAR1U (ORCPT ); Fri, 1 Jun 2018 13:27:20 -0400 In-Reply-To: <1527761641-22034-1-git-send-email-xiangxia.m.yue@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Tonghao Zhang Date: Thu, 31 May 2018 03:14:01 -0700 > Use the % instead of while, and it may simple code and improve > the calculating. The real_num_tx_queues has been checked when > allocating and setting it. > > Signed-off-by: Tonghao Zhang The loop is there to avoid the expensive modulus operation, not to avoid the real_num_tx_queues == 0 case.