From: Hangbin Liu <hangbin.liu@linux.dev>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: MPTCP Linux <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-next 2/2] selftests: mptcp: convert iptables to nftables for mptcp_join.sh
Date: Thu, 3 Sep 2026 14:35:26 +0800 [thread overview]
Message-ID: <apkVLlKisTGIS_n_@fedora> (raw)
In-Reply-To: <apjU-uM8dvxnVcaP@fedora>
Hi Matthieu,
Here is some update.
On Thu, Sep 03, 2026 at 10:02:52AM +0800, Hangbin Liu wrote:
> >
> > > init_partial()
> > > {
> > > capout=$(mktemp)
> > > @@ -147,6 +110,14 @@ init_partial()
> > > if $checksum; then
> > > ip netns exec $netns sysctl -q net.mptcp.checksum_enabled=1
> > > fi
> > > +
> > > + ip netns exec "$netns" nft add table inet mjoin_table
> > > + ip netns exec "$netns" nft add chain inet mjoin_table input \
> > > + '{ type filter hook input priority filter; policy accept; }'
> > > + ip netns exec "$netns" nft add chain inet mjoin_table output \
> > > + '{ type filter hook output priority filter; policy accept; }'
> > > + ip netns exec "$netns" nft add chain inet mjoin_table mangle \
> > > + '{ type filter hook output priority mangle; policy accept; }'
> >
> > I hope having this done by default for all subtests will not have a big
> > impact at the end when using a debug kernel. Do you mind checking the
> > impact, please? Just not to add a few seconds for each of the 130+
> > subtest if it is only needed in some of them.
>
> It shouldn't, I will test the running time before/after the change.
With debug kernel + 4 cpu on my laptop, the time for iptables version is
real 35m44.460s
user 0m22.455s
sys 25m17.923s
The time for nft version is
real 43m37.393s
user 0m29.183s
sys 32m15.354s
I will find a way to only add the table when needed.
> > Also, maybe clearer to use 'nft -j' with 'jq' to get that (if possible)?
>
> I check the output of `nft -j` (paste an example at the end of mail),
> which looks not each to get the rule handle easily.
I have find a way to get the handle via jq.
nft -e -j add rule ip filter OUTPUT meta l4proto tcp accept | \
jq '.nftables[] | select(has("add")) | .add.rule.handle'
I will use it in the next version.
Thanks
Hangbin
next prev parent reply other threads:[~2026-09-03 6:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 6:52 [PATCH mptcp-next 0/2] selftests: mptcp: convert iptables to nftables Hangbin Liu
2026-09-02 6:52 ` [PATCH mptcp-next 1/2] selftests: mptcp: convert iptables to nftables for mptcp_sockopt.sh Hangbin Liu
2026-09-02 7:02 ` sashiko-bot
2026-09-02 7:47 ` Hangbin Liu
2026-09-02 9:17 ` Matthieu Baerts
2026-09-03 2:15 ` Hangbin Liu
2026-09-02 6:52 ` [PATCH mptcp-next 2/2] selftests: mptcp: convert iptables to nftables for mptcp_join.sh Hangbin Liu
2026-09-02 10:00 ` Matthieu Baerts
2026-09-03 2:02 ` Hangbin Liu
2026-09-03 6:35 ` Hangbin Liu [this message]
2026-09-03 6:54 ` Florian Westphal
2026-09-03 7:35 ` Hangbin Liu
2026-09-03 9:28 ` Matthieu Baerts
2026-09-04 8:01 ` Hangbin Liu
2026-09-04 16:40 ` Matthieu Baerts
2026-09-07 1:02 ` Hangbin Liu
2026-09-07 5:50 ` Matthieu Baerts
2026-09-07 6:59 ` Hangbin Liu
2026-09-07 7:55 ` Matthieu Baerts
2026-09-02 7:23 ` [PATCH mptcp-next 0/2] selftests: mptcp: convert iptables to nftables MPTCP CI
2026-09-02 8:14 ` MPTCP CI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=apkVLlKisTGIS_n_@fedora \
--to=hangbin.liu@linux.dev \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.