From patchwork Mon Aug 7 10:36:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karol Kolacinski X-Patchwork-Id: 1817745 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=4HKh5HOd; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKCSS0K1gz1yYl for ; Mon, 7 Aug 2023 20:37:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2F37F60608; Mon, 7 Aug 2023 10:37:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2F37F60608 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1691404646; bh=bC2KfT9d4GVI08x1fw8u7uOSRLwPl4bSztT3aybb5us=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=4HKh5HOdK6A7ibMvd8b9EYbwIaFl2dhLNAQ2N32B/KP0wcv7mNnwOohnwG0KQ0uri kMKyvAuo+imQmqWY7SKkOJqhxyuo0CjmXvPuzPiegx7CEp1eWWVBNRGq9vNOVfRIjV 3DJn1MEh46Y6a6hfE7EKS41F/1LEc4ColaRpn0I2CWPov0yWvo733AmmOfvXgbHRgr 3luRcLNEb5eDurzt8xQr4kZ42Mo9qm/6hFcGLa2NY7nu+7vIP66LI5+zwSfdlOTqj9 u6ejNAwtaP6fO3S4D3Qb0YMhK8Fjg9AWtZZqPS3LFFOVQ4tZ6KM1K54snotzDWifWJ Cna7XbH2YlRZQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QrNIUwHqIbI2; Mon, 7 Aug 2023 10:37:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 4978D60DDF; Mon, 7 Aug 2023 10:37:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4978D60DDF X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 55B601BF3FB for ; Mon, 7 Aug 2023 10:37:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id F2F734085D for ; Mon, 7 Aug 2023 10:36:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org F2F734085D 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 IkW7HL9Dg_Xu for ; Mon, 7 Aug 2023 10:36:30 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0DA14401E8 for ; Mon, 7 Aug 2023 10:36:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0DA14401E8 X-IronPort-AV: E=McAfee;i="6600,9927,10794"; a="401482290" X-IronPort-AV: E=Sophos;i="6.01,261,1684825200"; d="scan'208";a="401482290" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2023 03:36:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="874262821" Received: from kkolacin-desk1.igk.intel.com ([10.102.102.152]) by fmsmga001.fm.intel.com with ESMTP; 07 Aug 2023 03:36:30 -0700 From: Karol Kolacinski To: intel-wired-lan@lists.osuosl.org Date: Mon, 7 Aug 2023 12:36:15 +0200 Message-Id: <20230807103624.468230-1-karol.kolacinski@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 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=1691404590; x=1722940590; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4IAWb9O7jg5ntQVaPfWe8BbWJrd2eC8zS3ha2332mwo=; b=Ka5uUA4x09nkW3+GeWjAjJ8zuzLh4mR6PJOxvIH0LoDUAttoouxUyLDf NpQEBA6WS4CL7UOG8FkDhFde+IRfRRVJq4PVaKS2OKTP/lZ2YWDQxFN2G Rddgf/tw1n6q0NnquX7NA1/pNxZYe51w1l63N37vB26XAMYZlhO0mnQ0x Pco9FY/8JrRpCszMSAHrkaxMMOO2rAscS0/s29swauCOJYMeuFXZyN53C AdPtb521yhK5nu2IKIzDJaGJqFagO1kTZB0O/p3wC1MH1QtYEJqW+QjVJ ebnYw03Y6Ja4lpQ4TcGC1pp4BB/M8d+GgBaxUbZdji9rf4ERwS7xdnb45 Q==; 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=Ka5uUA4x Subject: [Intel-wired-lan] [PATCH 0/9] ice: fix timestamping in reset process 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: Karol Kolacinski Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" PTP reset process has multiple places where timestamping can end up in an incorrect state. This series introduces a proper state machine for PTP and refactors a large part of the code to ensure that timestamping does not break. Karol Kolacinski (9): ice: use ice_pf_src_tmr_owned where available ice: introduce PTP state machine ice: pass reset type to PTP reset functions ice: rename PTP functions and fields ice: factor out ice_ptp_rebuild_owner() ice: remove ptp_tx ring parameter flag ice: modify tstamp_config only during TS mode set ice: restore timestamp configuration after reset ice: stop destroying and reinitalizing Tx tracker during reset drivers/net/ethernet/intel/ice/ice.h | 1 - drivers/net/ethernet/intel/ice/ice_ethtool.c | 2 +- drivers/net/ethernet/intel/ice/ice_main.c | 16 +- drivers/net/ethernet/intel/ice/ice_ptp.c | 331 ++++++++++++------- drivers/net/ethernet/intel/ice/ice_ptp.h | 36 +- drivers/net/ethernet/intel/ice/ice_txrx.c | 3 - drivers/net/ethernet/intel/ice/ice_txrx.h | 1 - 7 files changed, 247 insertions(+), 143 deletions(-)