🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #4081

Re: [RFC net-next v2 4/5] selftests: drv-net: add a kperf runner

#4081
From: Jakub Kicinski
Date: Fri, 16 Oct 2026 17:05
34 lines
6869 bytes
On Mon,  5 Oct 2026 13:11:13 -0700 Stanislav Fomichev wrote:
> Add a helper to manage kperf servers, run the client, and optionally report
> aggregate throughput and retransmits. Use a random control port and a
> unique PID file, and report server cleanup failures.
> 
> Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
> ---
>  .../testing/selftests/drivers/net/README.rst  |   8 +
>  .../drivers/net/hw/lib/py/__init__.py         |   6 +-
>  .../selftests/drivers/net/lib/py/__init__.py  |   4 +-
>  .../selftests/drivers/net/lib/py/kperf.py     | 161 ++++++++++++++++++
>  4 files changed, 176 insertions(+), 3 deletions(-)
>  create mode 100644 tools/testing/selftests/drivers/net/lib/py/kperf.py
> 
> diff --git a/tools/testing/selftests/drivers/net/README.rst b/tools/testing/selftests/drivers/net/README.rst
> index 1b7264d40b79..4355d5113ec8 100644
> --- a/tools/testing/selftests/drivers/net/README.rst
> +++ b/tools/testing/selftests/drivers/net/README.rst
> @@ -141,6 +141,14 @@ Arguments used to construct the communication channel.
>    for netns - name of the "remote" namespace
>    for ssh - name/address of the remote host
>  
> +kperf
> +~~~~~
> +
> +Performance tests which use kperf expect ``kperf-client`` in ``PATH`` on the
> +local host and ``kperf-server`` in ``PATH`` on both endpoints. Kperf is an
> +optional dependency; tests which require it are skipped when it is not
> +installed.

I don't think this belongs in the README.
README needs to be high signal, otherwise nobody will read.
People running perf tests will quickly figure out kperf by asking LLM
Technical Details
Message-ID: <20261016100501.42f71961@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347461-linux-kernel-netdev=dewy.ru
References: <20261005201115.2690830-1-sdf@fomichev.me> <20261005201115.2690830-5-sdf@fomichev.me>

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-347461-linux-kernel-netdev=dewy.ru
From: kuba@kernel.org (Jakub Kicinski)
Newsgroups: linux.kernel.netdev
Subject: Re: [RFC net-next v2 4/5] selftests: drv-net: add a kperf runner
Date: Fri, 16 Oct 2026 10:05:01 -0700
Organization: Usenet Network
Message-ID: <20261016100501.42f71961@kernel.org>
References: <20261005201115.2690830-1-sdf@fomichev.me>
	<20261005201115.2690830-5-sdf@fomichev.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2823453"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:/Sq1PyaIJUlCt9AqbfARHbyKtcc= sha256:cimaANyQs221BZCwWucWonK9BmwWpL1e+oElUvBtCG4=
	sha1:Q6mLAPAnZiYlhsDK/SS/QFwvugI= sha256:T6Gmlk3vPZzSxyUtYvXuapCoNbxzbhJiTMUDtVKNQQM=
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 9805F11057E; Fri, 16 Oct 2026 20:16:38 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.34
X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	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=kernel.org
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 8fRPG1ddNEPw;
	Fri, 16 Oct 2026 20:16:35 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-347461-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id ABBD2110596; Fri, 16 Oct 2026 20:16:26 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id E3B11640C7; Fri, 16 Oct 2026 17:05:24 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 47690541E69;
	Fri, 16 Oct 2026 17:05:03 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lu5KS9yL"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(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 2FF4653E2EF
	for <netdev@vger.kernel.org>; Fri, 16 Oct 2026 17:05:02 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792170303; cv=none; b=qJo7STlT9MDr6syX2/WGDYmfigr4z3q299uEUjibdzpymO7FydnBD+PZGJQVKpvOtJA+cf3fHHs+fhtw7KwPPX318V9FM7aGuLXENrTBgXyN4tHqgncAjw8BLYTrJDJY6HweUzI9O2xhRw5v4Lab4YJ1lrR8rhGSj7hB2CstfB8=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792170303; c=relaxed/simple;
	bh=cOmHDh/EXroWc6Eaba8PJp+ZSKKuckGFWnNzjMuWBB8=;
	h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
	 MIME-Version:Content-Type; b=Q5nwzVDBqsOzUe94ksd5mvsxWlBzrDACN5FYchPeQmQrqWTizK7Vmm8PTeaOzckJAViis9cYOhyUJ39m54s6D9/KbJQIIzUWtnq+GTQss/df6fnzl00zXerVecMRlDlihFNUx2e4JyGkwRims9XJUqvxLmV1uZYwrB5a3OK4PcA=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lu5KS9yL; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4C2B1F000C5;
	Fri, 16 Oct 2026 17:05:01 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792170302;
	bh=GidtaobVIZWP+1XrHFySxXxvs5o02Hdzde9c+7bCg6g=;
	h=Date:From:To:Cc:Subject:In-Reply-To:References;
	b=lu5KS9yLhIQ8FkRkHGz2utcZ5a0ptpamL/SIem1yh/MyIN/ehLb8JEiEKzF0QjZ7G
	 uwdGIElgljPCgDr2z0Kp2MYmYcvblivIBTqSzfGw8IjlDiPP5bMX89rZlB1Vq0SzNq
	 6C1Bj3hKdRklT3mP+AMsK06nUzINwRpev+Q9qKWTiDdZop9Uh7irpo7Kx9dBJ5JfOx
	 yIGj7K3+F8QZ6L2jcsp1ZLVrB+PqKUi9clRDJRwwhmhh2Zn8v4R4YnW4CejBuBaXQg
	 Lru7cOV4mFrFT4pyg0T+7Vz1pXKjZRGQOLYjSO7iTlGT0Q9+8Tnkk5krN9jhaCWsaU
	 D7Ji95Fv2hvyw==
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
 pabeni@redhat.com
X-In-Reply-To: <20261005201115.2690830-5-sdf@fomichev.me>
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>