🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #27396

Re: [PATCH net-next v8 2/3] net: cortina: Add CS7542 CPU network datapath

#27396
From: Fil Dunsky
Date: Sat, 05 Dec 2026 13:53
26 lines
11939 bytes
Thanks for the review. v9 disables netpoll for the shared TX ring,
takes a reference on each port's DT node until after phylink teardown,
uses GFP_KERNEL for the probe-time RX pool, and uses DEV_STATS_INC()
for the error and drop counters.

The linear and scatter-gather TX paths share the descriptor helper and
write the DMA words in little-endian order. The head is published once,
after the complete frame has been mapped. Updates to head, tail and
fault use WRITE_ONCE() to pair with the lockless reads. The shared lock
still protects mapping and completion against per-port TX and teardown.

RX now uses the refreshed XRAM write pointer. The IRQ handler still
acknowledges the latch, so a stale latch can cause an extra empty poll.
The current RX lock and jumbo skb allocation are retained. The receive
path copies from a persistent DMA pool, and transferring those pages
to the stack would also require changing how the pool is replenished.

The DRR bypass command addresses the port shaper, so v9 issues it once
per port, outside the queue loop. The per-queue DRR enable commands and
the existing LT/ST programming are retained.

I'll post the full v9 series separately.

Thanks,
Fil
Technical Details
Message-ID: <179647882170.6.6820387330319858360@gmail.com>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378006-linux-kernel-netdev=dewy.ru
References: <20261204-b4-cs7542-ethernet-v8-0-4b625ce9fe82@gmail.com> <20261204-b4-cs7542-ethernet-v8-2-4b625ce9fe82@gmail.com> <sashiko-outbox-251080@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378006-linux-kernel-netdev=dewy.ru
From: filipp.dunsky@gmail.com (Fil Dunsky)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v8 2/3] net: cortina: Add CS7542 CPU network datapath
Date: Sat, 05 Dec 2026 13:53:41 -0000
Organization: Usenet Network
Message-ID: <179647882170.6.6820387330319858360@gmail.com>
References: <20261204-b4-cs7542-ethernet-v8-0-4b625ce9fe82@gmail.com>
 <20261204-b4-cs7542-ethernet-v8-2-4b625ce9fe82@gmail.com>
 <sashiko-outbox-251080@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3041587"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ofzjV+VpFsjohbXkmTTyFlt42rQ= sha256:lRrp1sQhJDMw3H6VFb+y7DpkA/LNb1gecRbMb/qDum4=
	sha1:7ddiwuX1RWDJ+t19tNYOEU1KOBk= sha256:1acXHT0QXqNF60ZrhaAq3kazp+bBIhczbu8xWvZVGBE=
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 85D83117E34; Sat,  5 Dec 2026 17:05:19 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.397
X-Spam-Status: No, score=-3.397 tagged_above=-9999 required=6.31
	tests=[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.001, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, 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 LUxruqq2ghk6;
	Sat,  5 Dec 2026 17:05:11 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-378006-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 35DD0117E2F; Sat,  5 Dec 2026 17:04:55 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 198C7605B5B; Sat,  5 Dec 2026 14:04:55 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796479489;
	b=ws1Q1NADqlkVcO5wxYymtDXIqekSbK/HXALoUWHKwxOJyJnBJC4N72IG1GvGrOBboc8L
	 Xa8ScokiKhpGWY20XCTMwtIRq6mMKGTfZflw/9dnDQ6us3Ua5KHXSsC/SHM8uRFuriuLe
	 kSKQHcHmhTfv+0rWh2WuzhToBlPHM9FeMWw24Pc9VdAbvQ7F/Rj2oYej+TLcIcsn0CTQV
	 B5IyzMIiBx536jJpsgBtEOCxoCzJODc9IWtkF1OAD6s3x6SMrtW4rNvfcwD/vSRdOryZ8
	 oA8zJMcJUNbwZASa3RCI6H2RbuDQ2LJTeA6Fo3G2jrMgwA29G8vIRMaN+q7IugHOY1g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796479489;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=VgQmJoMi2mKqlK11YHhxseLSPS0CLqo90uUJxgGx6tA=;
	b=35aut6Ip2lojCK3j6t/8af8xjx1MUpvWmJ0hDgdrAVGSOjYN8GA9qOprNIydn8XhMzp1
	 UgRzG1GgfEOBPDo4EF4vO3ZcwmSXVMEIwcr9Fd3eWQ+CHnZ2u/lK76Z2bi8Mj0EvWV5c8
	 Uzt2+y1JRQtMidcmW9kwfbJCeRKQDgzlMPouVF6v0xulCU9jtBwzOB+9mBkNd7MgP7lHG
	 Vzk6E/DcPHQn/JTLcb+h/f2nqeqqmIL1HGYY1vnZgG9MIKG7j2dHbhPC2N6ER7um021GB
	 Vnp85dxf/Y8cDq6I48VasjzbHDLwPGmAAIKyauKbqfNm2noqXx/FGjckGblqmaMEALA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="x/3SqCBP";
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id AD24D606A6A9;
	Sat,  5 Dec 2026 14:04:49 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=x/3SqCBP
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.182
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796479483;
	b=i6QAl6MLrhN3EhVXIa4uHQSxsU/wN/1+vufQlQNvs5/ubBdyer+pL59F+E48EK8dweM9
	 pKdGhRIdc39AUq98AJUNN0cKojEO2hEzZqBqHNkx/pRt0PgIjSfz8orP+Ys+fE/xF8d2s
	 wsDJfJBLRQflPv6+flhEPdqiHMScHLwSc67N2+NTF/85D2hxRX5915gfLTInpRQ0BXbH3
	 AHRN4lixxUQxFKvS7abFbnKi4PB/saYsaqtmxbCeBfuX4X8yQ1fzNY5Hssr9dwddNH+Xs
	 AyY64Fr+0EdsMXEN/yLTCryQ4nsFfEpuQ3v1pOSG3t4zxWZcH+MUDblyF3K8Dbh4feA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796479483;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:In-Reply-To:References:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=VgQmJoMi2mKqlK11YHhxseLSPS0CLqo90uUJxgGx6tA=;
	b=2b/lM4AbqcQ4eSiT9Rg7lyNKxtFhvH3ozkWcgCIQXkqQU5H72+F7sKCuhu26NNAYmCaI
	 uwRAbquzmQAsbOiYCx1fV9VweXHZv3J6xXdnEQ6q3mkltRg56aVoRZUg96We0Ka9pkyA1
	 LMgW4mBd89wJq/AKIaADvi7SiPPmyl3X6dcx0jIBD9LveSUtll22Hqnnt3vO/Bga5kZE0
	 K6xeuj45ovVP76CrWUBETgdsR+6+8D/+Rbtm+8ZyZ7SuXhy2E0Qycq3np17FxTjizxR/7
	 8r8IdJt6nps+nOimL4bzokSB/QXVIuNbKcOa9UWGSfRc1X8gPMlV0wWdtqUjhrcPC1Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="x/3SqCBP";
	arc=none smtp.remote-ip=209.85.208.182
X-Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 831B6606A336
	for <netdev@vger.kernel.org>; Sat,  5 Dec 2026 14:04:43 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 831B6606A336
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-lj1-f182.google.com with SMTP id 38308e7fff4ca-3b00ada6f2bso9519611fa.0
        for <netdev@vger.kernel.org>; Sat, 05 Dec 2026 06:04:43 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1796479482; x=1797084282; darn=vger.kernel.org;
        h=mime-version:content-transfer-encoding:content-type:references
         :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=VgQmJoMi2mKqlK11YHhxseLSPS0CLqo90uUJxgGx6tA=;
        b=x/3SqCBPLfHgioIwWyz5nNqdwN6wzPuehOSKPhv8Z0NE8U+bB+mu/WqKSHJT0/ndxq
         4svbc5mCaeZsvmvQolcZUgp6BeoyH/RRjS/ww+VLbxUgDWzG1+GDVyTUCADuiL6fJeeo
         aZA8hI3xlw2tuWKEfvTYj6OuckJTrwhz3Hman/gk8cSjUDaglhvoMaAypzADDuhIO3Iy
         vhz4KW6snbiKEHAinwtmpFlJcPMLWDLyTTQOut3hvRilaxkBQRoKhoPvhn+fOUjobP6+
         drubCmP7LppPvSffXsObR/ORDLtOI4gLqFnLVOW+etZkukAGKedvzYZS/mpPgj4Cg3PQ
         GEzw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1796479482; x=1797084282;
        h=mime-version:content-transfer-encoding:content-type:references
         :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=VgQmJoMi2mKqlK11YHhxseLSPS0CLqo90uUJxgGx6tA=;
        b=XPppC6BwuWNdHXgO3NED8DK2ljVAsR2+2GUQsEhJW7U80zLfalOEhWgpcrrR4r5n3I
         DV9TUbJTNp84OkvYM/67krEe0eE67qmTQZAEKcmoo2DicqdwiRCezX7eXVhrRdQcu8hc
         uMAH7V5zUJZz6OXmJmMgULxV5yv5gFhvYKe4AnWBQ9TihmEqC/2GIKGWr/ZtvVpt6eQO
         +Z3Zrhwqu8Xe6qtbwdC1Mb38v4KfYEYwPfPVoKlQaviTF7w6IQmujxL/v5qbs4trdMnC
         3qeYl06m8Z4KD01CqguO6u/C59l1VNJP0OMlAj9ISOMGoN4kR7pC+Y+1s0qREK2yy4zE
         pAqQ==
X-Gm-Message-State: AB4q+uHwTbMO2SYLC/2LrEkxK3O2CCvqEI2KuzyGaTSp6VB/IbOrnCiN
	ReymKQIHJT58iajdo3wXw07l2j+Gt77NBuZHwARJ7E3LfhEzqlIgSbj0
X-Gm-Gg: AZFdTZdwyYReD0F6pzJIX3Ud3E4t3DY7wlibdrtOSBuOhBE05KB7Q/2QVGqjitTp9uA
	XDfnnDROedqaJ73Yg+EVAZOAya6XZmAKyCRRLhSLPEZ1XupNaxZ+4rUs4TRkrMCfoaBC2nZFDPR
	RORYeXmXysNmooQbmKBszaWAbMyD8PY5NxZV7hwBrks8Y5B+Llk9+qY+RLP4mu+perI2nStq+Vr
	wSe0YWevYFIWkXFLgr5i78MJZdItqFZWEPV2zvszEon5ayB8KJjdyoUyF5BjK+PJOV9FNz2o6sv
	9TQQ6ijw5kuQ9bL/KQlaCp63f/B7xoKwqpzIso/9JLw6jDyAQBlt8IOkI5gyISSZpX8pT3H07V0
	OFL1R7bIER5v/cafAXYlXufYC4FzOG82wnIFn81XOmzfR6VtKTPfaGoRq9mVPXQeRulgC27ydyk
	1rXk7lw6WhUVUGLk//AOkzo48XrhgvbQtMMAhIEL7ZasB3Poj3YcOCi5a+tYGEldqMHG7QvmHAk
	8SGW1rwZFoRqggVuZYfTAAfZ+x+K6t4e9V3WyceouyNARNFHrFNHn7lpzYS1IbV2ZLjwluTeAl/
	A1nYd+rVy4uW0IlaaeZkVXASc4+a/iMuhCrLoZt/2BDd70zOQwt05YQ=
X-Received: by 2002:a05:6512:3e1c:b0:5c1:4ede:6fcb with SMTP id 2adb3069b0e04-5c38616b8damr1155141e87.8.1796479481584;
        Sat, 05 Dec 2026 06:04:41 -0800 (PST)
X-Received: from [127.0.1.1] (ip-024-180.users.dtel.ru. [91.210.24.180])
        by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5c384abe58csm1460087e87.84.2026.12.05.06.04.40
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sat, 05 Dec 2026 06:04:41 -0800 (PST)
X-Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org,
 conor+dt@kernel.org
X-In-Reply-To: <sashiko-outbox-251080@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list