Article View: linux.kernel.netdev
Article #1509Re: [PATCH net-next] net: ag71xx: align the IP header behind DSA tags
From: Rosen Penev
Date: Fri, 09 Oct 2026 22:27
Date: Fri, 09 Oct 2026 22:27
35 lines
10562 bytes
10562 bytes
On Fri, Oct 9, 2026 at 9:47 AM Simon Horman <horms@kernel.org> wrote: > > On Wed, Oct 07, 2026 at 10:44:49AM -0700, Rosen Penev wrote: > > The receive buffer offset includes NET_IP_ALIGN to get the IP header > > aligned behind a 14 byte Ethernet header. Most ag71xx devices use DSA > > switches whose tag sits in front of the EtherType, which moves the IP > > header by another 2 bytes. Every access to the IP and TCP headers then > > traps and gets emulated by the unaligned access handler, around 6 times > > per forwarded frame. > > > > Take the headroom needed by the DSA tagger into account when choosing > > the offset. > > > > TP-Link Archer C7 v2 (qca8k), median of 3 runs, Mbit/s: > > > > before after > > routed up 743 855 > > routed down 660 749 > > local receive 554 572 > > > > The unaligned instruction counter no longer moves while forwarding. > > > > Assisted-by: LLM > > Signed-off-by: Rosen Penev <rosenp@gmail.com> > > Unfortunately this patch did not apply cleanly to net-next at the time it > was posted, so our CI did not run. It appears I was careless and sent it ahead of local commits. Will resend. > > Please rebase and repost. > > -- > pw-bot: changes-requested
Technical Details
Message-ID:
<CAKxU2N_=H=D0p=g0XBqFtJFHDpidO-5d7P1kKZxXEDX86BGnPw@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343986-linux-kernel-netdev=dewy.ruReferences:
<20261007174449.671416-1-rosenp@gmail.com> <20261009164732.GG83879@horms.kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343986-linux-kernel-netdev=dewy.ru
From: rosenp@gmail.com (Rosen Penev)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next] net: ag71xx: align the IP header behind DSA tags
Date: Fri, 9 Oct 2026 15:27:10 -0700
Organization: Usenet Network
Message-ID: <CAKxU2N_=H=D0p=g0XBqFtJFHDpidO-5d7P1kKZxXEDX86BGnPw@mail.gmail.com>
References: <20261007174449.671416-1-rosenp@gmail.com> <20261009164732.GG83879@horms.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="1209351"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:nKbX3JhnKoL5sEkJrqMuPKiuEL8= sha256:7uKKvFjDqlmx5GgVIvJGxuAC8ioJzbAzh0/A0sYrekk=
sha1:Ctl4F41MkaGamD96JRQqbmr2sWM= sha256:wfRbF8RjN2t6xaZFJe5GKdpbBHfsujS4UP9apXYxO9s=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 1992C10F809; Sat, 10 Oct 2026 01:33:44 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.749
X-Spam-Status: No, score=-0.749 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id le2V3Z9e6EiB;
Sat, 10 Oct 2026 01:33:41 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-343986-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 12CFE10F7F5; Sat, 10 Oct 2026 01:33:37 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sea.lore.kernel.org (Postfix) with ESMTP id 37D103F40E; Fri, 9 Oct 2026 22:28:37 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 49A143D669D;
Fri, 9 Oct 2026 22:27:24 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OfNxO3Fx"
X-Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF2154FDA64
for <netdev@vger.kernel.org>; Fri, 9 Oct 2026 22:27:22 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.208.52
X-ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791584844; cv=pass; b=FCZpCJUYCm1eRXb+QPAb5aNXpdS6YDKwO32ddPAu/bBhE7EoB98AJs+AIzwisoM7YET2TksNFVkWLRnran1Vfqu9N/V/n46Dx/HgnixCONlyIPmnABQowPUE06MmUVusfDhlf01hM8KRD0ocfpBCDN2SOvgcSz8GM+y0YtP6u0c=
X-ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791584844; c=relaxed/simple;
bh=nvZAxM1uTFf6vqYXeKGDUerVMz9C1MteMmjjs+5GFBI=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=l+C/rM5Y0PbXR4+ryF4lOUEOuvjdozGLH/TxA/36esHacS4nAH9Ra0wn0e7FmGpBCU+sNmd4dEVvnnlw/n4enMaZfsHdBzeLCDZHZyoaP+G62EIGhS33BoJ0yDXMEn46t1nRDkP2j88f3rqPSmZKl6Buuwc7iHf5qwLgHXglnVY=
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OfNxO3Fx; arc=pass smtp.client-ip=209.85.208.52
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-6acba4bf65eso252907a12.1
for <netdev@vger.kernel.org>; Fri, 09 Oct 2026 15:27:22 -0700 (PDT)
X-ARC-Seal: i=1; a=rsa-sha256; t=1791584841; cv=none;
d=google.com; s=arc-20260327;
b=Etx1OQ1AardzB9DYu+pgfywCfbcNxKWIuThyHnuZ04/QaobZtpKOTUuvABulmqE6C3
lCRab5rvNMjC5dFw3ULWCx2DPRUUJny603ZK3s+yOIRhSSTu4IOnD+ArkrkVOn/FF+vs
QPsQy/XRj+PSYm6vnav6yPvj9SgngOZOckAR3x/rER2MONDxq+bSDAzscVmGPVdyDFn5
MeLKyLTkTAYk+uCioy5Hcl1VKp4i33j0hecP56sxKCdEKiD6eJwvGuS9kavF+SYTHvM8
Wx8k3yn8ngrz3rGMk/lJ8KfBspynK2vLqf82XVjpRSIqhTL1fW30FBPQ3OQNztPX34Ov
BZzQ==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:dkim-signature;
bh=Uiiw0pSBFiqDyg4Oqrw5tZefMD0LZeMyg0eFusxD5zQ=;
fh=uA/gQDxeH5EXosqVQ99q9VpcrtUYliT6RHyDBlZM7J8=;
b=sOcBRerwOpc4WtGFrRH/Zs8Np6ikFA1fSTRaGIU6CBcGvgYVoLS03bcqUac7CggMGa
8FtLDjHRrsWt1SDsmhsigLVJQPQlzjXQVm0v0IktiIcsrLNAKtQnPOHrTb+JW7E6gBsm
20V97M5d4ZALCdUIa9qr+BmCqOgUkPTgLDB+E8hqjUMsEQtPi+gAOIkNuIgyBIgEW1y5
XBb8VRMnKBoTKKRQ2LnhmKX2rF3RWNxgxLzpwlYcggkozaX4svNKr4fCwrHfh8we1Cj5
BfywtJQr6WbN1VUvkpukN65DkU9DLMb4UTHAoF8t4QaKNFPmuqra2stPUyln84ZpEBm2
/44A==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1791584841; x=1792189641; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=Uiiw0pSBFiqDyg4Oqrw5tZefMD0LZeMyg0eFusxD5zQ=;
b=OfNxO3FxSMNHbDRZHri/Rxk6+3oT9GsmxGt6lpkyjWfJsTp2pSfFPHaoZ/FpiPyRVT
+0OI3qcwfmr/foQMDxow0SldLHCtMrFR61aAttpHl1iVgRAW7q/vfklsX/8XfPlQdJ+Q
LFMix9pbndGbc6JaSIH6KUBkaocfgm6XfgheQ6JFKOI9O3xU1dq4wAQlviOlzB9lQWP1
MoEQaUBj6GCxdFotaN/YwgUdaPBrTSbOGtcPRRWmr88zdEGcKwfRv6jRPWxWCrr/W6N6
fbXh39/LkgXjVl5qfbNv8K1Kg4P66wgShjNrXOHsJzennVHL98miM6kGL5PngttfCdo+
dm8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1791584841; x=1792189641;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=Uiiw0pSBFiqDyg4Oqrw5tZefMD0LZeMyg0eFusxD5zQ=;
b=FdsV4TzCDuXLopxDW119M6aDISW7h+TlXt4aIJXFBfOVpRwEhthUJcm/OASUc+pNuj
VqNP5TR46eme8YGi3bKbhHRSFIBAhOJXLpyb8vxUxJEqUZke+MNyZOVMPfNSVUv/Hnk8
lYm9TyPa6AdpQsDWJsxGKTpCeYqfhGENeRU1QERhow2S4W9F8eRBV2WG2JUfxV5ySBnQ
dKmLmcazJxXG6VBkK+GfUSV0qdagQOl6vpKgdVGoa7IRC7mf54DKNdTM/7AWQlwEZe5U
4/7A/GsyqOvVoXSUk8allEH9koXehZfYYN4E/bLOKgrYJ1/rbZyaUfWiCWDqZjc5JeGI
OO7A==
X-Gm-Message-State: AFq9FYJgGyieXr64Ea4yG2sLvamxcxwgXeFKEv0sXO+QLd4YAn9AkJ+K
xHjh4RCqzKX/a1/8Bk71XK+C9gYnoA7hlhQfBtr2nhQBYSY+OCauoV5mcxH08vUEeS6wfpn8QDm
Qx6UnRkzAw/VGwZLdvCt1YO6N7p26vDc=
X-Gm-Gg: AYBFou1GSitJKMa38Ri7N/EUrY2ETeg1QnfBokIgXThsmbfgPOceSAUaubAtiz21Jl7
ffdu+Sgw6gKuwhvEhTM5Nfk4LRrLq1OEgb994KI/QMgUx7VV1CgZ4I8VIr7/z4V6gI9uoCmtJx5
9434+jldgg0WpuU44BNElg0lltCTVoqgyBXuAOQ4jmEu4uDiim4GssAgWvXlOBrCFlVVLVYNkUb
z2oLbd/00JwcsfK518XcUC6sJQJQwWiIdlcp549TA/BvZJ/ubOTZpiH1CpHVDAH2lxmEhvgQl2r
zRyDz3vXUsMAW+hQUmJcfmQwH7kK13b1w/WLy1s00pOZzUcLXYj9PtW9yXFX+BAku0+d0CFzz/2
YSJ0TdcrtDsBw2DdNHrvpDOJD+qvRhOL/iSkpi20+sQbyNvtHRTmXeIXeBWQmjLIvvExKxkCgPt
pzl+3Xs9qmsURQ+n+JsbysXYw76PnVAW6c7PLMbT7Rd8kvt9xJy3I7r4J89/V+pD+BHA==
X-Received: by 2002:a05:6402:1ec8:b0:6ac:bd53:d29a with SMTP id
4fb4d7f45d1cf-6b17c1de783mr2926999a12.3.1791584841118; Fri, 09 Oct 2026
15:27:21 -0700 (PDT)
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261009164732.GG83879@horms.kernel.org>
X-Gm-Features: AclHuK_prdV1ex9ara0f02v0arlilkcU-2ggnzgJ0G-N7v8b7hFnn0IO-j2lriM
X-Cc: netdev@vger.kernel.org, Chris Snook <chris.snook@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
open list <linux-kernel@vger.kernel.org>