From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] net: mv643xx_eth: ensure coalesce settings survive read-modify-write Date: Tue, 01 Nov 2016 12:18:11 -0400 (EDT) Message-ID: <20161101.121811.1188428674232100128.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: sebastian.hesselbarth@gmail.com, netdev@vger.kernel.org To: rmk+kernel@armlinux.org.uk Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:47392 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbcKAQSN (ORCPT ); Tue, 1 Nov 2016 12:18:13 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Russell King Date: Tue, 01 Nov 2016 10:50:01 +0000 > The coalesce settings behave badly when changing just one value: > > ... # ethtool -c eth0 > rx-usecs: 249 > ... # ethtool -C eth0 tx-usecs 250 > ... # ethtool -c eth0 > rx-usecs: 248 > > This occurs due to rounding errors when calculating the microseconds > value - the divisons round down. This causes (eg) the rx-usecs to > decrease by one every time the tx-usecs value is set as per the above. > > Fix this by making the divison round-to-nearest. > > Signed-off-by: Russell King Applied, thanks.