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 936A645D6B; Thu, 21 Nov 2024 19:25:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB78E42FEB; Thu, 21 Nov 2024 19:25:02 +0100 (CET) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 6A50D42F9F for ; Thu, 21 Nov 2024 19:24:57 +0100 (CET) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-720d5ada03cso1260169b3a.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=oVI0EkSaN2N54/61nJ92PNWnOQLJH3WsOloT5JglvAINIG5mkgutL6+REyNPjcqkoT Na+uJTgrXvq1/o33h95ESFPcV8FdblUvJvFqSpEB0InEgH/a2M4+exu+mXByulUjHVaP Nf0zV6o5gIvk+Q4KdZlZOYkDWNhJ9QmffPJ66n6peuBIR+wwYFQV72SxjIJgwTNcdUXw GGNs6UqVAQO75/l2cbWjRkHQszaqXZK8QMus1TbEfzMIsrhT/l7WgzHButXKRl4tNf5U xLhUefRcOXWFmCbF0K2fN6c1AMnx86ZGerPOGJ1Kt89imjvZg6eHXdOq6gvwvNHdFTWh M+rQ== X-Gm-Message-State: AOJu0Yy/EgZsup5O77sns1prx4aOisIqrddQwgz7oBZWsJN1cHR0MY4Y Cr8zAMzVqvdeM9dC6lybsCWn45ZFKGh0fPetC/Q2ghKQu3naTKtQnm5/k/k2OMzzZrGsWTaEZiD x6pc= X-Gm-Gg: ASbGncsY+gD5yCiA2HCkzIOhIKZn+WwHx/OpyvCJ5Cznp+Jpl0xnlZ6jHYndJ3FJQsj zykC31JxfMFPziyi03uwTObBujCDdWKPeIr4VDOZa2FmzQw2qjaSrsoDx6RH3F4Qeer7cx7rPfj EBCGFqoXtqtyAgJpmU1+4e9HSCP8FfXzmYb3I4+CPpKZ2RfQ/qWz56jwiEjPBv6u6xAn/PqyLYq hq3JzXuDjVwgbNj4tfJQZEVl3sLbs6yN3Ae8Fbn7LHogZk/1gaIeXcXVqgzRAMiX1riagc14EO+ QNaa/ioF2P0dVyDm/HlO4lP6kuo= 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: 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