From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D2E1EB64D8 for ; Thu, 22 Jun 2023 09:00:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id AD77B40236; Thu, 22 Jun 2023 09:00:04 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org AD77B40236 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1687424404; bh=r+6FDnMj67pi3yXq2Z3cntEicT42HxO35mpNhjpAFfw=; h=Date:To:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=g8TC5jTtVPwt1uzyjJTX9caR4ll3665d4cyxrEsdnPUeJg9ujEF5X7y+g5+aUCsEI A6dHWjcHkwEE7wCiER3n65OUBIUP5bbPGOU0GhC+OnidfheqvDRU7QTt2guf6q095l UYNbAaDj8gtoF8nOvFyW3uI4r/40K8/9Y04oETaDEtMEsJ6k3c4X1IHOwXxBcSH9K5 skxUGxubRYUFqrTl8qqsIJ2DolZz2oaNte78+9RfLK6Bz4fs+DRo8g73Bf0GkD1cUF Vfw0otOTc4RLsRvHbgrh2r4QaqqU4Qe+QRxkVjC4cJDcBKZA6MQeww521Wu5SP3t7f KXRpD/3pTq2ww== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eO5cnl54XojJ; Thu, 22 Jun 2023 09:00:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id A20F44036F; Thu, 22 Jun 2023 09:00:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A20F44036F Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 707061BF336 for ; Thu, 22 Jun 2023 09:00:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5150B4036F for ; Thu, 22 Jun 2023 09:00:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 5150B4036F X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fsT23EdrWj9y for ; Thu, 22 Jun 2023 09:00:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 74D8840236 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by smtp2.osuosl.org (Postfix) with ESMTPS id 74D8840236 for ; Thu, 22 Jun 2023 09:00:01 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="446805758" X-IronPort-AV: E=Sophos;i="6.00,263,1681196400"; d="scan'208";a="446805758" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2023 01:59:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="804705746" X-IronPort-AV: E=Sophos;i="6.00,263,1681196400"; d="scan'208";a="804705746" Received: from naamamex-mobl.ger.corp.intel.com (HELO [10.13.12.68]) ([10.13.12.68]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2023 01:59:53 -0700 Message-ID: <7a4885d3-d977-436c-f298-e29ef199d49e@linux.intel.com> Date: Thu, 22 Jun 2023 11:59:51 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: Vinicius Costa Gomes , intel-wired-lan@lists.osuosl.org References: <20230607213232.875138-1-vinicius.gomes@intel.com> <20230607213232.875138-5-vinicius.gomes@intel.com> From: "naamax.meir" In-Reply-To: <20230607213232.875138-5-vinicius.gomes@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687424401; x=1718960401; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=INOD10kTDg7Hi96vCueM4g3hWeU/rFpBjp0vMjGnNj0=; b=mUV03pTohK4IAH5Zigq3hiC7nfcL2OY2Gf9jNywB23CcUXDTxrTmt3Kn C6fBTfsQr99vM2+kDBgYOavcCZ0JI+JrAAxwJiDw68UD35GYg4aKha90c 0YlPNPKx/ie2aqhTzYacxRmXinjxWIYEJOIapdCcWA+9NKLxeV+9yInSm FnTEWzz/NAisL3Ej43cFZoFQMBz7BmUmDqgi9VJYNetubR/dptLW9ZLEd hiT4JVR0qKzH430KeIQu3th3k8v6F4nZrCzIz/zvzBBLev/WvErTZ/SKc nYYECE0ASqNBqJSPl/jb5yhgM0u0c8xpFLuPwHKJSMnMMZbuCi3DViNRu Q==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=mUV03pTo Subject: Re: [Intel-wired-lan] [PATCH iwl-net v4 4/4] igc: Work around HW bug causing missing timestamps X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vladimir.oltean@nxp.com, kurt@linutronix.de, anthony.l.nguyen@intel.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On 6/8/2023 00:32, Vinicius Costa Gomes wrote: > There's an hardware issue that can cause missing timestamps. The bug > is that the interrupt is only cleared if the IGC_TXSTMPH_0 register is > read. > > The bug can cause a race condition if a timestamp is captured at the > wrong time, and we will miss that timestamp. To reduce the time window > that the problem is able to happen, in case no timestamp was ready, we > read the "previous" value of the timestamp registers, and we compare > with the "current" one, if it didn't change we can be reasonably sure > that no timestamp was captured. If they are different, we use the new > value as the captured timestamp. > > The HW bug is not easy to reproduce, got to reproduce it when smashing > the NIC with timestamping requests from multiple applications (e.g. > multiple ntpperf instances + ptp4l), after 10s of minutes. > > This workaround has more impact when multiple timestamp registers are > used, and the IGC_TXSTMPH_0 register always need to be read, so the > interrupt is cleared. > > Fixes: 2c344ae24501 ("igc: Add support for TX timestamping") > Signed-off-by: Vinicius Costa Gomes > --- > drivers/net/ethernet/intel/igc/igc_ptp.c | 48 ++++++++++++++++++------ > 1 file changed, 37 insertions(+), 11 deletions(-) Tested-by: Naama Meir _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan