From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5453345D6B for ; Thu, 21 Nov 2024 19:25:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D38642FF3; Thu, 21 Nov 2024 19:25:02 +0100 (CET) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mails.dpdk.org (Postfix) with ESMTP id 7099242FA1 for ; Thu, 21 Nov 2024 19:24:57 +0100 (CET) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-7ea76a12c32so947325a12.1 for ; Thu, 21 Nov 2024 10:24:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1732213496; x=1732818296; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lT/wNc2P8ykE5aaBawpuCCaCpIyLE/qYqFBGCMnYFm4=; b=OML/0PBGjrBNfo6lB5djP3sHQfVecgNF0qpYxfEIkm2laH9UgsGI8/VmVydA4A9gd1 BDXB92DGyKJVTt/52aY5Rj/hdp3peb4/HWZZmJezH/Xi2k8eAqFqCjqz3QU0pk52JZAq ysQaog9UWz2TtFFH/9sQQQLW1HTCbrtZRlyjNDHKFpwe7nEwi0NN0A4q+nZ/ZmxZCtjA tieNUacfyatArn3ifkpxx8v+cjv805kmcq27wmThhHjtdVlWYp+i/z28p39nIstxL0nG Gs5GpnBtujbTyKanA/a6yh48fdBJbrHS9a8g3Rh2OQ6gVV/ypbet5RmoV4XiQOkvnzgM 9B3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732213496; x=1732818296; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lT/wNc2P8ykE5aaBawpuCCaCpIyLE/qYqFBGCMnYFm4=; b=k47x5gb4jFKhgJmHUUIgBbXh+xaCzA21xmzIaF61soz+S1XWbanf9qqZKwUoacN4YB Ll2LeqOd0GrxZy5b7s92RdIqxoc88uIw0MyU81agyrjQMWHcxCyIQNsTtvVTKTKnDx1B OXDCUy5sEmYpGGMlgI9o0FiICYleTCoB8em/E7ruxQDG0vDnBMEfb6QaXeG5o5FLd+H6 5GgSaOF5iQiSf5/17k7MzxGlvPFpT7HqqrVUle92qp3YpBHrDFXey0EX3TLQVmEBZu0P oadEcftPD4B8TIu6gc1lXzDDNfExFRU1mEKlHoPFb4WibkyfSFk/hTWYtvmVTcnQggqg rQbw== X-Forwarded-Encrypted: i=1; AJvYcCU81fX0qXEl1r31WNF7K0cAbEC/2Fcc61Voj4WnTuhuFAD4rYYVWUkD4u1ZTR91Ljnauz8eik8=@dpdk.org X-Gm-Message-State: AOJu0YxfXtijhvxPokMfqKzW8JE4Pqu5oQoQF0lx/Bv2oQS79LmgBrva Yfen3hxf+NoimX5PbWG+mH5cdK2BfJpa8L5Bx8IWKXQS7fs38SxekymOhAYpqfI= X-Gm-Gg: ASbGnctOUM9gtvq9DxaaPxG4I6OXLlHlPF/0rkZYADad6EsRtLdO6Uy9Bt7eb4Sr1Wj edQ6g5YtwU3rPvKGTECPMZE3gmdnveGQGG8k/o2ZsimMNHggoTD5sBmEubqjSE+Rmds749fLrj3 zwIC2thpRESyWvT+/lIXw0s4hx6z6rFvym5g2VHMOpQm0+UP2oSIZZFbVRjEoY80jvstMvTJlgG tF5MfvpIdsmo7C/PPJZkcghZ+sC4zqx/KDGYUtycjZeQoj7i9SkxE4Ct63r5A87ZomPTyadaLtu BjxfevZA/Vv1hH/vP/387jCi2Jg= X-Google-Smtp-Source: AGHT+IGfQRVNqEWwXB92ho38s6v5+0w2GkUDCizhfhKO7bZfigCkvHvtE9RIfzQ/7Z5lS/lu3tUYaA== X-Received: by 2002:a05:6a21:38f:b0:1dc:2a02:913b with SMTP id adf61e73a8af0-1ddae5e0afemr10950393637.15.1732213496511; Thu, 21 Nov 2024 10:24:56 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724de454aa1sm70201b3a.4.2024.11.21.10.24.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2024 10:24:56 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , ndabilpuram@marvell.com, stable@dpdk.org, Bruce Richardson , Akhil Goyal , Anoob Joseph Subject: [PATCH v4 3/9] app/test: fix paren typo Date: Thu, 21 Nov 2024 10:23:24 -0800 Message-ID: <20241121182443.68025-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241121182443.68025-1-stephen@networkplumber.org> References: <20241114001403.147609-1-stephen@networkplumber.org> <20241121182443.68025-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org The parenthesis were in the wrong place so that comparison took precedence over assignment in handling IPv6 extension headers. Break up the loop condition to avoid the problem. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 15ccc647526e ("test/security: test inline reassembly with multi-segment") Cc: ndabilpuram@marvell.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- app/test/test_security_inline_proto_vectors.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/test/test_security_inline_proto_vectors.h b/app/test/test_security_inline_proto_vectors.h index b3d724bac6..86dfa54777 100644 --- a/app/test/test_security_inline_proto_vectors.h +++ b/app/test/test_security_inline_proto_vectors.h @@ -519,10 +519,12 @@ test_vector_payload_populate(struct ip_reassembly_test_packet *pkt, if (extra_data_sum) { proto = hdr->proto; p += sizeof(struct rte_ipv6_hdr); - while (proto != IPPROTO_FRAGMENT && - (proto = rte_ipv6_get_next_ext(p, proto, &ext_len) >= 0)) + while (proto != IPPROTO_FRAGMENT) { + proto = rte_ipv6_get_next_ext(p, proto, &ext_len); + if (proto < 0) + break; p += ext_len; - + } /* Found fragment header, update the frag offset */ if (proto == IPPROTO_FRAGMENT) { frag_ext = (struct rte_ipv6_fragment_ext *)p; -- 2.45.2