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 8C22345D16; Fri, 15 Nov 2024 21:08:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89AF24329C; Fri, 15 Nov 2024 21:08:08 +0100 (CET) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id AD3D343274 for ; Fri, 15 Nov 2024 21:08:04 +0100 (CET) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-71e4e481692so32393b3a.1 for ; Fri, 15 Nov 2024 12:08:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731701284; x=1732306084; 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=L1frFWzjiQDriscW3uvjcKcSvYMuWZulCm7+O+IY1j6PSUtZyx5J3bqj12J9oJgrzY KVxp8m/zTyZQ4Gq0yEkqVr15XeVE9n8/7mD2L2lDjzaTo0TebJWUG1aznWP5Jvnm6aSn nMFK3nazu7ajFmgO+v8vCHFt3ZQJV51nJGIqTN+I/ZzAkddtOHIII7mtvW3BaT2h9oO/ RlCUZQqzaDUgbzwwpCajorPGrtvUUkWJP06Kf0lSrhGmHBsYCxl1gZQT4Cu2sDWWIcYu +E07qN9RnBO78DM0w2nT3Ddnv6fXZNRIo9z12o7fzm+5sdqP3KSKm+ytU8HsIWgeUGB4 kqTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731701284; x=1732306084; 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=jL55GhYcw7nuMxgeeKkF0VAaq53w6/UUERBpjE3WIlu0MdVDRnFOGQEG4FEn6QHzRN B1ICA8TBDJREhxmKEXr9j+a7nP+TTe+pSVWyOpZejEyHFsftXS2lXnqIRZhTs1iDBGkx c1G/OfiBNo+BJ9GiWcIjYkUvlPO4dGZH6kKfA6cpYKRcB7Qsg1iYNEHuY3SLla1NeDCz UhbZV8kaN35VRTuU/KP5t8itI9sVIms1lzD7f3xxw4fAApuAnJcOchPZpDSNPhKhwoRD vFoGBxgzhaGIrhv5cXRbK9c37j7uUrGMpWZV9e7HRIF2IfbHSqHKyWeOhZCU9yK+M7IG gZsw== X-Gm-Message-State: AOJu0YxiQMJQ+fonH8qsa25VbhMPXniLTlq2NW0OBfoQSg/H6GiTkKef u0t2FxPOBwAVhJ+1UcKQ8Pfs5VvJqrFwXV2Fm8HxnTHA5MF6ii8/KEF/hdYpONkOEuzZPCWvn47 R X-Google-Smtp-Source: AGHT+IF184KTqc+YVBNU+2ZIc5GTEy+FytilGTLYsWdrBMaO8omQaZdASyeGGggaoO7QFU40dUcISw== X-Received: by 2002:a05:6a00:1889:b0:71e:f83:5c00 with SMTP id d2e1a72fcca58-72476b7286emr5902568b3a.2.1731701283865; Fri, 15 Nov 2024 12:08:03 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724771e11f0sm1759686b3a.131.2024.11.15.12.08.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2024 12:08:03 -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 v3 03/10] app/test: fix paren typo Date: Fri, 15 Nov 2024 12:06:47 -0800 Message-ID: <20241115200751.17141-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241115200751.17141-1-stephen@networkplumber.org> References: <20241114001403.147609-1-stephen@networkplumber.org> <20241115200751.17141-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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