๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #4565

[PATCH net-next v6 0/5] selftests: Fix and migrate the XDP feature test

#4565
From: Bochao Cao via B4 Relay
Date: Sun, 18 Oct 2026 14:05
75 lines
10401 bytes
This series fixes the XDP feature test and moves it to drivers/net/hw.
The tester uses AF_PACKET, so the remote host does not need native XDP.
Existing remote XDP programs and offload settings are left unchanged.

Changes since v5:
- Fix control EOF handling and preserve existing XDP programs on attach
  failure in the initial cleanup patch.
- Bound shell readiness, fix signal cleanup and namespace ownership,
  isolate tracepoint counters, and fail on capability mismatches.
- Support a separate control network, use an atomic signal flag, return
  failure on interruption, and query capabilities after attachment.
- Fix inherited source paths, host-tool selection and installed-header
  priority in the shared BPF build rules.
- Use argv lists for local commands and SSH deployment. Remove the old
  ignore entry and fix the README heading.
- Run veth XDP_TX when peer GRO is enabled without native XDP. Skip only
  when the peer has neither. This covers the case addressed by [1].

Tested on x86_64 Ubuntu with Linux 6.8.0-124-generic:
- Normal and separate-output builds, relative inherited srctree, host
  bootstrap with target CC/LD disabled, and conflicting source headers.
- Earlier baseline across three veth configurations: 17 PASS and
  1 expected XDP_TX SKIP.
- All six features with separate IPv4 and IPv6 control networks: 12 PASS.
- Nine error/cleanup checks, six protocol/isolation checks, and DUT/tester
  attach-failure preservation checks passed.
- Patch 2: two concurrent six-case runs and three repeated-TERM runs
  left no helper processes or namespaces.
- SSH deployment and execution from a path containing spaces and a quote.
- GRO-only XDP_TX: isolated veth modules with and without the one-line
  fix reproduce failure and success for both IPv4 and IPv6. The runner
  also passes the expected skip/failure/success checks with ethtool 5.16.
- GCC -fanalyzer reported no diagnostics. Clang diagnostics were checked;
  the unused assignment was removed and model false positives documented.

Tests used veth devices; physical-NIC testing remains unverified.

[1] https://lists.openwall.net/netdev/2026/10/16/565

Previous version:
https://lore.kernel.org/all/20261010-xdp-v5-send-20261008-v5-0-de687cb67c40@gmail.com/

Signed-off-by: Bochao Cao <bochaolucky@gmail.com>

---
Bochao Cao (5):
      selftests/bpf: Fix XDP feature test setup and teardown
      selftests/bpf: Track XDP test processes and isolate namespaces
      selftests/bpf: Send XDP feature probes with AF_PACKET
      selftests/net: Add a shared BPF skeleton rule
      selftests/net: Move the XDP feature test to drivers/net/hw

 tools/testing/selftests/bpf/.gitignore             |    1 -
 tools/testing/selftests/bpf/Makefile               |   11 +-
 tools/testing/selftests/bpf/test_xdp_features.sh   |  107 --
 tools/testing/selftests/bpf/xdp_features.c         |  719 --------------
 tools/testing/selftests/drivers/net/README.rst     |   19 +
 tools/testing/selftests/drivers/net/hw/.gitignore  |    3 +
 tools/testing/selftests/drivers/net/hw/Makefile    |   15 +-
 tools/testing/selftests/drivers/net/hw/config      |    3 +
 .../net/hw/xdp_features.bpf.c}                     |   60 +-
 .../selftests/drivers/net/hw/xdp_features.c        | 1023 ++++++++++++++++++++
 .../{bpf => drivers/net/hw}/xdp_features.h         |    1 +
 .../selftests/drivers/net/hw/xdp_features.py       |  146 +++
 .../selftests/drivers/net/lib/py/remote_ssh.py     |    2 +-
 tools/testing/selftests/net/bpf.mk                 |   33 +-
 14 files changed, 1266 insertions(+), 877 deletions(-)
---
base-commit: 8df0638138d3e0344fd1fb36cf2d1ca1cf5028f0
change-id: 20261008-xdp-v5-send-20261008-301d0e1d3165

Best regards,
--  
Bochao Cao <bochaolucky@gmail.com>
Technical Details
Message-ID: <20261018-xdp-v5-send-20261008-v6-0-7336e1282ca3@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-348056-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-348056-linux-kernel-netdev=dewy.ru
From: devnull+bochaolucky.gmail.com@kernel.org (Bochao Cao via B4 Relay)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v6 0/5] selftests: Fix and migrate the XDP feature
 test
Date: Sun, 18 Oct 2026 22:05:49 +0800
Organization: Usenet Network
Message-ID: <20261018-xdp-v5-send-20261008-v6-0-7336e1282ca3@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3339583"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:tRnXPXMV4F+gPzEw5/Vq+Q50fUQ= sha256:mJin6rTpyXY2OPPnRr5QWR5C7+LdhCgeNYCQVfxu4Es=
	sha1:SOx07EnMJPHYo8Aj+zTpKXZGfDY= sha256:N3crimWgR63zCqaUVMmHJw1ZWO/WOWfVKuzfpG10NH4=
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 6032311081B; Sun, 18 Oct 2026 17:06:38 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.739
X-Spam-Status: No, score=-3.739 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.34, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=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 5Gonyl1b0W97;
	Sun, 18 Oct 2026 17:06: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-348056-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 130111107BE; Sun, 18 Oct 2026 17:06:23 +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 78A5B317BC; Sun, 18 Oct 2026 14:06:16 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E9454C2251;
	Sun, 18 Oct 2026 14:06:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="usZl9r2s"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(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 D7A3D3D6487;
	Sun, 18 Oct 2026 14:06:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792332374; cv=none; b=lKb6RT3y1/ALDGJX7jaQ9CeGc+WWaORjv9t9VwCg+iXNXCN6dHKIasRmWjK23r9pDEB2TvNlZOaz1ECcUzvfa0J5zEUSc/Xe7Ml6F/5biAZ8lw/VrJLC0h+kryDBxvmFFnAo+KDhh4jK2ij2kWIL/tuuobvaZmKb6kf6x6th9t0=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792332374; c=relaxed/simple;
	bh=6zfVRO0wUkIX0trYTHFUHGIOQjYjRYp9mcAVET69qKc=;
	h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=fxf7mIjgFmJCKHzdDPHCDnPqAVIb1zeXumkkMncjmUzGFO7teWe2+xyKpbtnMugqKVa3Led9gev5QqYqVnwsAOX9H/m1s1GXTJp7leMvuMtBrim1VbNU7UMeZdWCbpr1TDxPvpx2KB69FE62GKcNfC8TQCSiPgeVZM7VP86xiSc=
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=usZl9r2s; arc=none smtp.client-ip=10.30.226.201
X-Received: by smtp.kernel.org (Postfix) with ESMTPS id 66132C2BCC7;
	Sun, 18 Oct 2026 14:06:14 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
	s=k20201202; t=1792332374;
	bh=6zfVRO0wUkIX0trYTHFUHGIOQjYjRYp9mcAVET69qKc=;
	h=From:Subject:Date:To:Cc:Reply-To:From;
	b=usZl9r2sx7zxafYTaJ+GsiOeWirU+LywZL7cdtE1pCPcHZVe0zha7MqgEkB/SOFWb
	 oB5udI+H0DMUyslePTtSFHvojjaeY47mLcR1hlPJUIERj7jVawsANnDPDcsnZ3BlCz
	 hOYVe2q1dY3T+iYkkFCraki4EDbkHJNmQ8Cm3d72Rc1whKplgxxXKWINokoOH2N5av
	 2o4zSC9O9m3VKft9+ESnPcPwjXBPr7zDKIMGiYSy1riuzWPcSlgrTTDYJpFXwNGZPB
	 8EflRdiIxMXfxffaXqDao7eWXIy6+5WLbTRFj6KN4gYdxNKvPUsEHwXj8mnmsgHjvF
	 crFSBHYEX12nA==
X-Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1])
	by smtp.lore.kernel.org (Postfix) with ESMTP id 414A2CCF2C9;
	Sun, 18 Oct 2026 14:06:14 +0000 (UTC)
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-B4-Tracking: v=1; b=H4sIAAAAAAAC/22OQQ6CMBBFr0JmbU0LUogr72FY0HaEGimkrQRDu
 LttUVcu//t/XmYFh1ajg3O2gsVZOz2aEPghA9m3pkOiVciQ05wzSmuyqInMJXFoFPnBgjJFkam
 C8RLC6WTxppekvYJBTwwuHpq9cU9xR+mjNW5F65AI2xrZR/TxJ/r1x1mvnR/tKz06l0m814z+/
 ykAShTyupKCV/JEL93Q6sdRjgM027a9AaS+voX7AAAA
X-Change-ID: 20261008-xdp-v5-send-20261008-301d0e1d3165
X-Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, 
 linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, 
 Alexis Lothorรฉ <alexis.lothore@bootlin.com>, 
 Lorenzo Bianconi <lorenzo@kernel.org>, 
 Tiezhu Yang <tiozhang@didiglobal.com>, Bochao Cao <bochaolucky@gmail.com>, 
 Willem de Bruijn <willemdebruijn.kernel@gmail.com>, 
 Petr Machata <petrm@nvidia.com>
X-Mailer: b4 0.15.2
X-Developer-Signature: v=1; a=ed25519-sha256; t=1792332371; l=3816;
 i=bochaolucky@gmail.com; s=default; h=from:subject:message-id;
 bh=6zfVRO0wUkIX0trYTHFUHGIOQjYjRYp9mcAVET69qKc=;
 b=VEZVqT1rfhQPPNsBAbSVqpiKSeZrkvkyD1+KxVRRNWTFS1XQO0FbQcuRXdSv9d9pCTjp42CIt
 PI7f8E3W/obD9ZLY5jEh0U5lkf8I0n4JEtsgRglpEvVNSyz1Vu9x2fU
X-Developer-Key: i=bochaolucky@gmail.com; a=ed25519;
 pk=ZYp7O2eXSIrJ9YmKrl0iHDoulPYSG+1lzICsicAvld0=
X-Endpoint-Received: by B4 Relay for bochaolucky@gmail.com/default with
 auth_id=1042
X-Original-From: Bochao Cao <bochaolucky@gmail.com>
X-Reply-To: bochaolucky@gmail.com