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 D76B1EA3F22 for ; Tue, 10 Feb 2026 16:14:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8AE31411F0; Tue, 10 Feb 2026 16:14:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id xbgB-Ilk_8lJ; Tue, 10 Feb 2026 16:14:20 +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 smtp4.osuosl.org 1927740677 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1770740060; bh=gchGUW1rkpuZA2Rc75u+DqHEmEZ2JQMqcNEoDXirPgQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=nGj0dp7wdGOKls1clGQ9dNy8QzOv85ov15xr3hzh1WPXYlhTSoomQiYQo8SfJdSJK lcwXEb15IMl3w7IRah+hX2qzw6ViNbKheLHsixCUrF42ZX1vGn0TpUP67ub1XnyuuV Yzan8pmFP4M/2iNvbNfO77TZm9MU3nzPc5WPWJY0HARuczkgJJlAL/gt/rOk/i619m LLoeL5TBkNYzIaCuitad7fdqB1h/j0L9TzUEg78Wf2SGJPkctCBZ++SvApk9UJ2rR4 8q0xuXCzPGDj6AB4J3STUqetFnThfgcw/inoRd3bW4xQpPUcPdIw57KCalBe+aQWQC IePK3sqff+/Qg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 1927740677; Tue, 10 Feb 2026 16:14:20 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id 06466F2 for ; Tue, 10 Feb 2026 16:14:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id EB88381387 for ; Tue, 10 Feb 2026 16:14:18 +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 dvsczsWHMtGm for ; Tue, 10 Feb 2026 16:14:18 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::112d; helo=mail-yw1-x112d.google.com; envelope-from=willemdebruijn.kernel@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 1478581346 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1478581346 Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1478581346 for ; Tue, 10 Feb 2026 16:14:17 +0000 (UTC) Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-7962119ff2bso43700187b3.3 for ; Tue, 10 Feb 2026 08:14:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770740057; x=1771344857; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gchGUW1rkpuZA2Rc75u+DqHE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Vaflzf9VWV2Tk7ZmkQd/yBu4HAeKYCnFZWQjB+7gxSM3hKFo4reMJq74ePwK4M= X-Received: by 2002:a05:690c:c50b:b0:796:2fde:5dbe with SMTP id 00721157ae682-7962fde6696mr123516557b3.44.1770740056764; Tue, 10 Feb 2026 08:14:16 -0800 (PST) Received: from gmail.com (21.33.48.34.bc.googleusercontent.com. [34.48.33.21]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-7964cd48badsm49249307b3.19.2026.02.10.08.14.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Feb 2026 08:14:15 -0800 (PST) Date: Tue, 10 Feb 2026 11:14:15 -0500 From: Willem de Bruijn To: Sebastian Andrzej Siewior , 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: In-Reply-To: <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> <20260210121207.9kLHroS0@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770740057; x=1771344857; darn=lists.osuosl.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=gchGUW1rkpuZA2Rc75u+DqHEmEZ2JQMqcNEoDXirPgQ=; b=nLwCuaaa8TMjXIfMO7dF+1GABsxq3079dkvZ/C/RCsJv8gO8Z7bA4jQkdTjoKAZf6e cek5SpE4z8TtjlvgUf0q9zuaGhCr5G3UKCbqyGkg5kvO89o+JmUmBKU/gANtqtAeHsog I4vnkJKguD92TA3BbUwDuRxQumV2qPKhXrcZPB7SXjZRxNvrB1Gr6PuxiUMzWIJaYyEv 64o2B69xTfLiD6bx8ts65J8wzZGYrBBCT1RC0QO+Tu95DEBGCcxRfbdk7Im/4ILLs4G8 pPAP8WXndcuZxRj1ac6WMZ7pl0b4rMp4qh3mNsdzpNJkL2Y+4XSclqFjA6UtES8KlM6L tY3Q== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=nLwCuaaa 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" Sebastian Andrzej Siewior wrote: > 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. It is, for tx timestamps. The open question is whether they are queued with or without packet payload. > > > > 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. Can you elaborate a bit? > 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. Perhaps CAP_NET_RAW can be checked in a way that does not require this specific lock. See for instance other examples that instead use sockopt_ns_capable(sock_net(sk)->user_ns, CAP_NET_RAW). Though that uses current_cred() so probably won't work in interrupt context. Changing the check may subtly change behavior. But that may be acceptable as long as the consequences are clearly described. An alternative would be to delay until dequeue. But that would wake the reader and then drop the packets, so without any data to read. Not practical. The core issue seems to be that the ptp_tx_work is not scheduled quickly enough. I wonder if that is the issue to be fixed. When/why is this too slow?