From patchwork Mon Feb 17 12:37:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bastien Curutchet \(eBPF Foundation\)" X-Patchwork-Id: 866301 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 443061E49F; Mon, 17 Feb 2025 12:37:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739795865; cv=none; b=bYYVoWqowU+X/8NpKro9Ero9qzMTxrBtNm5JEUGsGRq31CT+OGOmsNiDUGyrAJ9GfV+OJE2u+0HFcdvvxpKV7aQ8R+uLSPflbzQ+7JXuWFiYRs36MNPTaBUazbvzPqjPyDf2f21RQ1LIHwmu5EKa/EdI1ZnJ/Us8Kkdzrf5Xsa4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739795865; c=relaxed/simple; bh=N+hbKVsU3yr0pdvxSg3gz8TMzTEZjqbulPC2FucYu98=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=VmuNooo3el3wmc9OL/wnjFQX2EGpDC5sv91zXvi/ZLnDdlKsr1CEQp+pPPRll5mbOHt+SwfR73pbMo0xqSfGon3Q5NqhozXmT4mSN0wG0uI8NSpOYmWNaeaKER8fGARu6MptQpIHwRj8LZnOVMNm9pQKtX+sj8AScLXl+CMSGAs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Mdth02Gv; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Mdth02Gv" Received: by mail.gandi.net (Postfix) with ESMTPSA id D1C96442E6; Mon, 17 Feb 2025 12:37:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739795860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MHW5GHgCy90xIagepwZyXILIBdlp2eVTmbrVYozSMjs=; b=Mdth02GvPC71UBUWFwBXdI21GKQdAJx5mrseKFVMSMqXvPctTza2z2LFWUgA3bhcDt4hf4 kjWrXZARqI0d1YvvIcpJxsxaBSeZ8pPNMuH815nS5u3d0kgSz71co+5Mg9aVe0n6CbIqRA 4TecOUWugWTCcZ25rnXSY1s1j1Fl4NGT4vofO/oHHCI4zZiTDhOQEcdbaeFxhu8nXAEqk+ MH06NK5hGrYJ6dnQ6pVdOKxGqzaBIWEbXnMYw08wPjSj4/GVhQHaFL4ashOA3pknIpglDw P24F55uilVkXQrou8p1rQRJszBwcblcFo2nAuzlRF9vSvG4UHOf9a6xbbk/gNQ== From: "Bastien Curutchet (eBPF Foundation)" Subject: [PATCH bpf-next 0/3] selftests/bpf: tc_links/tc_opts: Unserialize tests Date: Mon, 17 Feb 2025 13:37:37 +0100 Message-Id: <20250217-tc_links-v1-0-27f7965e3dcd@bootlin.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAJEts2cC/x3MWwqAIBBA0a3IfCeYvdtKRKSNNRQWGhGIe0/6P HC5ATw6Qg89C+DwIU+nTcgzBnqb7YqclmSQQlYily2/9XSQ3T1f2q6cZaEaUReQ8suhofdfDaA uwy2+N4wxfsCbhjdkAAAA X-Change-ID: 20250128-tc_links-d894a23b7063 To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan Cc: Thomas Petazzoni , Alexis Lothore , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Bastien Curutchet (eBPF Foundation)" X-Mailer: b4 0.14.2 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehkeegvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffufffkgggtgffvvefosehtjeertdertdejnecuhfhrohhmpedfuegrshhtihgvnhcuvehurhhuthgthhgvthculdgvuefrhfcuhfhouhhnuggrthhiohhnmddfuceosggrshhtihgvnhdrtghurhhuthgthhgvthessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepkedtkefgtedtgeekhfdujeevfefhvdetgfduudeifedvhfdvgfefteehhfdvvefhnecukfhppeeltddrkeelrdduieefrdduvdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledtrdekledrudeifedruddvjedphhgvlhhopegludelvddrudeikedrtddrudegngdpmhgrihhlfhhrohhmpegsrghsthhivghnrdgtuhhruhhttghhvghtsegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopedvtddprhgtphhtthhopehshhhurghhsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehsohhngheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprghstheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepjhhohhhnrdhfrghsthgrsggvnhgusehgmhgrihhlrdgtohhmpdhrtghpthhtoheprghnughrihhis ehkvghrnhgvlhdrohhrghdprhgtphhtthhopehsughfsehfohhmihgthhgvvhdrmhgvpdhrtghpthhtohephihonhhghhhonhhgrdhsohhngheslhhinhhugidruggvvhdprhgtphhtthhopegvugguhiiikeejsehgmhgrihhlrdgtohhm X-GND-Sasl: bastien.curutchet@bootlin.com Hi all, Both tc_links.c and tc_opts.c do their tests on the loopback interface. It prevents from parallelizing their executions. Use namespaces and the new append_tid() helper to allow this parallelization. Signed-off-by: Bastien Curutchet (eBPF Foundation) Acked-by: Stanislav Fomichev --- Bastien Curutchet (eBPF Foundation) (3): selftests/bpf: tc_helpers: Add create_and_open_tid_ns() selftests/bpf: tc_link/tc_opts: Use unique namespace selftests/bpf: tc_links/tc_opts: Serialize tests .../testing/selftests/bpf/prog_tests/tc_helpers.h | 12 ++ tools/testing/selftests/bpf/prog_tests/tc_links.c | 164 +++++++++++++-- tools/testing/selftests/bpf/prog_tests/tc_opts.c | 230 ++++++++++++++++++--- 3 files changed, 361 insertions(+), 45 deletions(-) --- base-commit: cfed0f474a4bb2f12b54de5d6a7301cfb7dc0dbd change-id: 20250128-tc_links-d894a23b7063 Best regards,