From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id A236E80BB3 for ; Thu, 22 Oct 2026 16:16:22 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69MGEv2N010770; Thu, 22 Oct 2026 19:14:58 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69MGEv2N010770 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="a3P7mRgu" Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69MGEtMJ010765 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 22 Oct 2026 19:14:56 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69MGEtMJ010765 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-48b00febba3so1562487f8f.1 for ; Thu, 22 Oct 2026 09:14:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBykpcRq4/UzfZ4Bf6hXPeuVtIpp38L31y8PUxtAN0/lbrHmREkWE4lxhC+PZJys01qmqmhAFQ==@openvz.org X-Gm-Message-State: AFq9FYIbPOVWQvvfzUEgR7d6cQacBe8a1A80zTAVfnTl+NTYUuDl2XTX RKCA8Ilh0LRx7judq2HIr/0fNY2MCTE0kH5GafHgBSXFq3j/hWGVt/snVHRK/a5dXDWX+16CVk/ j8CD0KU1BrOli4vG0pR9Y4friusf/kEfHc7muAKWKs28BUrmptPHMRg== X-Gm-Gg: AYBFou22VyYEE+pqYDhGkESXsDP3EFvUNl77b3wirzfkoUL93T0iVMU4/my4hSYvSi6 F0t4uac10/O+LUsrzoMGTvh53NteI1qirpZMCkYB/yRMX3Mc/GePdZQCQR0iXf1wgmiJvD0n6BP FoQ93FogUNdtmc4JD8tchTevUWL8FVVaKoZdHNZSwSSiBUIqoNNBIOU0PKQb4FDV8fiXJAAh/kd kFb21u1nPBq/ry+L0iQ3/RVIO1RU1iv0H9oZ5a5Y9bvgeBLctSfcY5cW1pp6NZscPQVi0/7QooZ Pd6eekVKIxzDk3jxXyCHclw2ID/oP1+Y9qtRr+IbLH8zOoP0tTBD7BDlgcy/p7frAggNKsSAwgm hrocX4imnjiwq5gWgiw== X-Received: by 2002:a05:6000:611:b0:48e:476:99fb with SMTP id ffacd0b85a97d-48e264a7333mr11401149f8f.22.1792685695558; Thu, 22 Oct 2026 09:14:55 -0700 (PDT) X-Received: by 2002:a05:6000:611:b0:48e:476:99fb with SMTP id ffacd0b85a97d-48e264a7333mr11401096f8f.22.1792685694982; Thu, 22 Oct 2026 09:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1792685694; cv=none; d=google.com; s=arc-20260327; b=gf9nOeNxbVNALF1HJqE9OYCivJN5KqzcdKeRJlXQ8+S/Rwe7VtRyAWHYa+pOGKamT8 wMkadHQJZGpxKU1KFcddfKre/vENB6f8anRR4ETmPaKwSZlg0OrmqwdWXZUx6rZ+2FaB /xgaUGN7UYEOfmZPHEQhIS45r/KazEGG06xVc3+VHodnAnVTsPo4y5nnTaTGM+WgkiG5 7jSItYu1uROLmM7pF4f0kYRoTyzpNzAUhwTQTmLAEnL/03RVveyGwae9a0J5STYCCC1u cdbsHt69nftn/W8bao5XAx6G4vhsX7XKySA+1m4XKiWeeWxiwqA0ENVbBxYTzgfQ9YVb 4BOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:mime-version:dkim-signature; bh=FH23JSd9lguIOQ79rsH7l7RfKfcT6MqtOz9shTr4rnA=; fh=CTF2GHyV+XdzB5TROrdG4fdLri6JSHNOBC+LNuNq5bA=; b=HA+gJ3IGfwtsq3RRMdLu7B1uuG+N/HzL9GsfkbrW8u4TSbWpa8H9/PJd6YEqInQXa8 5zWGIEdGW0HFL1y4XO5GUf85U10rBNSSuSwe6BpiNgVNq6h8NDZSDutGmuoY8mZhS0zI NT5/oHR8thGBTQKiXydEN34ytjbWE1yO3lphMzGFB1QkSVx6Mosxwiod/BYgH/OCohvr 4xKvXldcjHaPglDV0uY8p08tuPLts+eh1tXom457oVqVheY51mJ3pczyIf6AoOZL0vLZ qaJOq71u1kwVgmn1qDYlOhIZi5gxL4ICLq7/Rp9knL9UWhaAoQs8VNAdnk8LxapLz0ZI Af4Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=a3P7mRgu; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48e25845f4esi11584010f8f.137.2026.10.22.09.14.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2026 09:14:54 -0700 (PDT) Received-SPF: pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=a3P7mRgu; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Message-Id:Date:From:Subject:Content-Type: MIME-Version; bh=FH23JSd9lguIOQ79rsH7l7RfKfcT6MqtOz9shTr4rnA=; b=a3P7mRguRwTz sEJNKQJi423A8UcAZDAtbWupQhz5QaaD1gA5CODWYgvFM2cJx8gvA4ihCiEIt8Q5/Xl14YhY8TION rPQtImU8lbBnXjH0VboDl9SHHnXINyPapo8UA24wiWys2YERWVZxYe0yA6dVlVnLUExJvyE7YtO3c LBjtF/w6A8ICaoE+s2HpoVm92YT84g9FtUO3TbDQYQogdW3xoxaGE9QztU6C7O3QNF+qb2KJx7/Nq cBUr3i3F7BpRXS6QfTxoVRqvkHBVbGDPSIGNKQbwWfpma+MHMBZeK50IY1wqiW6esvOtKB4N/nWk5 1pASfx7vyWtinGqGt3eX8Q==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=f0.sw.ru) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xJvNl-000ZrW-0h; Thu, 22 Oct 2026 18:14:52 +0200 MIME-Version: 1.0 From: Konstantin Khorenko To: Eva Kurchatova In-Reply-To: <20261022024816.2435565-2-eva.kurchatova@virtuozzo.com> References: <20261022024816.2435565-1-eva.kurchatova@virtuozzo.com> <20261022024816.2435565-2-eva.kurchatova@virtuozzo.com> Date: Thu, 22 Oct 2026 18:14:48 +0200 Message-Id: <179268568845.4068023.14180818659434809034.b4-review@b4> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3660; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=IOYx5CftUZpKKI08xxDUTqTIof5ZdDtE/AZlaZ+9Db4=; b=owEBbQKS/ZANAwAKAVGWCkf5YVwqAcsmYgBq2jZ+ETS5wXKmmPODNQ2SsrHKNGa+/G75R9Qax DxJl8SHIrCJAjMEAAEKAB0WIQRWD23IPcXT0GO9CCxRlgpH+WFcKgUCato2fgAKCRBRlgpH+WFc Kl9yD/9X2QvsJuTwFOwqkQ8QBx9PyIPDFKog2W9prgsWcd/K8siKvVZ4lbtii+qeqgpvPbd/0Hm 38/Tl3bsZfDB0nAJ8oAyO9t+dGiRSqs1a+SmpJIVw+bopD66gLHVJjLywtnBZ/rKn4yMqEZ24VO H10x4LuYlVr/ipe3p5rs6CLzHv3didLALkn2iz1PC7drXiALHimrOnFWMLC4/5kS8a/5oEzC6zU /Lngyp20Kz7N+zVIvRumAagPRr6CBaQSUMDhgvwPiavOLHbohhGOaGB4bZocTk6viepdY7hP9bc ginCAbk1FgTOomG0S0kK+Nh8KRAEz4OsZxPmQ5ihC/lUdxVj6EhuSpfk9Lp49AFrlpqX2F1eHSC rTAJT7XThwkIqL+i5P6qevEntac7UQtIaQmZCcfZrUAp9vabT6DDKN7mjIyDjkLgZdUrS9WkTiV vEDw/yExg9xOcR5Jvt3P7/cN0hMSbk9OgD6Bwb4jnaftKi1KlL793r/QqPiKiUGAKmcB9pbNdit BVss0pZ9FGf+rdDF9rmv48kLz6FiE5dhIGpndaOHEDBKaxjghHkKk96yB2T/x07YkjNrWuIuEyM xY86bD88AkDCDqcNR5+dFTwXfFyxFmqyPsdSUdMBsyyyz/6gFvH09CS6b/kAHkRdZ0NzL5Tpv3w 5gCNTKXvzktthSg== X-Developer-Key: i=khorenko@virtuozzo.com; a=openpgp; fpr=560F6DC83DC5D3D063BD082C51960A47F9615C2A X-OZ-Fwd: true Cc: devel@openvz.org Subject: Re: [Devel] [PATCH hci-8.1 v2 1/1] selftests/bpf: run the xsk veth tests in a network namespace of their own X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org Hi Eva, > + trap "ip netns del ${XSK_NETNS}" EXIT The parent still has "trap ctrl_c INT" from the top of the script. On Ctrl-C it runs cleanup_exit ${VETH0} ${VETH1} in the host namespace, for its own random ve#### names that it never created. If the host happens to have an interface with that name, it gets deleted. Fix: in the parent, before the re-exec, replace the INT trap with "exit 1". The EXIT trap then deletes the namespace, and the pair goes with it. > + # The pair stays up for a run by hand > + [[ $debug -eq 1 ]] && trap - EXIT && \ > + echo "The pair is up in network namespace ${XSK_NETNS}," \ > + "use ip netns exec ${XSK_NETNS}" With -d the child prints "-i VETH0 -i VETH1" for the hand run, but not -f. A hand run of xskxceiver inside the namespace cannot read the sysctl and falls back to 17 frags, so on a kernel built with CONFIG_MAX_SKB_FRAGS=45 too_many_frags fails. Fix: add the value to the child's debug line: echo "-i" ${VETH0} "-i" ${VETH1} ${FRAGS:+"-f" ${FRAGS}} Mainline -------- Mainline has the same two problems, so please file a bug for sending the fixes there and put the lore link to the mainline series into it. The test in mainline is different: since v6.19-rc1 (d1aec26fce257 "selftests/bpf: test_xsk: Integrate test_xsk.c to test_progs framework") most xsk tests run from test_progs, the rest stays in test_xsk.sh. So the patches will not be a port of this one, but please fix it now, while the details are fresh: - test_xsk.sh creates the veth pair in the caller's namespace. Fix: run the veth part in a namespace of its own, as here. - test_ns_xsk_skb and test_ns_xsk_drv (prog_tests/xsk.c) already run in a namespace that test_progs creates for every ns_ test. But they read /proc/sys/net/core/max_skb_frags from inside it, the file is not there, and they silently use 17. Fix: take the limit from vmlinux BTF, the element count of struct skb_shared_info.frags (btf__load_vmlinux_btf(), btf__find_by_name_kind(), btf_array()->nelems). It works in any namespace, so test_xsk.sh needs no -f option in mainline, and it is the limit AF_XDP really checks (see the last item below). Suggested order: the BTF patch first, then the test_xsk.sh namespace patch on top of it. Not part of this series ----------------------- I will take this series once the comments above are addressed; the issues below are not caused by it and should not hold it. They are in the same test though, so please file two more tasks, one for vz and one for mainline, and fix them in both places: - test_exit() in xsk_prereqs.sh always exits 1, so every "skip all tests" (no veth, no ip, no netns) is a failure for the kselftest runner. Fix: "exit $1". The callers pass $ksft_fail or $ksft_skip. vz and mainline. - test_xsk.sh exits 0 when tests failed: it ends with "if [ $failures -eq 0 ]" without an else. Fix: backport 2a912258c90e8 ("selftests/bpf: Upon failures, exit with code 1 in test_xsk.sh", v6.18-rc1). vz only, mainline already has it. - The test takes the frag limit from the max_skb_frags sysctl, but AF_XDP copy mode checks the compile-time MAX_SKB_FRAGS (xsk_build_skb() in net/xdp/xsk.c). The sysctl caps TCP and MPTCP only. Once an admin lowers it, too_many_frags checks the wrong limit. Fix in vz: take the limit from vmlinux BTF as described above and drop the -f option this series adds. In mainline the BTF patch above already covers it. Please link all new bugs to VSTOR-150731. Thanks, Konstantin -- Konstantin Khorenko, Virtuozzo Linux Kernel Team _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel