🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #1510

Re: [PATCH net-next] net: ag71xx: align the IP header behind DSA tags

#1510
From: Rosen Penev
Date: Fri, 09 Oct 2026 22:33
49 lines
11009 bytes
On Fri, Oct 9, 2026 at 3:27 PM Rosen Penev <rosenp@gmail.com> wrote:
>
> 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.
I see the issue

A different patch removes the comment:

For our NAPI weight bigger does *NOT* mean better - it means more

so git am fails but git apply works.
> >
> > Please rebase and repost.
> >
> > --
> > pw-bot: changes-requested
Technical Details
Message-ID: <CAKxU2N8svLRziH_AYKMVdL0t-ndUfxSGO+=ftekFG0KQFsXVZQ@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-343988-linux-kernel-netdev=dewy.ru
References: <20261007174449.671416-1-rosenp@gmail.com> <20261009164732.GG83879@horms.kernel.org> <CAKxU2N_=H=D0p=g0XBqFtJFHDpidO-5d7P1kKZxXEDX86BGnPw@mail.gmail.com>

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-343988-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:33:42 -0700
Organization: Usenet Network
Message-ID: <CAKxU2N8svLRziH_AYKMVdL0t-ndUfxSGO+=ftekFG0KQFsXVZQ@mail.gmail.com>
References: <20261007174449.671416-1-rosenp@gmail.com> <20261009164732.GG83879@horms.kernel.org>
 <CAKxU2N_=H=D0p=g0XBqFtJFHDpidO-5d7P1kKZxXEDX86BGnPw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="1209864"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:5qQ4ppclCA0o/sRHyY+K8Duos0A= sha256:7VwzEicFoq7j/Twjt4PN0WJzCOg3O/T6NunQP1Hzz9E=
	sha1:AoZZIwafeSm9yt7UaETX2hbLlgQ= sha256:y6P7Hd60HokHePDjSONUZJN2AB53KaVFZwVs7phw4w4=
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 791F610F80A; Sat, 10 Oct 2026 01:36:11 +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 6qlTehRXunTg;
	Sat, 10 Oct 2026 01:36:08 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-343988-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 43B0C10F7F5; Sat, 10 Oct 2026 01:36:04 +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 954AC2C2A5; Fri,  9 Oct 2026 22:33:58 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 75F57418A36;
	Fri,  9 Oct 2026 22:33:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TD/ymqd2"
X-Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42])
	(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 F33CE3DAAAF
	for <netdev@vger.kernel.org>; Fri,  9 Oct 2026 22:33:55 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.218.42
X-ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791585237; cv=pass; b=hqKmvu5pAPsH4eeBYgf8b6QUQRkL3Ka7S2njGMfLUa1SVMv/xQ104r8AvVTicfBfJdi83zqApozaL3Syz4Gjmbfp1PpCVyWP/mPqWjD3WfsjZgPCVXuCoFShyLvRa9lN/s+3X5NpaQPTP39OTQQJwMQ/FX1mvymlx+XnKlsq/80=
X-ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791585237; c=relaxed/simple;
	bh=9quX5CnvIgOd2bqETq3nY4+kaqua2/tRKQhSxS2Xq3o=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=e07qca/v4+ALlCYDiBakZYG1sfiJJjyXhfiQy+hYj0A0iKajZcSUb2mihkH3B7K8hMzCgrm2+auiVvoXhBbnoWW4Tv9MBHw3PXG+s6D7EYsRomMOGjGo9W1fXyIFLiK2e6Q8NFZ4SEQtNJnlNQHZCZMCFTHyWTaM2jZ3EuDMo+Q=
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=TD/ymqd2; arc=pass smtp.client-ip=209.85.218.42
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-ej1-f42.google.com with SMTP id a640c23a62f3a-c2e2db5e8e4so56765666b.0
        for <netdev@vger.kernel.org>; Fri, 09 Oct 2026 15:33:55 -0700 (PDT)
X-ARC-Seal: i=1; a=rsa-sha256; t=1791585234; cv=none;
        d=google.com; s=arc-20260327;
        b=J6MFuCLwSRZjm2AyNyrY89uYEtizUBQ/rA2ekLZ+PB6QLIFW5GWuyb1aelb7c3+cbq
         UPQRI4GVf4C2IoFRI6r31Cg9aIpNcwYJANC4384nQcrQdOFy4Q1KiXo8JbAUufQjxX0y
         zvBH+n3W0PSei20wV37sZpn3jqs2vNyD8LgxrdBHS1pcM91N4fmpCsiZhu7wRMRq/7lK
         V70dsKQBwCgxcZ4NQA1vw5A+jcEElkZAwscIgt/laaIuoykuc8hpl2LK8ReiNi+oNn38
         bMOdsv/2Auvp9/R5B8OsVCdECwAIoi8wSb5rLaoMwzcgg/V4tRvq+hhT76xxqwFCods9
         l4UQ==
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=Y2x5f8OW9Jzw5234KyE0CilJDEpfG7QLEYaTd+TOUYw=;
        fh=uA/gQDxeH5EXosqVQ99q9VpcrtUYliT6RHyDBlZM7J8=;
        b=mKkMCvAp6fYKYqNYwxRpFXIx9zuvRjclXgiWeT8WIvmG0DvQ3zRSDUDbWR7LmMkgWa
         btffmv9imIR9zsnYAqL08sRJeLIWVVltZY4gAjpOcfOOM0dZgN8gFnO7mQIq2FdITC0E
         fGY65OMfciOpr952T30JXZ5BCREXeuXdyWre4zpfFCt5IdW6RVv8dYmd1MWM5YA68RaO
         8VLSBrF+b5y5ccWmpCA2u5hlUXPfZ+gk0sjn/VKeQGavRrnWLY7WZrIQk1/5TABJyNxQ
         X+033BOlWXq2vORL1XpTVnJO+m7G/QtmBe36qSYEgmIwAYSEupOGYGMQeZ2OC6oacDbc
         9T9Q==;
        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=1791585234; x=1792190034; 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=Y2x5f8OW9Jzw5234KyE0CilJDEpfG7QLEYaTd+TOUYw=;
        b=TD/ymqd2VZsqvzs84kGAYMrXgiIsi0tA/PegsHu60frn/DOT1ctF+MiMGTsbyQcTYD
         kQLVASiSGlEMPvWB15cd5iUyNzTfQZlopj4Y7NmufQsK2RrX3CFxQYf52BKSHodzesEu
         fADYmaEg0us2ZEJ0fDS0jp6WlgwgxBHbZCIWMKicO/QiMbNSS4KWjQYZGbomk0PTNWQh
         s+MTM1qFHBgs7uBmGGHLKLRX6rbN1EEvAxcHMRxZ7f8bKEGht1J17tKRdFBi0Qi9SxpD
         vCu6OLUG/PcLRS/FPHqqBDsRK3k4F1BW8hvgfMjdX9M39G1RUrD7yIs3hqGq/Lmi4agJ
         tW9w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1791585234; x=1792190034;
        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=Y2x5f8OW9Jzw5234KyE0CilJDEpfG7QLEYaTd+TOUYw=;
        b=fCxC3g+j5xT2Dohd9mVLSbXtxOQUqQj9/BnSRf9FsJLfrDBFaQ89I+4h+w/b3iW7P4
         Pie4mmlWc0kR2GQkVy5GH+QM4S2xuwGHRf2JLOVqlZMzb9lLTN0hpb05+OWGHycXcCeP
         v7Pi88+xxNOU2gkf/xIJz8+gEOTTZYnS9Km0jOaMrZCa3OSKXxrGqpPQ8v3x80KI9am+
         XFG1XhsxX5Kq+6fRNu5XWGWTaOVxuqoiBmQW7Vk90f6lONhKxsX/RobNmH/pjEWkti1O
         YtSH/0wlQ1yzjXBogEIoz/xSniy+UYh3J0XKk8eQ6XHvIy0IGUQchMlS4XaD8UB7K+3s
         qy0A==
X-Gm-Message-State: AFq9FYKLlHVtEuIMwi7R1kYdIUVDdbBVtCMrYv99cX0DnX6m0SI92uFz
	dzQg4mOGtcZYd2NQulMW4RCr3auxo1RWE6Gc+ZDFV7xIOETU5mD19a+EJ4sUHmo7EUmBqfE1lCp
	kPCFX3CBvb+DDbQM2/EyUev51jJ9fb8g6xr36nwk=
X-Gm-Gg: AYBFou3qqaNjVHZAqhaaOBrVAICLgZMOuojRtRgP6Pbg8mtyIRie60kVtX3xPKvbFSf
	OId35MHVw6+5amtfuA1fXwfKtgH4+isgWQGotl3rpBRqYtXgBTBpRVXWhEC5CgYWY/fBu3Si3Vw
	VNo1dCOomIlb+PF/SXZItP3hgIpD2wueVpf0rojTKtJS8SLJqCEonRisQc2XUI+DKxx2cHe9Ckm
	XlpNE/O4YC0AJ/ysooyRaFtH7Zh2Z8By4qQCncjMsyMgiQ2eCd2daSI9VlTzHL1wuqFzvXuyxj/
	2UnTQ0qqYIGDq4EcNXqBVnHI3EsvwEKRlYLZhe8bq3EkMNEeb6AxftJepW28DlFFUvJWXTu9yFZ
	ZYQSOWZU+9ZhAHKdeSsl2s1dbaVGL9JYba/7rxdilJn8BJI9oORQ7n2eEC2jAOeF+8ScSlil6/Q
	Lrv7PPn7wEZNIjQ4OglG4gqnU2/Rq8cdSWpFFgxj+0dirFA4eFVOcujEe/MBonpf+DF3lwTPKq6
	cOv
X-Received: by 2002:a17:907:3f87:b0:c2e:2e1b:30e3 with SMTP id
 a640c23a62f3a-c31aa00e12fmr387733666b.21.1791585233913; Fri, 09 Oct 2026
 15:33:53 -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: <CAKxU2N_=H=D0p=g0XBqFtJFHDpidO-5d7P1kKZxXEDX86BGnPw@mail.gmail.com>
X-Gm-Features: AclHuK--vcR19Q4c1HmMxBuosb_aBRVRtTK0Kor0FuyXWmfdeo3iVtKqvmIrSjw
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>