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 A8249EA8106 for ; Tue, 10 Feb 2026 12:12:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4307361080; Tue, 10 Feb 2026 12:12:18 +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 5qcttuDmBwhC; Tue, 10 Feb 2026 12:12:16 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 777B960EED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1770725536; bh=tI8rachHCW1YrsKlENUN2dkik2zbYzc6d1Scl8Q1OUA=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=3jEoIBNw398r/xiCv4rx7lF9dEces2MeLI84ZUOKTZJy2fhk7tltFI2huKBOgDdv/ C4qsqXeLMiaCGITEULg8eK2v1qVk9LFGxtxjmqDrJKpHaGQDTYazoOT/hki4sYXax+ ave/OeUgt4C1OnW252mnfScMCY6uS+baMc8nLNKoMNvYnil16tC6hDd7hO1GzwRXJ+ CKvVfn0szmsNuQ3UWns4x6i9kV9BslEufBYbNbPBnKfYDbCHuIffE4ZpVMM/9hbJcX 7CernzDNp8iWxj9pYObDG35inTd0QS8VRZvUniNBEPGtsdhClXjVLEzUxji74Qi5EE ruqIxxy0kdk6w== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 777B960EED; Tue, 10 Feb 2026 12:12:16 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 72C44219 for ; Tue, 10 Feb 2026 12:12:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 54DFC81DE0 for ; Tue, 10 Feb 2026 12:12:15 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id kUQ2c1xgCWIp for ; Tue, 10 Feb 2026 12:12:14 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a0a:51c0:0:12e:550::1; helo=galois.linutronix.de; envelope-from=bigeasy@linutronix.de; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 82EB581DCB DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 82EB581DCB Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by smtp1.osuosl.org (Postfix) with ESMTPS id 82EB581DCB for ; Tue, 10 Feb 2026 12:12:14 +0000 (UTC) Date: Tue, 10 Feb 2026 13:12:07 +0100 From: Sebastian Andrzej Siewior To: Willem de Bruijn Cc: Vadim Fedorenko , Willem de Bruijn , Jakub Kicinski , Paolo Abeni , Eric Dumazet , "David S. Miller" , "Loktionov, Aleksandr" , Kurt Kanzenbach , "Nguyen, Anthony L" , "Kitszel, Przemyslaw" , Paul Menzel , "Gomes, Vinicius" , "netdev@vger.kernel.org" , Richard Cochran , "linux-kernel@vger.kernel.org" , Andrew Lunn , "intel-wired-lan@lists.osuosl.org" , "Keller, Jacob E" Message-ID: <20260210121207.9kLHroS0@linutronix.de> References: <20260205164341.pJvni8kA@linutronix.de> <76acd5cc-eb6f-4c56-a5e6-f6413736afbb@linux.dev> <601f0c4b-52d8-4b60-96bf-f2d65f8073d8@linux.dev> <20260209090621.GiZqTiMJ@linutronix.de> <8e762437-69f9-40d7-bb75-3a45bef1d5d6@linux.dev> <20260209114836.GPU-vnnh@linutronix.de> <78e2af2c-40e6-43f1-9471-42f350e69389@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1770725529; 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: in-reply-to:in-reply-to:references:references; bh=tI8rachHCW1YrsKlENUN2dkik2zbYzc6d1Scl8Q1OUA=; b=4cBXjqmEwfbym2UMalBRUx1DCMtvXGMDsMYZ5QihD2VOdj3vY9K2+Q5Hn4feWU3tHsNT3H 6XQvAOjUmW61/f8pQGN0jxgsi/IrNPmrcUlnBLrnX4eSWqv23C2S+9J+sHbxEeqmhvgVRD XNjLA/LpqpJ8NILOhwHvgtPGpKaixCUIxcBfSxAT9p42zaoN99orCG5MoWo7rsR2BdCrYV xctRhc2Irim8DAKSgDA2B5PA/2Og/97rlrOyPRxI4tpsBGQiwGBqZ+Pqg1lzES9NasmLec 1Mb2wVE7EcbLKoBysM9sDYPPSvFlKFq5cmP4h4j19zxkbnSAG5pthDp5gIHHHQ== X-Mailman-Original-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1770725529; 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: in-reply-to:in-reply-to:references:references; bh=tI8rachHCW1YrsKlENUN2dkik2zbYzc6d1Scl8Q1OUA=; b=h7rNchUaqkwxuTXB6Jov+Fu/QIRlWJljNkNAJuX5BAyfCpviifZupK2Dl9CuYm8nIOYQe+ t8OpHnTnnOkMirAg== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=linutronix.de X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=4cBXjqmE; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=h7rNchUa Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3] igb: Retrieve Tx timestamp directly from interrupt for i210 X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On 2026-02-09 07:46:01 [-0500], Willem de Bruijn wrote: > > > Yeah, but what is the legacy user here? If you enable HW-timestamps but > > > never set OPT_TSONLY and the sysctl is also 0 then you reply on the > > > CAP_NET_RAW later on. Right? > > > > Legacy users here means users of HW TX timestamps expecting full skb to > > be returned back with the TX timestamp. Legacy here means that skb will > > be returned with headers modified by stack, which is kind of exposure of > > data, which requires CAP_NET_RAW... Ah okay. I assumed the err-queue was the standard way of receiving timestamps. > > > I just try to justify the CAP_NET_RAW check and if it is required to > > > move it earlier (where HW timestamps are enabled). And if the sysctl > > > check is enough then maybe it is not needed. > > > > Capabilities should not change during lifetime of the process, should be > > fine to move. On the other, sysctl can be changed system-wide which may > > affect users. > > Ignore the hardware configuration. That is entirely optional. Some > devices will timestamp every packet. > > The capability check here is per-socket, independent from the system > hardware configuration. > > I don't see how it could be moved. > > Before OPT_TSONLY was introduced packets were always queued with their > payload. The sysctl check was added to optionally disallow this. The > check could arguably be moved earlier in the socket lifecycle and the > decision cached in the socket. But then flipping the sysctl would not > affect existing sockets, so that is a change in ABI behavior. You could cache only the part under sk_callback_lock. Any other suggestions? The access from IRQ is quick and avoids any detours. The alternative would be to move the whole routine into an aux_worker. For every driver doing it from the IRQ handler. Sebastian