Article View: linux.kernel.netdev
Article #693Re: [PATCH net-next 4/7] selftests: ovpn: enable TCP_NODELAY on TCP sockets
From: netdev-bot+sashiko
Date: Thu, 08 Oct 2026 13:32
Date: Thu, 08 Oct 2026 13:32
97 lines
8718 bytes
8718 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 patch reduces TCP selftest coverage.
--
selftests: ovpn: enable TCP_NODELAY on TCP sockets
This commit makes ovpn-cli set TCP_NODELAY on both the connecting and the
accepted TCP sockets, which matches the current userspace default. TCP does
not preserve record boundaries, so the tcpdump based DATA_V2 peer ID check
in ovpn_run_basic_traffic() now runs only for UDP. The TCP branch of
ovpn_build_capture_filter() is removed.
> diff --git a/tools/testing/selftests/net/ovpn/test.sh b/tools/testing/selftests/net/ovpn/test.sh
> index 392109d5e14e2..e2e6ffdd29bb0 100755
> --- a/tools/testing/selftests/net/ovpn/test.sh
> +++ b/tools/testing/selftests/net/ovpn/test.sh
> @@ -137,35 +137,33 @@ ovpn_run_basic_traffic() {
> local tcpdump_timeout="1.5s"
>
> for p in $(seq 1 ${OVPN_NUM_PEERS}); do
[ ... ]
> if [ "${OVPN_PROTO}" == "UDP" ]; then
[ ... ]
> + timeout ${tcpdump_timeout} ip netns exec "${peer_ns}" \
> + tcpdump --immediate-mode -p -ni veth${p} -c 1 \
> + "$(ovpn_build_capture_filter "${header1}" "${raddr}")" \
> + >/dev/null 2>&1 &
> + tcpdump_pid1=$!
> + timeout ${tcpdump_timeout} ip netns exec "${peer_ns}" \
> + tcpdump --immediate-mode -p -ni veth${p} -c 1 \
> + "$(ovpn_build_capture_filter "${header2}" "${raddr}")" \
> + >/dev/null 2>&1 &
> + tcpdump_pid2=$!
> +
> + sleep 0.3
> fi
[Severity: Low]
This isn't a bug, but now that the capture runs only for UDP,
test-tcp.sh and test-symmetric-id-tcp.sh no longer check the DATA_V2 peer
ID on the wire. Is there another way to keep some wire-level peer ID
coverage for the TCP variants?
On receive, ovpn_tcp_rcv() gets the peer from the stream, not from the
on-wire peer ID:
drivers/net/ovpn/tcp.c:ovpn_tcp_rcv() {
struct ovpn_peer *peer = container_of(strp, struct ovpn_peer, tcp.strp);
...
}
So a successful ping over TCP does not by itself show that the correct
tx_id was sent.
tx_id is set in common code and written to the packet in
ovpn_aead_encrypt():
op = ovpn_opcode_compose(OVPN_DATA_V2, ks->key_id, peer->tx_id);
The UDP variants, including test-symmetric-id.sh, still exercise that
path.
Separately, ovpn_connect() and ovpn_accept() in ovpn-cli.c now set
TCP_NODELAY unconditionally, so every TCP selftest runs with Nagle
disabled. Would it be worth adding an option that leaves Nagle enabled, so
that setup still gets tested?
> - peer_ns="ovpn_peer${p}"
> -
> - timeout ${tcpdump_timeout} ip netns exec "${peer_ns}" \
> - tcpdump --immediate-mode -p -ni veth${p} -c 1 \
> - "$(ovpn_build_capture_filter "${header1}" "${raddr}")" \
> - >/dev/null 2>&1 &
> - tcpdump_pid1=$!
> - timeout ${tcpdump_timeout} ip netns exec "${peer_ns}" \
> - tcpdump --immediate-mode -p -ni veth${p} -c 1 \
> - "$(ovpn_build_capture_filter "${header2}" "${raddr}")" \
> - >/dev/null 2>&1 &
> - tcpdump_pid2=$!
> -
> - sleep 0.3
[ ... ]
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261007133018.1451958-2-antonio%40openvpn.net
Technical Details
Message-ID:
<179146632050.434549.11769906419879477924@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-343012-linux-kernel-netdev=dewy.ruReferences:
<20261007133018.1451958-5-antonio@openvpn.net>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-343012-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 4/7] selftests: ovpn: enable TCP_NODELAY on TCP sockets Date: Thu, 08 Oct 2026 13:32:00 +0000 Organization: Usenet Network Message-ID: <179146632050.434549.11769906419879477924@kernel.org> References: <20261007133018.1451958-5-antonio@openvpn.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="891671"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ynmSSFUJ5MRJukGxXrXZZg+q5VM= sha256:6Enq9ZRmN9NKswvIYjplRLaoO19tEBkm1fS4QXAeu3g= sha1:sPtVHx9+iG99giJrEQqJG0nqPc8= sha256:fOZ2cmRBlvho3q8KcjK164El0fOLjA3LIA++xkF6Ic4= 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 593D310F407; Thu, 8 Oct 2026 16:41:33 +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.241, 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 6Vm516peX1U6; Thu, 8 Oct 2026 16:41:29 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-343012-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 50DF810F401; Thu, 8 Oct 2026 16:41:26 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id EF66A295F5; Thu, 8 Oct 2026 13:32:07 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D3034A49B8; Thu, 8 Oct 2026 13:32: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="iWggV4PD" 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 955F643499E for <netdev@vger.kernel.org>; Thu, 8 Oct 2026 13:32:01 +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=1791466323; cv=none; b=Zen6LzS9JMTDXpGnKM+lnzmqjsZgr4dXHXD1ymF/vbTNa/SS9EJbDrW6x1SKMkFnr3PU72eBUMDu5vTNal3nEkdwUDANXzrMKu1mBYQbIJPrlZpztECIoPeA5lDjwdWCgxKaFuW+HY/HUJzceGRrq2xS+0s/xfaLN4OGxHy4R8s= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791466323; c=relaxed/simple; bh=GCc6hdXuoEpXFUh1ETpECGfr3WoWLdt7TinGxOYbLJw=; h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=arL/9W2CTyVpPUT9/8MDH+CUqmDy/6aMWCbzvI5o/nKOfJyi20c/wg9ISElQMzvA8FJwfPE/cJE8OjEa1h+HemdllR/5dw3DSfW8GLlMyNr6vbIyf6Qb66ZqnV34IeSIbBYSDVlhIcp6Lbbhz0xmjUbPRNy2Fcd70FqMr9SlMeE= 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=iWggV4PD; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E22A61F000FF; Thu, 8 Oct 2026 13:32:00 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791466321; bh=DHqQSxpu25SFfdNmAKtIxYNB4MjQhli30SVHwjK6v4E=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=iWggV4PD1yPsr5Chleh6G9XxUaWizk0/iqoEX8muAIoybF0sgSTsRFI3LQvf9xsl7 1sRH587aJa/n/wKIV12yGNauLzYlOpv72J7PWKCevXw/JtumtgPNbTh05MuYAJizBA 5hMnPQaasrTHbqTKU6lUHmj1TjO+6OJelu+/9EmN4kHELte1JcN3K0UJDnvZirp9pW wuoOoXSuerCS+NqwxO8aqqGopaRDrGHYE0JD24VtzTQs/f6fY88a9hUhlf/YdzazJb GlpBsU2/3z78zuHR+wSUouEcjZPWoRAAbiNpY/qM/AehrYC43zSdzzK9pz06RCPMSp mMj716D1aKCwg== X-Cc: netdev@vger.kernel.org, ralf@mandelbit.com, sd@queasysnail.net, kuba@kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com X-In-Reply-To: <20261007133018.1451958-5-antonio@openvpn.net> 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>