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 C7D808017D for ; Mon, 16 Nov 2026 13:11:10 +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 6AGD9thb025135; Mon, 16 Nov 2026 16:09:56 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AGD9thb025135 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="waE1yMO5" Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AGD9j4v025110 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 16 Nov 2026 16:09:45 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AGD9j4v025110 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48df02b91f9so779638f8f.1 for ; Mon, 16 Nov 2026 05:09:45 -0800 (PST) X-Gm-Message-State: APuU4Z/YMed4tL/qPu4+RVfPcNBLcY4emT4l1id3wohBG90enVd7eOSd Z/5N1jOmUeDg/7bQqsYvA2CYdUWDO9zJkQivAzundA3OkCh0zxI4QWlOPKJdBcd/Uoq2S5xRknM 5ixztlZk1ouEAZSa9oqeO6SdUaxwnuLzaNmrG9Ux1XSK77OJEBMorUA== X-Gm-Gg: AZFdTZeG2F8vn+5VZE1e+/Jts+e+ba081uo/gsZShIs7x8iNgINhfoZ79uQn6GDF3aB rXXDlkkG1D1OVRgph0nVLBTBINVi6cFLd1W6ZWNZS8J34mFtCQG9OkcrjH+02oRsjUq10srkd/g Fwv80PO/i2eBEbdS1mWBbugMcBBPvbbxi/8J4suRL8cEzBiTMyE61/3JtKWza8aDo7Q+qrl01Fr nY1/BASQJ9CiRt21/y/Vn0bJ17u4iSY9+/JpDtXe9VcrOfyGakIDsx78V6GuxvtY3EDfn2riyIm 8uz5AGZuCuZ1lNt8lrETOgB1cKRF9UUpyHv7ySN6D+5XNplvrp70fo7uVvtvqli6HWzjqWlCOn9 roHZgD42d4ck+dDhHRyLLbwNUUQ== X-Received: by 2002:a05:6000:4543:b0:491:d721:548f with SMTP id ffacd0b85a97d-49b01cf3461mr21631827f8f.12.1794834584844; Mon, 16 Nov 2026 05:09:44 -0800 (PST) X-Received: by 2002:a05:6000:4543:b0:491:d721:548f with SMTP id ffacd0b85a97d-49b01cf3461mr21631784f8f.12.1794834584308; Mon, 16 Nov 2026 05:09:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794834584; cv=none; d=google.com; s=arc-20260327; b=mTcPsN/mXDygKpt63M25GaKpyRMl7faTanW+fhPVrpXWGnclQzGwCBtjLR1OW3Smxz Go49R+pud07Vf56cEDziOe+dsTOhdV8rav5B+RUPdyJKPT+l9tIjsuanD8nDmfMIiM+b I/sMvy/OD6IeHHJGgYMTn5gHBciUzNcxtHS8FPamRXLPfEKzYM6zKA3d/mRuRvL0F9d7 1GyLbBE+nnj2n3d7y3+ahjOyYW9USz+eb9j4cSB3uVbFfmFcu3rxKrqUvfoHIPwWdCCU LkDQ4zAuqK9fQMjKAJc03/CFThcvIfkaibOFZItoyXytNQZcMR8w+yE8+URcwh9u/0LP 77xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=5shJ2mjeecHmdDGmlP7h2o3E8fUIxcdSH4CGP0WGnQ0=; fh=WpT6aB7RBAGHZeWZzqAr71yzRFbPTYkPWKsRagLn48Q=; b=jlBt0+9gx5oHdv1z0jDa+OH5J5gRsX8WEQ/zHGXuBghN5YPxokj47iWOcaCrbGy0DM nOIkwZm7ryeMz39ykBKf6PabwhuWesYKu6tOhOIfRdg7mF25YehdoDbF+RWS+qE4FTEp gZcADPfPKenrDFgJFS7V2lDAu5cfgg8OWBLbJy92DiYZpnQ1ldPbsg5qPVYVPTu7te18 kaHGj58xF/Zx6xplTm5/3ipnMCz5lKvPczPLEWjFfKg+A5wRfpaqdLT/6zXT+td3sY+Q sW1d2XYe2/Ib0hJYmG7vN9wb/vdof1gXjmmKsFjAwD1pKnOCX4Dg8FSs76wHg3pucDP2 +XCg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=waE1yMO5; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@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-49c6454b452si20594174f8f.327.2026.11.16.05.09.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2026 05:09:44 -0800 (PST) Received-SPF: pass (google.com: domain of eva.kurchatova@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=waE1yMO5; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@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=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=5shJ2mjeecHmdDGmlP7h2o3E8fUIxcdSH4CGP0WGnQ0=; b=waE1yMO5/Wus 4xZ8tOioWFZC9XLQnBeN4KX7l5CeY2ual8jIrGDb5AfBTb90yqlWWjoITRZg7rAOqoZqtiT8nNyYw B5VnYY0mBuAEKK79IOkw6ILcwtBrqvvnFHWyCw3HL7lIh4xjvZw2xVhGfT5zUn8tOnpJ7X6TAoOR7 QwCVAjgYmOwOu7dwy8YuQFPDGZahn3+W5Q6F8ichNp3XpqogqNsrdVQALFf7SPRGPK0QDGHY4VM6g bCn2K4OTeR943DeOJFme8UmZIPiZX2GPFNn6knVZ74IVcGFmObmv4Gtyk1T4AyfdKDQkbfUuK7NW3 wLQJNaMuTUa+00GzVD1gIQ==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=LekKit-T14) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xSwOe-0030mr-34; Mon, 16 Nov 2026 14:09:35 +0100 From: Eva Kurchatova To: khorenko@virtuozzo.com Date: Mon, 16 Nov 2026 15:07:33 +0200 Message-ID: <20261116130936.612078-3-eva.kurchatova@virtuozzo.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261116130936.612078-1-eva.kurchatova@virtuozzo.com> References: <20261116130936.612078-1-eva.kurchatova@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 2/2] ms/selftests/xsk: fix number of Tx frags in invalid packet 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 From: Larysa Zaremba The issue occurs in TOO_MANY_FRAGS test case when xdp_zc_max_segs is set to an odd number. TOO_MANY_FRAGS test case contains an invalid packet consisting of (xdp_zc_max_segs) frags. Every frag, even the last one has XDP_PKT_CONTD flag set. This packet is expected to be dropped. After that, there is a valid linear packet, which is expected to be received back. Once (xdp_zc_max_segs) is an odd number, the last packet cannot be received, if packet forwarding between Rx and Tx interfaces relies on the ethernet header, e.g. checks for ETH_P_LOOPBACK. Packet is malformed, if all traffic is looped. Turns out, sending function processes multiple invalid frags as if they were in 2-frag packets. So once the invalid mbuf packet contains an odd number of those, the valid packet after gets paired with the previous invalid descriptor, and hence does not get an ethernet header generated, so it is either dropped or malformed. Make invalid packets in verbatim mode always have only a single frag. For such packets, number of frags is otherwise meaningless, as descriptor flags are pre-configured in verbatim mode and packet data is not generated for invalid descriptors. Fixes: 697604492b64 ("selftests/xsk: add invalid descriptor test for multi-buffer") Reviewed-by: Aleksandr Loktionov Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20260203155103.2305816-3-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov (cherry picked from commit 88af9fefed412e4bea9a1a771cbe6fe347fa3507) Rebase note: applied to xskxceiver.c. Mainline moved this code to test_xsk.c in commit 3ab77f35a75e ("selftests/bpf: test_xsk: Split xskxceiver") and then to prog_tests/ in commit d1aec26fce25 ("selftests/bpf: test_xsk: Integrate test_xsk.c to test_progs framework"). Neither is here. The code is the same. https://virtuozzo.atlassian.net/browse/VSTOR-154852 Feature: fix selftests Signed-off-by: Eva Kurchatova --- tools/testing/selftests/bpf/xskxceiver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c index 014b20ef4aaf..5707c8d520ef 100644 --- a/tools/testing/selftests/bpf/xskxceiver.c +++ b/tools/testing/selftests/bpf/xskxceiver.c @@ -724,7 +724,7 @@ static u32 pkt_nb_frags(u32 frame_size, struct pkt_stream *pkt_stream, struct pk } /* Search for the end of the packet in verbatim mode */ - if (!pkt_continues(pkt->options)) + if (!pkt_continues(pkt->options) || !pkt->valid) return nb_frags; next_frag = pkt_stream->current_pkt_nb; -- 2.56.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel