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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 404B4C04A68 for ; Wed, 27 Jul 2022 23:16:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C7052415BF; Wed, 27 Jul 2022 23:16:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org C7052415BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1658963800; bh=lT+TuTtB20LrU5HPUD324/6Hn3pHIrq6a/7PkNy6+Tk=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ctxi8pVoSLFHwbCy9AGRAt3pjORDxF0z/8DljcHPJMf0X7Xp+mc44yzfQkdrUu5SX Q/9CUfgR5rOsyu7u4dsOf1aujAQ3AZao2DoAH8pVO0xKvXfOBuGITLEJLmGAbBjLAT 2tP8yuE7qDb0/S3ta0V8M4Zw3oO2X0RbgYFID9q6Tf7zR0lkFcdJUQnU/vd42uCljH bsJUUdHjVj6r/F5G19D4nPc5if2bPKpdT7/tWXmHzAryse2jAAMsRdxn1shg4tI6XY a5SBpNhFyvSD828aSykuUmK3R/ybddDIdKkkxsA8o2XgmuAastVxG1uOqSO2/2ihks gwG+/HHHXB8dQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BqW9RQ4qIcdH; Wed, 27 Jul 2022 23:16:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 97653416E9; Wed, 27 Jul 2022 23:16:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 97653416E9 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 4009F1BF42D for ; Wed, 27 Jul 2022 23:16:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 52EB2416E9 for ; Wed, 27 Jul 2022 23:16:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 52EB2416E9 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nn6XEDSgEE3Q for ; Wed, 27 Jul 2022 23:16:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org BE7A9415C9 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by smtp4.osuosl.org (Postfix) with ESMTPS id BE7A9415C9 for ; Wed, 27 Jul 2022 23:16:19 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6400,9594,10421"; a="288382450" X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="288382450" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 16:16:10 -0700 X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="846448004" Received: from jekeller-desk.amr.corp.intel.com (HELO jekeller-desk.jekeller.internal) ([10.166.241.7]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 16:16:09 -0700 From: Jacob Keller To: Intel Wired LAN Date: Wed, 27 Jul 2022 16:15:58 -0700 Message-Id: <20220727231602.1625980-3-jacob.e.keller@intel.com> X-Mailer: git-send-email 2.37.1.208.ge72d93e88cb2 In-Reply-To: <20220727231602.1625980-1-jacob.e.keller@intel.com> References: <20220727231602.1625980-1-jacob.e.keller@intel.com> MIME-Version: 1.0 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=1658963779; x=1690499779; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wjNXJ9Vwsf2Ddmv2y6GXFiQSVQtJK/Dcel90wrbUfwE=; b=GQbphtXd95Q2CbMQN3fRvZ99B67QTIm7jFtWhEr22kywxZU1ReALR6+e gBF3AknpBg+Zas6aymsmNno/Srx5qPagcf+ABgc6hAiAoHWNmXYJHrIu9 H9imfqlAPjsvlBOX0A7Eo1aHKoPGRazRu4b4NsK70wJw9HUy1dSZjsZ2U HW3OdL7Y8mPeTYc5RVNm0Di9SkPS7liuxplFC+zDVzCyqsWE9fYusI+7A KGMVMfB7Vu7coTAJArF0Vb5JDuwJyOx6Mfb4vfGy6pdjw4skguu7FHs7o TecRTDb+dr8WBi2sga3vKr8QifNKnlvUtoGcoVDCBGdY25regm4ae3D6P g==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GQbphtXd Subject: [Intel-wired-lan] [net-next v2 2/6] ice: initialize cached_phctime when creating Rx rings 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" When we create new Rx rings, the cached_phctime field is zero initialized. This could result in incorrect timestamp reporting due to the cached value not yet being updated. Although a background task will periodically update the cached value, ensure it matches the existing cached value in the PF structure at ring initialization. Signed-off-by: Jacob Keller --- drivers/net/ethernet/intel/ice/ice_ethtool.c | 1 + drivers/net/ethernet/intel/ice/ice_lib.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c index bea87c5acd26..ca5a38651220 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c @@ -2882,6 +2882,7 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring, /* clone ring and setup updated count */ rx_rings[i] = *vsi->rx_rings[i]; rx_rings[i].count = new_rx_cnt; + rx_rings[i].cached_phctime = pf->ptp.cached_phc_time; rx_rings[i].desc = NULL; rx_rings[i].rx_buf = NULL; /* this is to allow wr32 to have something to write to diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 419ffdbac282..44c3d82e8da5 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -1522,6 +1522,7 @@ static int ice_vsi_alloc_rings(struct ice_vsi *vsi) ring->netdev = vsi->netdev; ring->dev = dev; ring->count = vsi->num_rx_desc; + ring->cached_phctime = pf->ptp.cached_phc_time; WRITE_ONCE(vsi->rx_rings[i], ring); } -- 2.37.1.208.ge72d93e88cb2 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan