From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932449AbcG0VZt (ORCPT ); Wed, 27 Jul 2016 17:25:49 -0400 Received: from pilot.jhuapl.edu ([128.244.251.36]:34564 "EHLO pilot.jhuapl.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932369AbcG0VZr convert rfc822-to-8bit (ORCPT ); Wed, 27 Jul 2016 17:25:47 -0400 X-Greylist: delayed 615 seconds by postgrey-1.27 at vger.kernel.org; Wed, 27 Jul 2016 17:25:47 EDT X-CrossPremisesHeadersFilteredBySendConnector: APLEX09.dom1.jhuapl.edu From: "Woodford, Timothy W." To: "Avargil, Raanan" , Jarod Wilson , "linux-kernel@vger.kernel.org" , "Hall, Christopher S" CC: "netdev@vger.kernel.org" , "intel-wired-lan@lists.osuosl.org" Subject: RE: [Intel-wired-lan] [PATCH net-next v3 1/2] e1000e: factor out systim sanitization Thread-Topic: [Intel-wired-lan] [PATCH net-next v3 1/2] e1000e: factor out systim sanitization Thread-Index: AQHR52sk+VkakmLnQUeBuo3ry8Ff1qAslR+AgAAqwHA= Date: Wed, 27 Jul 2016 21:15:23 +0000 Message-ID: References: <1469292274-59237-1-git-send-email-jarod@redhat.com> <1469557535-63429-1-git-send-email-jarod@redhat.com> <1469557535-63429-2-git-send-email-jarod@redhat.com> <8F4C390AFA9F4444A4AA77F4A3BEC78A190E7843@HASMSX110.ger.corp.intel.com> In-Reply-To: <8F4C390AFA9F4444A4AA77F4A3BEC78A190E7843@HASMSX110.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [128.244.198.168] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OrganizationHeadersPreserved: APLEX09.dom1.jhuapl.edu Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> This is prepatory work for an expanding list of adapter families that have occasional ~10 hour clock jumps when being used for PTP. Factor out the sanitization function and convert to using a feature (bug) flag, per suggestion from Jesse Brandeburg. >> >> Littering functional code with device-specific checks is much messier than simply checking a flag, and having device-specific init set flags as needed. >> There are probably a number of other cases in the e1000e code that could/should be converted similarly. > > Looks ok to me. > Adding Chris who asked what happens if we reach the max retry counter (E1000_MAX_82574_SYSTIM_REREAD)? > This counter is set to 50. > Can you, for testing purposes, decreased this value (or even set it to 0) and see what happens? I have one of the affected NICs. I inserted some test code into the module to check the value of i after the for loop inside the sanitize function exits to check how many iterations of the loop were being run. I ran a PTP test setup for a few hours with E1000_MAX_82574_SYSTIM_REREAD=50, and the maximum number was 5 iterations. It looks like setting E1000_MAX_82574_SYSTIM_REREAD to 0 will just disable the return value checking and will have the same results as disabling the sanitization function. I'll set the max retry counter to 1 and run an overnight test to see what happens. Tim Woodford