๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3364

Re: [PATCH net-next 3/4] selftests: mptcp: convert iptables to nftables for mptcp_sockopt.sh

#3364
From: netdev-bot+sashiko
Date: Wed, 14 Oct 2026 20:56
79 lines
8642 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message does not mention two new runtime requirements
  added by this patch.

--

selftests: mptcp: convert iptables to nftables for mptcp_sockopt.sh

This patch moves the mark rules in mptcp_sockopt.sh from iptables/ip6tables
to nftables and keeps the same table and chain names. check_mark() now reads
the drop counter from nft JSON output and parses it with jq.
mptcp_lib_check_tools() gets new checks for nft and jq.

> diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> index b9d14647f4019..20853d0198ffc 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> @@ -528,7 +528,14 @@ mptcp_lib_check_tools() {
>  				exit ${KSFT_SKIP}
>  			fi
>  			;;
> -		"iptables"* | "ip6tables"*)
> +		"nft")
> +			if ! nft --version &> /dev/null || \
> +			   ! nft -j list ruleset &> /dev/null; then
> +				mptcp_lib_pr_skip "Could not run all tests without nft -j"
> +				exit ${KSFT_SKIP}
> +			fi
> +			;;
> +		"iptables"* | "ip6tables"* | "jq")
>  			if ! "${tool}" -V &> /dev/null; then
>  				mptcp_lib_pr_skip "Could not run all tests without ${tool}"
>  				exit ${KSFT_SKIP}
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> index e850a87429b61..ef2738720e249 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh

[ ... ]

> @@ -105,32 +109,31 @@ cleanup()
>  
>  mptcp_lib_check_mptcp
>  mptcp_lib_check_kallsyms
> -mptcp_lib_check_tools ip "${iptables}" "${ip6tables}"
> +mptcp_lib_check_tools ip nft jq

[Severity: Low]
This isn't a bug, but should the commit message list the new runtime
requirements? The script now needs jq and an nft built with JSON support
(nft -j list ruleset). The shared mptcp_lib_check_tools() helper in
mptcp_lib.sh also gets new "nft" and "jq" cases.

The commit message only says:

    After conversion, the generated output matches the original
    iptables/ip6tables behavior.

The reason for using JSON and jq appears only in the v2 notes below the
--- line, and those notes are dropped when the patch is applied.

This check runs at top level, before any subtest. So a system that has
iptables but no jq, or an nft without JSON support, now skips the whole
script. That includes do_mptcp_sockopt_tests and do_tcpinq_tests, which
don't use netfilter.

Could the commit message mention the jq and nft JSON dependencies and the
mptcp_lib.sh change?

[ ... ]

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261013-net-next-mptcp-misc-feat-7-4-part2-v1-0-1181e5d2fda4%40kernel.org
Technical Details
Message-ID: <179201140828.434549.10971881913720826839@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-346443-linux-kernel-netdev=dewy.ru
References: <20261013-net-next-mptcp-misc-feat-7-4-part2-v1-3-1181e5d2fda4@kernel.org>

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-346443-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 3/4] selftests: mptcp: convert iptables to
 nftables for mptcp_sockopt.sh
Date: Wed, 14 Oct 2026 20:56:48 +0000
Organization: Usenet Network
Message-ID: <179201140828.434549.10971881913720826839@kernel.org>
References: <20261013-net-next-mptcp-misc-feat-7-4-part2-v1-3-1181e5d2fda4@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2387213"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:QVfE4IcTgvd0VSFx7UNshSS7pPM= sha256:nMrvDHZww56TtUxOY+BOAkOnCIZeKXdxJJidMUOZoko=
	sha1:htEurXXpobsAercugEWCntp17dI= sha256:mbIKbE02JHmX4yuI7ZQNbMCV6Gv5e/MTAvarsvaK6yo=
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 972941101D1; Thu, 15 Oct 2026 00:01:30 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.339
X-Spam-Status: No, score=-1.339 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,
	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 THV_uXhP3luj;
	Thu, 15 Oct 2026 00:01:27 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-346443-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 0818510FF16; Thu, 15 Oct 2026 00:01:18 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id C44F92B16D; Wed, 14 Oct 2026 20:56:51 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EF1D476075;
	Wed, 14 Oct 2026 20:56:51 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K/h1eecC"
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 2286534EF07;
	Wed, 14 Oct 2026 20:56:49 +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=1792011411; cv=none; b=F1BR1k1J5WOv1YzWycg7ru1uN9s+8Ez/GaIY/6oq8Ip9ptITplNe8Oss+Hhd1/M/Wzsz0PJzu7OPNMFKnU2Rm+/dFHP2xZRWthX8mlLuSteMhWX/HszcNsR3uEWmGenCANUwBE1tZZSd9X5GQw4OX28sP2ZrTxQ5mh5vc/tJAcw=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792011411; c=relaxed/simple;
	bh=KDOUJs0C3uYitpaFWMJOypNbAlgV3q5tkqutP2G8roo=;
	h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=lIJM17yPPtKN6WVQbu45ObNNZBiHBaT6xkUyuuUUgw1mixhAwOjR1S2yL/1lKlBKogAqpSAaFUQaNLaQn67MStrgaMt6i2OTaO4ExepiNETiuipPx9ktPie5g19OIacrq0D+0YUpuOYPUUkzqceD1U2aWeBFjTZJG8daAfxcQfM=
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=K/h1eecC; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD8BF1F000C4;
	Wed, 14 Oct 2026 20:56:48 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792011409;
	bh=9iR4CHLMGZ4aDi692nqAlwhqkY/qmfz7HVjcsaRcdM0=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=K/h1eecCBXuvC4BXFKFa6jCsLZW+LYl//n+sdLGytWj3rxut7nECfCUjC7x3f6cHg
	 gdn2h2WY05ux6cFRxQHRtDMrci2417utQXAqy7xCxV0QSMzEeMrFFMVagcJc2vq87u
	 I3x9DG3mWsGZnKPw1aFEpbI2ZUuqTZUYLjqtBDNsmy6h2kfcGI8qGsVsuJKCufuLWY
	 cJgasS6IdSkYYrjVZ/cfUyBff8sFgA7V2Y+AEXGflobU/m/fHp737RK+BafzTNdJip
	 tnKo6QICRv37sgsHHsN0mcvjkgz3A5KbqbqYdeEl/FmXzIZRxcBo6OHnVWuHy67Fy2
	 thj2SW31pOzyg==
X-Cc: martineau@kernel.org, geliang@kernel.org, davem@davemloft.net,
 edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
 cpaasch@openai.com, netdev@vger.kernel.org, mptcp@lists.linux.dev,
 linux-kernel@vger.kernel.org, liuhangbin@kylinos.cn, shuah@kernel.org,
 linux-kselftest@vger.kernel.org, bpf@vger.kernel.org
X-In-Reply-To:  <20261013-net-next-mptcp-misc-feat-7-4-part2-v1-3-1181e5d2fda4@kernel.org>
X-sashiko-severity: Low
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>