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 9C3EB45CC3; Thu, 14 Nov 2024 20:26:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02D9E42F02; Thu, 14 Nov 2024 20:26:23 +0100 (CET) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 2B90142EDA for ; Thu, 14 Nov 2024 20:26:18 +0100 (CET) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-7e6cbf6cd1dso706182a12.3 for ; Thu, 14 Nov 2024 11:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731612377; x=1732217177; 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=XRS5YaleLN/gTZxQ3GlJPyv+0OOHjr+Nl9Lsu/WXVNU=; b=TXHKvuupID/p/LN0xK8akAiicn2+UmIdLX1zvaDrRM6GzKRh66YRxjA3kmWw+c3GQx x5SJl1eVDsrbLKnaPZ0AliAk/rkeYmYHHgpl/F2R8UnJcuq5taEee15Ke4IiHsVnU4w5 Ux6aj4lMPXT/ybeeKlGt6zadNvpmy4jzQQeI8bBKZDeSQaD0E4b017QhLqiR3pESoxT/ BIWdYRDWn3HPcBy4+1PjiLyj1lMLKhY/UPKfHV7Pt1IHT81j8w6SHgUWfFv0RDWpuzqM lPQ5WmbiXxKuOcH6Dy2cAapUIIO0Su7iG0X0OBv4Pz0mrNB4Ix5V33kYL9oHtyB1K072 b23A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731612377; x=1732217177; 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=XRS5YaleLN/gTZxQ3GlJPyv+0OOHjr+Nl9Lsu/WXVNU=; b=J1nA26D432dROv1CrOgMpexZsd/+BGhPa3BvUWeOrPgOeeZtSdDfAGasmTIAJ/Gofb QFTeh5mQ6dU6m1egZJR5tzFxHgCcF+syfTVA4ByZvpnhgPBKfwqAaixP5Imz9UmZpjn/ 66cgcOOt6dUCC0sgxEMywBJbkLr2NKbXlVcoe5Spj5FRzAYqNFUNtqg/B56Bl7FPZGw6 0WNqdWebaXilBAi8NlMNLiflHPHA1aLuarR0WvGNK26Jrs8Mry8GSsMrUk01hQnHaKry mohsqdi+2BPj6kvVfmifxAm4GEOWZOPxCeKSjwj4whadXk3ggc3qsUB1oZyWmW/MX+o2 WU8g== X-Gm-Message-State: AOJu0Yw3KTbYMd/gACc+yLFfENbFAbrGwYI3vabDtTfr0wksI81UUJi8 ADMwJ5ejZeZ8V5K/MsCwjGVC917Tbgb0G2KO1kczHzhzfCxNFc3OwePiYkZTV5swhofe4TXvD4I LVgQ= X-Google-Smtp-Source: AGHT+IEsMHZeNnCmR6gdTPDWJyrQk2RAm/QcwM97LF+cQIDcyJkRdfzHetJy/Dr334xx4rjO2FadqA== X-Received: by 2002:a05:6a20:12cd:b0:1db:d869:9204 with SMTP id adf61e73a8af0-1dc5f8ed379mr16025004637.11.1731612377352; Thu, 14 Nov 2024 11:26:17 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7f8b37f3466sm1461632a12.35.2024.11.14.11.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 11:26:16 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , ndabilpuram@marvell.com, stable@dpdk.org, Akhil Goyal , Anoob Joseph Subject: [PATCH v2 03/10] app/test: fix paren typo Date: Thu, 14 Nov 2024 11:25:01 -0800 Message-ID: <20241114192603.41145-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114192603.41145-1-stephen@networkplumber.org> References: <20241114001403.147609-1-stephen@networkplumber.org> <20241114192603.41145-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 --- 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