🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #13016

[PATCH net-next v10 0/4] net/sched: sch_fq_pie: add per-flow class statistics

#13016
From: "Hemendra M. Naik"
Date: Mon, 09 Nov 2026 07:10
85 lines
14567 bytes
FQ-PIE runs an independent PIE controller per flow but exposes no
per-flow statistics. This series wires up fq_pie_class_ops to expose
per-flow AQM state (prob, delay, deficit, avg_dq_rate) via
'tc -s class show', following a similar pattern as FQ-CoDel.

This patch series is accompanied by a companion iproute2 patch series that
will be posted on net-next as well.

Both the kernel and iproute2 patches can also be found in GitHub:
- https://github.com/H-N41K/linux-net-next/tree/fq_pie_class_stats/
- https://github.com/H-N41K/iproute2-next/tree/fq_pie_class_stats

---
Changelog:

v10: 
- Update Documentation/netlink/specs/tc.yaml for fq_pie

v9: https://lore.kernel.org/netdev/20260928043358.6866-1-hemendranaik@gmail.com/
- Add a blank line between structs in commit 1/3.

v8: https://lore.kernel.org/netdev/20260922205924.32173-1-hemendranaik@gmail.com/
- No code changes since v7.
- Reword commit message to reflect usage of div_u64().

v7: https://lore.kernel.org/netdev/20260919060125.38063-1-hemendranaik@gmail.com/
- No code changes since v6.
- Rebased over the latest net-next tree and re-submitted patch.

v6: https://lore.kernel.org/netdev/20260917204225.275251-1-hemendranaik@gmail.com/
- Address Sashiko review comments:
  - Revert the fq_pie flows range to [1..65536]. 
  - Also drop the accompanying selftest 83be change.
  - Compute the per-flow delay with div_u64() on the full 64-bit
    nanosecond value.
  - Widen avg_dq_rate to u64 before scaling it by PSCHED_TICKS_PER_SEC.
  - Document the 36 to 64 byte xstats growth in the patch 1 commit message.
  - Fix selftest 83c0. The ping payload exceeded the TBF burst so no
    packet ever reached fq_pie, and the missing -W left the run waiting
    out ping's default timeout.

v5: https://lore.kernel.org/netdev/20260902035231.81866-1-hemendranaik@gmail.com/
- Addressed Sashiko review comments:
 - Omitted .tcf_block / .bind_tcf / .unbind_tcf from cl_ops (statistics
   only being exported; filter attach to fq_pie is now disabled).
 - Dropped empty tc_fq_pie_xqd_stats placeholder; class_stats is a direct
   struct member.
 - Limited flows to [1..65535] so per-flow class handles fit in a 16-bit
   TC minor.
 - Rewrote selftest 83c0 with TBF + fq_pie, ping traffic, and
   matchCount 1 on per-flow stats output.
 - Updated selftest 83be for the new flows limit.
 - Dropped the tools/include UAPI mirror changes from patch 3/3.

v4: https://lore.kernel.org/netdev/20260727164056.106203-1-hemendranaik@gmail.com/
- Fixed unaligned commit message; moved typo fixes to another patch.

v3: https://lore.kernel.org/netdev/20260630183702.170798-1-hemendranaik@gmail.com/
- No changes since v2.
- Resent after the previous submission was deferred due to the
  net-next tree closing during review.
- Updated corresponding iproute2 patch in response to review comments;
  kernel patches unchanged.

v2: https://lore.kernel.org/netdev/20260614125000.6058-1-hemendranaik@gmail.com/
- Addressed ABI backward compatibility issue for tc_fq_pie_xstats.

v1: https://lore.kernel.org/netdev/20260531125314.22492-1-hemendranaik@gmail.com/
- Initial submission

Hemendra M. Naik (4):
  net/sched: sch_fq_pie: add per-flow statistics via class ops
  selftests: tc-testing: add fq_pie per-flow class stats test
  net/sched: pie: correct tc_pie_xstats field documentation
  Documentation/netlink/specs: tc: describe fq_pie per-flow class stats

 Documentation/netlink/specs/tc.yaml           | 32 +++++++
 include/uapi/linux/pkt_sched.h                | 21 ++++-
 net/sched/sch_fq_pie.c                        | 88 ++++++++++++++++++-
 .../tc-testing/tc-tests/qdiscs/fq_pie.json    | 27 ++++++
 4 files changed, 165 insertions(+), 3 deletions(-)

-- 
2.34.1
Technical Details
Message-ID: <20261109071017.438478-1-hemendranaik@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-359055-linux-kernel-netdev=dewy.ru

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-359055-linux-kernel-netdev=dewy.ru
From: hemendranaik@gmail.com ("Hemendra M. Naik")
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v10 0/4] net/sched: sch_fq_pie: add per-flow class statistics
Date: Mon,  9 Nov 2026 12:40:13 +0530
Organization: Usenet Network
Message-ID: <20261109071017.438478-1-hemendranaik@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="295570"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:tozJMJN0GJlNe/0fjGmNvSpvC5Y= sha256:h5UKkk1QuRj1Ll/il+VLBUcA8t6eTSA+TR4P0bzCbG4=
	sha1:F2GEbRtzYrtZ8oyAYVQ+wbhOF4Q= sha256:oq47SMRP1Fgnz8e2SMoi0GvcldR9wfVeFEK+j6aqcyg=
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 7D1F21136EB; Mon,  9 Nov 2026 10:13:02 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 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, 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 TTcbk3kMpDk0;
	Mon,  9 Nov 2026 10:12:58 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-359055-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 11BA51136F5; Mon,  9 Nov 2026 10:12:49 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 83275E40E7; Mon,  9 Nov 2026 07:10:39 +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=1794208238;
	b=bA5Q/pEjlkjCXY/yIpSKEHi9y9+ndRDdCyV4sYossnQIlRJdK+bp2+YR3qPgkjwDEjYW
	 5HoIHCl+/NRwcFS4Q272zJMxRDjyol43GxHePcjYSZReFIel8E/xaqI/sTBaDGKrNSYLA
	 7UdaLS4ts6ZBndbXBqgVkoKhKTTpTUAsXp124zjmTE4VgJ0HNe/PO/R4G3XsmAwkboO97
	 IqYyD9BkoTwZaruo6TTtaNJsnvtCJXuGkiLfGKV6YcndoxmvEeaXVnz6L11kRs3qsKagG
	 r7lo0KcKVLvFqaN7Wc4wHCw8eohSBYQSP4rUieZkeHLbEX8hsDhkMBtVp69ubePJfLw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794208238;
	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:X-Mailer:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding;
	bh=qMu+E00+xLkfpIW7uvacAeDC12OVnUmiLpjE/Y+qhVQ=;
	b=SFXXfS4FZPO+YyV3BPg8zHlBx+krfFkj+enr3oHG1+aH4EocNhaeMpntheXgQg7l6zD7
	 KlF5wbnxsjgJxwHzDuLPymwgle2G80JRDmDVsspGuW3IInYfoyZ6eOlfjjBSSMNEa5xpp
	 49tpllvJzySUNV73rln4UROlGY1nQoI03zWAogxWlCSrR2DXI7TuoiiYSweLwMCPB4jo+
	 1ooqOx2P/zDuFbDIrdmb8sCQk7x/kfI51FtTCpQ7W7Bi49P1YfVC6tmukUVCAoNnhTIsb
	 RHyK8qGAh2nYtEhicy3hBnc2oylaVr9qagFFt/sMjsP67YRh9ZykoN9tqkoAIbQnKmw==
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=N57GV0WI;
	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 35EE0606D804;
	Mon,  9 Nov 2026 07:10:38 +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=N57GV0WI
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.50
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794208237;
	b=xwKxGdq1xolGz26jNtkePf7evwTOVNk0aqn/+gXLQ9s2gj2m1EoAFCMVA1T2PRN9X1pM
	 wGsHlmu012+QCR+3/Rq0i49JNqyvaEBYTjwaWV4Cz6FCkzMs5AfUObDjpZCOOFcSxCXrB
	 70K4ecECdEIIbsspf+naXgYdlMJbXygl76XYLBcusFYp0gE/HOoFHjU0CyRIWDlMwzKBf
	 nCXLBy6k+aF37oOQyJmBGSPOWetI5D3xntLb8od79qiMWuytmzgg+gxKLA3EjlX52eKMy
	 xf75qeq93kqD+SCbJBbRgdW/kDCUG/kRmjWhzLtRrEDf39AT8P6XrpALV5TAwIz8iDQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794208237;
	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:X-Mailer:MIME-Version:Content-Transfer-Encoding;
	bh=qMu+E00+xLkfpIW7uvacAeDC12OVnUmiLpjE/Y+qhVQ=;
	b=1Ez79DJ45au122nExJG/5FQeHPV/9yj1kiCR7+naITbEFM1W4gbrJgTIS+IET6di/NH1
	 WFrR/XLwIj7z3mbYDGSYdr5AKZ5a/SX4VEH8oAPLcWhTUC/cc4ZO8na1nCVwUT4AvY6QS
	 0bSdfHlhKWSSp+apPrlfZWHlaGNHQv4dwgfYt0P+Dubr3V+xTO7v48B/GOBYDsvW43jlK
	 eyGQHRVI1ogBAXdR/sodZk7G7cLFeUwBg3SuSBjeB3mkXkf0lk8+WR+1oaZG7IFp0uXVA
	 2QZp3SBTdTTT7P4nb37AxLj1sDzgh8LPlUxOgBbpAKBZq1exBFOo901iAqDy769flEg==
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=N57GV0WI;
	arc=none smtp.remote-ip=74.125.82.50
X-Received: from mail-dl1-f50.google.com (mail-dl1-f50.google.com [74.125.82.50])
	(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 B5B11606A32A
	for <netdev@vger.kernel.org>; Mon,  9 Nov 2026 07:10:36 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B5B11606A32A
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-dl1-f50.google.com with SMTP id a92af1059eb24-170135e43c7so759792c88.0
        for <netdev@vger.kernel.org>; Sun, 08 Nov 2026 23:10:36 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1794208236; x=1794813036; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=qMu+E00+xLkfpIW7uvacAeDC12OVnUmiLpjE/Y+qhVQ=;
        b=N57GV0WIWarWe3ZrYQQvE6FGtouwvf0dlkbJO492VMsz9IM9FmnXH6L78Hqel1qF6H
         IPTMmSalKejGbC8ehdfpK0qEdGKyViWoTij3Lz8eAqBwiBHb9kTZilsqmX5Ex7DJu1gf
         DMQI9x4p0YY2nOYnthUt6WRSFp60B59bcozRolgKhVosh9JEB8RkGeQiD4y7WRYUYlv1
         OAxduc4g9dUu6gBXqpEUlPIYPrjm0dfP/LcaHY8dQ95XH3P1snUqlx1fiyBduB43x+n3
         p0Ths6cpvC/zDADpFqJ9rm4OA8NBlf4D/zf+YUoBB+MAjFisBkOx1NPzdGUZ3iUoYHuO
         05Xg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1794208236; x=1794813036;
        h=content-transfer-encoding:mime-version: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=qMu+E00+xLkfpIW7uvacAeDC12OVnUmiLpjE/Y+qhVQ=;
        b=RhoXMiBh/i1WbAdJGojfzMJsvGy2m4VNu40HBfwWmcHZcPwpLALPWXUUUULl50tOq8
         Eti1qKKy/Rfh5I4vOpqdbfSXOAThSidqEHbooMDL0x4nSZ+CtnowlMXo2FDVzlhxWW+h
         YUcaRkRLfSloTrRAZuRaATdfKir/oI/Xp8GDMIe/zpwrEgZiqosa+/iF7UgNFeKZeMj4
         AIISf54mD6a+sRrUtUikqzUUe7ypHrB9+xeBmQKVjbusR3Q+nVM+dfW+KdwnBb6S7B+D
         3qmEsezbZ1iyrXZyJPa1Wd20OIEK/JfwL7S9NzEDeBSN2KD/n3mdDlUrvheQ92tp6hsx
         mFtQ==
X-Gm-Message-State: APuU4Z8idbxL5zxH1E9KasUNgmAM7biH55z06+rI9iwU82r/ajnqX5W1
	VqPvzZgZNNwzJZSOg/oQWQS4Xsn/BAKsi7iCEpaxpTCx6yJTEXh190g4hjxVGO1FrOI=
X-Gm-Gg: AYBFou3INNKE838h8E4w/QxuWfcItTM3/HhWih0Jwfy/ODylUs7ApxzTNiwBq/BdrNm
	F9ylTPiS4JyLpKZq5KZK/UguYet8uhB69qjaX/w5HjO+gj8C1bixRmwxYhUqEr1wiB5xE4wxEc0
	2cgj4jLBm/x70APxHW+k3ipZjtEBqyaQM7C611dW+wbA1Pl2lX5fRHhDteZemB0HR6yfWUWTLCw
	9hJCR09WA9vu3NIgl5E8DU0q2LagrDzqQwJ5T6XKaSU39xiSGfcOonNAYwybnBsLUN5VkIqpr5Y
	qRPxZhehOU+lVog9YCn8IDXFBssMa3wjQ+L5z4dDJlz3yMyJCIlbKQ9oxpZOeyGU7rFQvgcTTJF
	nV7cKQIGm5cQv6yuBcIiy0eJVPaKfM1lo3CEGEwcpPL47tVOUmrEzGIHTzjaHnEBF5QADOV2t0b
	G8dEkI+6+VKda23EbhUKPRwZCAmQn+kCQZpYDlhakte1t7EjZ+OTdbmTuJJ2PnP1JVjAgnh43l1
	QmzcSul42u3Owvg84HEC2jv0Sl/FSjG3dWMlwogBAHPjdI3e7KgI7gBfUAQFJtvuDn+pnZy56X9
	FewaiG4s7+1G3EvBq5YPwrcVP2g5mkm1o6VMfUOalIYynQ2k98+wJlVUqKJp88s+nIwKt0RUdNb
	fv8KolUcQZPEDpKvocY/WzEr4CvGxmWEM+rX+U/Fny0wlqHFJ9g==
X-Received: by 2002:a05:701b:4558:10b0:1b3:a9c0:6a3e with SMTP id a92af1059eb24-1b3a9c06ac8mr3048889c88.29.1794208235645;
        Sun, 08 Nov 2026 23:10:35 -0800 (PST)
X-Received: from Inspiron-14-5420.. ([2402:e280:21c6:671:cc96:e14b:76e:f8f1])
        by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b3755eb6efsm13443513c88.4.2026.11.08.23.10.29
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 08 Nov 2026 23:10:35 -0800 (PST)
X-Cc: davem@davemloft.net,
	edumazet@kernel.org,
	kuba@kernel.org,
	pabeni@redhat.com,
	horms@kernel.org,
	jiri@resnulli.us,
	jhs@mojatatu.com,
	shuah@kernel.org,
	donald.hunter@gmail.com,
	ast@fiberby.net,
	toke@redhat.com,
	liuhangbin@kylinos.cn,
	j.koeppeler@tu-berlin.de,
	linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	vishy0777@gmail.com,
	tahiliani@nitk.edu.in,
	"Hemendra M. Naik" <hemendranaik@gmail.com>
X-Mailer: git-send-email 2.34.1
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