From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (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 A5E4630EF9B for ; Thu, 26 Feb 2026 10:49:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.13.80.246 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772102987; cv=none; b=LsAe8rbaqyHjlc+ZrF7eM8EBLAQfWOWzhixMdmFhdg+9K/uQoIJblYPvkvyX3Y8qcpH1ca8P/Omm+riSNAGwI4U+lGerCi0lMFtYXV0tKBlUukPbJxgO07VEyPyTB5mJmiGe9pTx9mXnHPvxvLxZZ6tpCxryRslUlj6y8cNiWvk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772102987; c=relaxed/simple; bh=ZW8VyAp+w0dfg+/3/eISbRejprAVSGfHEntjmZGncjM=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=oE1uB6VcUSt2tjvFYbTf+32Az1iUcANgLhXo7e/QxhIo2O91m5P1N2mz+ba5Cdm6FHqOTuHOBmdD9zx25TUucqU0gLsxZwZkUdD+G6CnNQ9RjOrGKRDZNG8CCnNLIEIsjzjYPR8VnijnnV8289lPhkm/QeGg0ALd0a8rlRmIm8k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b=dmdX9L9D; arc=none smtp.client-ip=194.13.80.246 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b="dmdX9L9D" Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E97C3A0372; Thu, 26 Feb 2026 11:49:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1772102981; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=+8F6uaAAY+nVOcexAkwvGHGH7ZBxlH5CrIG25K9cK8M=; b=dmdX9L9DFyuFztWLTBIVbxkDY6VEY1uOGIRBP5iZKj8KalSMEXWhM/0Tnctbhhpv2S+zGC C+SBnP/2I0DjhlqQr33Z6dQuSFBqiC912K2T04QVBgLMYPBzrVMNWSJAtduAPlduOZcwmA wCHC49+wtq7pnXKu6JIzX6Kim5yU9q+zMDsH3bGztXiu7zODU3eMDIPgUAot+ia4Qidp2K Lu40FII4yZaom0djW2/VQBZMSr4kcXiprJpv3rDri2nTylgeY1m0JCEOSAuKxjfib8zI9y RK88iPJ+xDInRBq+RjdqbugYNJ+BjWDXkJEc+n8pz/nZ0lIqXed6KoreZsnHZQ== Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Thu, 26 Feb 2026 11:49:39 +0100 From: Nicolai Buchwitz To: =?UTF-8?Q?Th=C3=A9o_Lebrun?= Cc: "Russell King (Oracle)" , netdev@vger.kernel.org, andrew+netdev@lunn.ch, claudiu.beznea@tuxon.dev, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, nicolas.ferre@microchip.com, pabeni@redhat.com, phil@raspberrypi.com, =?UTF-8?Q?Gr=C3=A9gory_Clemen?= =?UTF-8?Q?t?= , Thomas Petazzoni Subject: Re: [PATCH 3/5] net: cadence: macb: implement EEE TX LPI support In-Reply-To: References: <20260225091558.51157-1-nb@tipi-net.de> <20260225091558.51157-4-nb@tipi-net.de> Message-ID: <342fd96e9f9668392705496e54d93eff@tipi-net.de> X-Sender: nb@tipi-net.de Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 On 26.2.2026 10:52, Théo Lebrun wrote: > On Wed Feb 25, 2026 at 6:50 PM CET, Russell King (Oracle) wrote: >> On Wed, Feb 25, 2026 at 06:42:08PM +0100, Théo Lebrun wrote: >>> On Wed Feb 25, 2026 at 10:15 AM CET, Nicolai Buchwitz wrote: >>> > @@ -2349,6 +2454,8 @@ static netdev_tx_t macb_start_xmit(struct sk_buff *skb, struct net_device *dev) >>> > netdev_tx_sent_queue(netdev_get_tx_queue(bp->dev, queue_index), >>> > skb->len); >>> > >>> > + macb_tx_lpi_wake(bp); >>> >>> Should this be protected by a bp->eee_active condition? It could go >>> in macb_tx_lpi_wake(). We avoid a spinlock acquire per xmit for most >>> platforms. Probably negligeable though. >> >> It will read the register, find the bit clear, and then return if >> EEE is already disabled. > > Yes I agree with your sentence, sorry my point was unclear. I was not > describing a bug but rather a performance optimisation. > > We would look up bp->eee_active to know if we can avoid calling > macb_tx_lpi_set(), to avoid grabbing bp->lock once per xmit. > That spinlock is interface-wide. So you're suggesting to revert to the v2 approach? https://patchwork.kernel.org/project/netdevbpf/patch/20260224091821.47671-4-nb@tipi-net.de/ > > Thanks, > > -- > Théo Lebrun, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com Nicolai