From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (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 2F3733ACA51 for ; Thu, 5 Feb 2026 11:56:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770292612; cv=none; b=UvaHdjlleTH0b8C0JLLP598uNLc08G6HEnHmPhDCnmJbraUdz0D+WnLcuXKjQ9YKf/dwM7/KDekdufUrTSbV2XA8i6f9RVuV1HvtUxJL1UBpm6Us2+0AQEVoW6nOK+sQmvGwj11/lzIluM/IpNAkp660GeLLgJ8jbXkflU42P/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770292612; c=relaxed/simple; bh=ybbc+auNCktSq3UPFidjhvKH+YsOZgK6tem0lS+yldA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KNrX+t+/kgQwXWLjwH2yVNF9NRZM3WzUCGmQOivK0WWVO2colqz5NP/VwczHpT7tTa33ZwBxbIDbzZJDqZtJW+aM+NEOhN+sIbLpT0fmb+pJPznbMbtPX8cc2FBdEHSnG8AwGPmaAMt+ZGN6pX2vaeeDD2qSdh/8ehNYyO2aFYM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=tWjgK1GY; arc=none smtp.client-ip=91.218.175.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="tWjgK1GY" Message-ID: <6a0f4cbb-e8b3-4f0e-b7f1-7f9ca5cba97d@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770292608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YWd1t7s8OVCzkHAhm4N5l/L4ZD0CWDELd1TJlLAt68U=; b=tWjgK1GYjSewCFxQBoXE6X/4NUyrFwcikDUcmUkvHi15VclE2tLCZgaKnKapRe007LcxlF rm4ZcLBv9tiWAxt/q8yJrSc/tXpDJ7+1c6SmxIi2i5CsKS61MjwsAs6V72ZT/x00fGNgWn ep18WFCopxHrV2i7BZD7AffQdCzj9to= Date: Thu, 5 Feb 2026 11:56:44 +0000 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3] igb: Retrieve Tx timestamp directly from interrupt for i210 To: "Loktionov, Aleksandr" , Sebastian Andrzej Siewior Cc: Kurt Kanzenbach , "Nguyen, Anthony L" , "Kitszel, Przemyslaw" , Paul Menzel , "Gomes, Vinicius" , "netdev@vger.kernel.org" , Richard Cochran , "linux-kernel@vger.kernel.org" , Andrew Lunn , Eric Dumazet , "intel-wired-lan@lists.osuosl.org" , "Keller, Jacob E" , Jakub Kicinski , Paolo Abeni , "David S. Miller" References: <20260205-igb_irq_ts-v3-1-2efc7bc4b885@linutronix.de> <20260205100347.ssTBDAI_@linutronix.de> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 05/02/2026 10:37, Loktionov, Aleksandr wrote: > > >> -----Original Message----- >> From: Sebastian Andrzej Siewior >> Sent: Thursday, February 5, 2026 11:04 AM >> To: Loktionov, Aleksandr >> Cc: Kurt Kanzenbach ; Nguyen, Anthony L >> ; Kitszel, Przemyslaw >> ; Paul Menzel ; >> Vadim Fedorenko ; Gomes, Vinicius >> ; netdev@vger.kernel.org; Richard Cochran >> ; linux-kernel@vger.kernel.org; Andrew Lunn >> ; Eric Dumazet ; intel- >> wired-lan@lists.osuosl.org; Keller, Jacob E >> ; Jakub Kicinski ; Paolo >> Abeni ; David S. Miller >> Subject: Re: RE: [Intel-wired-lan] [PATCH iwl-next v3] igb: Retrieve >> Tx timestamp directly from interrupt for i210 >> >> On 2026-02-05 09:47:14 [+0000], Loktionov, Aleksandr wrote: >> … >>>> --- a/drivers/net/ethernet/intel/igb/igb_ptp.c >>>> +++ b/drivers/net/ethernet/intel/igb/igb_ptp.c >>>> @@ -796,6 +796,28 @@ static int igb_ptp_verify_pin(struct >> … >>>> + igb_ptp_tx_hwtstamp(adapter); <-Calls existing function >> designed for work queue! >>> >>> skb_tstamp_tx() can sleep >>> Smells like sleep-in-atomic isn't it? >> >> How or where can it sleep? >> >> Sebastian > > igb_ptp_tx_hwtstamp() -> https://elixir.bootlin.com/linux/v6.19-rc5/C/ident/skb_tstamp_tx -> https://elixir.bootlin.com/linux/v6.19-rc5/C/ident/__skb_complete_tx_timestamp -> https://elixir.bootlin.com/linux/v6.19-rc5/C/ident/sock_queue_err_skb -> https://elixir.bootlin.com/linux/v6.19-rc5/C/ident/skb_queue_tail -> https://elixir.bootlin.com/linux/v6.19-rc5/source/net/core/skbuff.c#L4075 > > spin_lock_irqsave(&wq_head->lock, flags); <- RT mutex can sleep Hmm... that actually means we have some drivers broken for RT kernels if they are processing TX timestamps within a single irq vector: - hisilicon/hns3 - intel/i40e (and ice probably) - marvell/mvpp2 For igb/igc/i40e it's still OK to process TX timestamps directly in MSI-X configuration, as ring processing has separate vector, right? But in general skb_tstamp_tx should be moved to BH processing (NAPI poll callback).