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 CA94045CFB; Thu, 14 Nov 2024 01:14:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF14D42670; Thu, 14 Nov 2024 01:14:20 +0100 (CET) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mails.dpdk.org (Postfix) with ESMTP id 68A7E40E39 for ; Thu, 14 Nov 2024 01:14:18 +0100 (CET) Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-7f3e30a43f1so5094952a12.1 for ; Wed, 13 Nov 2024 16:14:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731543257; x=1732148057; 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=PlUt+YyZxDiTtIjv5oy/zkPJqcMRVuDi+QdD2r5zfCM=; b=wcWzYi1JlfFC8cjG43rSUSw1i+zr4d4IpTV0e6ZYXPmZlV6nM3A8SQ6QGh5k8qj+4Q bFObRwcqPvcT1saJ9wkrUM7VPoT+KhhWD5cIo29mfSF2gfvycMp+rN9aS0J4vkBxf0CG FLLARj0ZybQatBUET+mk4+moF7Z9Jn5J2tIEYU81RTuQcYWklGwR1myI36aVf5TRg/2r wVw9LkZnbgQmzN9vqlXQROLvCcfTxwd209k1YiRa5FGKRWQh8ISS3Ws5r/wUTBapqFCd TXHeqD1mngR3FOKKEAFVNJZT50Lf9I5Dt2dwu0PXhXZQOJY9BAgV5KLaTyZn0/ahV+xI BeTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731543257; x=1732148057; 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=PlUt+YyZxDiTtIjv5oy/zkPJqcMRVuDi+QdD2r5zfCM=; b=izIkcnJb/bFfX9PIJz4++Rev91fzZCeYsJqWocIfbC/lQ1bMnBB4b1Tpyo47uJ4+6D IusubVMUQh+gU9lpTS9TV6M+rzdtqEdZOMs/J7dt0UnvymDxLKb0/yRkVVw4DK8XO0sv zwwfjKTHIC6mbxCe9+/4cyRoe1uG9xWdNEbJjvujfWHenSdbO5ZpbxL+8fgwLbyki5TZ K4GNvXhjmKi1/PyjDX3bFqasFC1aPC6jGdJypsykR5KMY7ieil64BlDb0ZWtdtKiO0Wr d5Ls1nwDCbzWTX4tdjE/NCuITX4NygqDq5+1bAjZTGCbUtWwATAPljCwOBmKtfasf5Im rEmA== X-Gm-Message-State: AOJu0YycsJqVlWurVHoYmM35vQWeYdNDi1sSNlVkMMU8tuifIXaka3b1 TQckRxOgCGkY1pdwiphAIbxyS+pW4K5jpQl8fpWtQl1TdZfT7s43vIiPUzaI4Ym4WmBmWzK2I0p B X-Google-Smtp-Source: AGHT+IEEQ9UD1XAKGTMnl3EW8ojHkrLK+cYY/EEURhzNhouthZ9aN4+X3EOoZICeRxl4WvIFCABOEw== X-Received: by 2002:a05:6a20:4304:b0:1db:eb56:be7c with SMTP id adf61e73a8af0-1dc834ede2dmr470537637.35.1731543257601; Wed, 13 Nov 2024 16:14:17 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7246a9a81a9sm9280b3a.99.2024.11.13.16.14.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 16:14:17 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , ndabilpuram@marvell.com, Akhil Goyal , Anoob Joseph Subject: [RFC 03/10] app/test: fix paren typo Date: Wed, 13 Nov 2024 16:12:15 -0800 Message-ID: <20241114001403.147609-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114001403.147609-1-stephen@networkplumber.org> References: <20241114001403.147609-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 Signed-off-by: Stephen Hemminger --- 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