From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ADD42F4A; Tue, 26 Mar 2024 18:30:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711477832; cv=none; b=rqFWNTZowylvS1v2klprQILFfcrZCdJ24nCKx7PWe/BRErnCzmBxooFn+QZxba8V4edi3l03H7kcs9Ji5jI+ggr1odvIHSEwuWfE8fgR9afcowRSKjUnkzHNKguJUdYI1n+dAtXWxzEIOAD4IYPq0CeFWgUQ13Q+vlpxEkjLdck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711477832; c=relaxed/simple; bh=uBLkN0mAj3ZSbr4KU4lSaYj97mBcP/vKRcrn/2cfNJo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=USNTvjxKBKxP9SeWtAdajyWrZ5MXq6li/+J5PqTMMGy9H1QkPWtcbiyo8lyI7V1GGEUtZKs4uxq2iV1HYga+MQX7q5DhUFhA7sE2oNXz1o6lqJAhX5yMjrkSNbhAp8syrWN2gXMNO8Mv15dMTNi0ETtvvrmLxjZIKMY6K92d9y4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Q2KPHxJj; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Q2KPHxJj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711477830; x=1743013830; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=uBLkN0mAj3ZSbr4KU4lSaYj97mBcP/vKRcrn/2cfNJo=; b=Q2KPHxJjCPh5vMVXxfh8EjyQp+kGpXaVvfVknWsNnjvJZ9Bvn4SIFSh/ 1sCUli35r+rbKOBad2R8WLTxvcCoL0fOG6BO5dS1NOcq0XaOog0GKXlX0 UOvrEAggoJzzD8eoBK17LHynOJwbBlTlEitGMwD9yfbJ7SpXqsweri6QQ RB9jpWunrL3uz1D1gmMMlJkfPVNZzQi3V0W1OBNazN0JwEU9mBHg5EJKH DDuzBltN9OLuyH7ACmyDWz5p5ZEH68SsH+ft6Wsxxqk325mwajOwf6IjS O4q2miMX80Zr9gRVKOpRPjkE24Dq6piwb5+7tgc68jjevQ7sbQcq4tW/W Q==; X-CSE-ConnectionGUID: b7K5pEkuQ6e4WFK3MTl/3A== X-CSE-MsgGUID: Bp8GSavDRgaNO+i+aQkiKw== X-IronPort-AV: E=McAfee;i="6600,9927,11025"; a="17692503" X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="17692503" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2024 11:30:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="20697374" Received: from unknown (HELO vcostago-mobl3) ([10.124.221.236]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2024 11:30:29 -0700 From: Vinicius Costa Gomes To: "Song, Yoong Siang" , "Brandeburg, Jesse" , "Nguyen, Anthony L" , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , "Bezdeka, Florian" , Kurt Kanzenbach , "Fijalkowski, Maciej" Cc: "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bpf@vger.kernel.org" , "xdp-hints@xdp-project.net" Subject: RE: [PATCH iwl-next,v4 1/1] igc: Add Tx hardware timestamp request for AF_XDP zero-copy packet In-Reply-To: References: <20240325020928.1987947-1-yoong.siang.song@intel.com> <87h6gtpvyn.fsf@intel.com> Date: Tue, 26 Mar 2024 11:30:27 -0700 Message-ID: <871q7wq20s.fsf@intel.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Song, Yoong Siang" writes: >> >>More a question: you are potentially triggering an interrupt from >>igc_ptp_clear_tx_tstamp() (igc_xsk_wakeup()) which can be called from >>igc_down(). So, how does it work when there's a pending timestamp and >>you remove the igc module? (example of a situation that it might be >>problematic). > > Hi Vinicius, > > Thanks for reviewing the patch. > > There is test_bit(__IGC_DOWN, &adapter->state) checking in > igc_sxk_wakeup(). Since igc_down() will set __IGC_DOWN before > call into igc_ptp_suspend(), so I believe the checking in igc_sxk_wakeup() > should be enough to prevent the situation that you mentioned. > Oh, I missed that one, sorry. Then: Acked-by: Vinicius Costa Gomes Cheers, -- Vinicius 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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 144D9C6FD1F for ; Tue, 26 Mar 2024 18:30:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A56C860613; Tue, 26 Mar 2024 18:30:35 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 2341zRQs7cJs; Tue, 26 Mar 2024 18:30:33 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org AD20260648 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1711477833; bh=QhxmfxblwX/FGmQaoQOO5EDZYe8wiAfvIozDi8CxlmI=; h=From:To:In-Reply-To:References:Date:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=WEaCt/+sv3mubHxZ6AOrzpv+V66eNAStUD2NGvGvIXmgFTVl0pmH0ZXpU5ZQPYLtn GONvxFV5q42a/cLk7wm+wxWw47rMqcQjet+jb00PZn2w/JKYEe2Kx5ntWungp4nV3V tplotsxvSchDBc2/gqLS20pbn1qTaxYI4J/3x5dcYhAnh23uXvu1xHcXyNjW/kEvc/ alwgU1CW3V+jBNaJEmWgI+rXe+OUn6e3KLYE9r3mhkG/r9QmyukNP+Z5u/OjyBnzvR 6cii+ucdMM8BG0a6eBXaYagO+6tqXzRsESaxd+U+mifTsP79vPXbAOAZLHvxnt20rj YJScI2snhCXjQ== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id AD20260648; Tue, 26 Mar 2024 18:30:33 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 9EDF31BF2B9 for ; Tue, 26 Mar 2024 18:30:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 87BB64013C for ; Tue, 26 Mar 2024 18:30:32 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id OVliKw5MlexW for ; Tue, 26 Mar 2024 18:30:32 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.13; helo=mgamail.intel.com; envelope-from=vinicius.gomes@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org B5726400FE DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B5726400FE Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by smtp2.osuosl.org (Postfix) with ESMTPS id B5726400FE for ; Tue, 26 Mar 2024 18:30:31 +0000 (UTC) X-CSE-ConnectionGUID: VwwE7LkuQFqZaSfhqanXOg== X-CSE-MsgGUID: gVL3Op2TQOWw4vm8pWonow== X-IronPort-AV: E=McAfee;i="6600,9927,11025"; a="17692505" X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="17692505" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2024 11:30:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="20697374" Received: from unknown (HELO vcostago-mobl3) ([10.124.221.236]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2024 11:30:29 -0700 From: Vinicius Costa Gomes To: "Song, Yoong Siang" , "Brandeburg, Jesse" , "Nguyen, Anthony L" , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , "Bezdeka, Florian" , Kurt Kanzenbach , "Fijalkowski, Maciej" In-Reply-To: References: <20240325020928.1987947-1-yoong.siang.song@intel.com> <87h6gtpvyn.fsf@intel.com> Date: Tue, 26 Mar 2024 11:30:27 -0700 Message-ID: <871q7wq20s.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain 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=1711477832; x=1743013832; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=uBLkN0mAj3ZSbr4KU4lSaYj97mBcP/vKRcrn/2cfNJo=; b=IFWbKjt7BfKs9XNEyeSRopq3CCfnnPDmxj5VX5Xiw++ZwP8dgmXdrrWV Yi8pRYrh/puOv2/BdOY4jWS2Eu5tgwRnp4at/i4fEscVPKg473BSc7Zw3 qu/9nRnkQT3ICigsxHqbTbdGDXYXLSKA6ILuffPnvIEWM+R3AR7RsQV6c Y6cPgOL/TCe+2+IooWEKkHaYMvShWWP6sIdY06mK10IVgrDJzNh/+gs44 jHvk20Mt8vEwTbG7571kEzTRGKx4nHGbX+HJZOQmSdTmR5v80e9QuuXE0 VO1gwaz9m6pCtkrn53Xe8CFkeWAdxQaGnpuxaxw4ZLuSjjuUKqkqCffEu g==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=IFWbKjt7 Subject: Re: [Intel-wired-lan] [PATCH iwl-next, v4 1/1] igc: Add Tx hardware timestamp request for AF_XDP zero-copy packet 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: "netdev@vger.kernel.org" , "bpf@vger.kernel.org" , "xdp-hints@xdp-project.net" , "intel-wired-lan@lists.osuosl.org" , "linux-kernel@vger.kernel.org" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" "Song, Yoong Siang" writes: >> >>More a question: you are potentially triggering an interrupt from >>igc_ptp_clear_tx_tstamp() (igc_xsk_wakeup()) which can be called from >>igc_down(). So, how does it work when there's a pending timestamp and >>you remove the igc module? (example of a situation that it might be >>problematic). > > Hi Vinicius, > > Thanks for reviewing the patch. > > There is test_bit(__IGC_DOWN, &adapter->state) checking in > igc_sxk_wakeup(). Since igc_down() will set __IGC_DOWN before > call into igc_ptp_suspend(), so I believe the checking in igc_sxk_wakeup() > should be enough to prevent the situation that you mentioned. > Oh, I missed that one, sorry. Then: Acked-by: Vinicius Costa Gomes Cheers, -- Vinicius