From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (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 337712E2DC3 for ; Mon, 11 Aug 2025 18:53:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754938410; cv=none; b=r0C7uxQkrEPi+Rd7aezXP/9nK6HT6vkSTHVtypjiGAQLx9tZBgtXpfBwZeePVNjoS6Cg4nkLkY/N9S6VaUHloyZrjXQq0e3sszaHgO3Z0QrUu9rFjPl909JkKy3bro2DMyuFDaaMMRNGZxZWbZts5qnCauupGLYfg2dZLrzF5Xg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754938410; c=relaxed/simple; bh=ACaCCx/zYEw6greU3vAV3sCC6jE2zat1KZSmI+K260U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ge8KUbcxHp/BZOV0ueQVqyPTmzqV/11TZnqCVNAjMMBMRubJ5rUeBv4KWTD+YFqHfauzm4oOcc8CmSXSfOYQkIYm6Mygk6QLFdlgIW0+mgYmlxOtB6N1vGQRqk3v5PV+QsByLmgUc9serEUbyMzlIclHGRHWQwNMJxvAS8ChRuY= 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=u136D40H; arc=none smtp.client-ip=91.218.175.173 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="u136D40H" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1754938405; 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=0R2bnIhPyR3QQbpGsQ2ZiExRLQ4FHglk5+SDpIvYRfw=; b=u136D40HAZRm2Ns4PIkj7lNjk9GpEzIDA0c6PL4vfZunBpXOL+T8bK9eSHezE+/ErbtzoA LFQBQRUjQbRcJ1FXpHpS4eMH3GHZTlm1PKk0cvRkbUEl1ubAtZ3EEn0ylwCcFNanSmEGhi 3Gh+X8fqy4yk5tSREu0rhyEpC/kmjMI= Date: Mon, 11 Aug 2025 14:53:19 -0400 Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net-next v2 12/18] net: macb: match skb_reserve(skb, NET_IP_ALIGN) with HW alignment To: =?UTF-8?Q?Th=C3=A9o_Lebrun?= , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nicolas Ferre , Claudiu Beznea , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Samuel Holland , Richard Cochran , Russell King , Thomas Bogendoerfer , Vladimir Kondratiev , Gregory CLEMENT , Cyrille Pitchen , Harini Katakam , Rafal Ozieblo , Haavard Skinnemoen Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-mips@vger.kernel.org, Thomas Petazzoni , Tawfik Bayouk References: <20250627-macb-v2-0-ff8207d0bb77@bootlin.com> <20250627-macb-v2-12-ff8207d0bb77@bootlin.com> <1a4fe95a-f029-43b2-aed1-594365254b6a@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 8/7/25 11:24, Théo Lebrun wrote: > On Tue Jul 1, 2025 at 6:40 PM CEST, Sean Anderson wrote: >> On 6/27/25 05:08, Théo Lebrun wrote: >>> If HW is RSC capable, it cannot add dummy bytes at the start of IP >> >> Receive-side coalescing? Can you add a brief description of this >> feature to your commit message? > > Yes that is Receive Side Coalescing. Clearly it needs to be mentioned > out loud, and briefly described. > >>> packets. Alignment (ie number of dummy bytes) is configured using the >>> RBOF field inside the NCFGR register. >>> >>> On the software side, the skb_reserve(skb, NET_IP_ALIGN) call must only >>> be done if those dummy bytes are added by the hardware; notice the >>> skb_reserve() is done AFTER writing the address to the device. >>> >>> We cannot do the skb_reserve() call BEFORE writing the address because >>> the address field ignores the low 2/3 bits. Conclusion: in some cases, >>> we risk not being able to respect the NET_IP_ALIGN value (which is >>> picked based on unaligned CPU access performance). >>> >>> Fixes: 4df95131ea80 ("net/macb: change RX path for GEM") >> >> Do any existing MACBs support RSC? Is this a fix? > > I have no idea. If any MACB supports RSC, it must be those running with > NET_IP_ALIGN=0, so arm64/powerpc/x86. > > Is it a fix? We can guess that all boards fall in either category: > - Don't support RSC (=> RBOF works fine). > - Support RSC (=> RBOF not working) AND NET_IP_ALIGN=0. > > Both of those are not impacted, so we technically don't fix anything for > current users. OK, then please drop the fixes tag then. --Sean