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 A80EF45D6B; Thu, 21 Nov 2024 19:25:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE64A42FA1; Thu, 21 Nov 2024 19:24:59 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id 8902E40A81 for ; Thu, 21 Nov 2024 19:24:55 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-7f450f7f11dso1010159a12.2 for ; Thu, 21 Nov 2024 10:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1732213494; x=1732818294; 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=fnZZbrHhooPBtodMvzo7g8k980Y++f3GyuEx+WfkGkI=; b=D28JQocIR9wA5PbWfO/bp/sgrMFqfcuLgkMn1gU1Jd9z7JGmcwrom2e2862RCTojw9 tlURtt2jBMCA+SGXny299XKA/IdVGkm7F5hv24CNZ7pRon18l7RlP/XPMQiPVO6PsX6r EyQNXvKncWTI+910mJMlePubTc1vLKHNT7XzOOI0LIegxQZ94h8pIXqC3iGVeisZ3K5G ymtl5CpRA52qPGZG04qxLHoed32vc3XsdQmfs4yDcvpZE2xnYTg2pJ+I1xds/eZWY13D t7bmu09wrpDTMM6mskPfTY9u6Z3q2O9zAwIq+KMxzISXWJR2smnEG9PReKig7nw2L/2y o2DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732213494; x=1732818294; 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=fnZZbrHhooPBtodMvzo7g8k980Y++f3GyuEx+WfkGkI=; b=AsNQqBz3kuLT5ro81M1zG/9RUqezWW6+LyKMIWYI7rEk9r1CucRpdB1DslDi6FTyDv 90xDRnoRz4YwVHlu/+RaJ+SZ8VKXgipqFPHkty7VVZpNujkPVTuAHhooQxFCMcL91mub uDN1NqJNQByF++wWGvWr+j/9SKLVP4u8ch395XcDdoBpT4ymOtZvniWedvmnE3/wHnBe IB1UYDs5SUp4C/chkTFxnNFdvfqmjYg27vqtCHszOW9gWJFium+NHL5TOVk/d7S+26K4 k95BYTCq2kih80OpAwzYX6yeDpRucmJM1tCTjyTALgKS+cpcyzPFPGkttC5rKWSkOvSz AJnw== X-Gm-Message-State: AOJu0Ywb6wBgOFSqqYncVDo/i0yzQbhM/kDvJaFIz+gaRLaJgThdDFPR 8tIEq+XGMKcf5nqWUB2DXAVzfG9J3oZLI+JDE/lQC+R8iCAUI84EIwd7AjGVxeh7jHKn8ghb78v Xg5M= X-Gm-Gg: ASbGncutBOA9qUgHFrwG56rNGSYvSD05nq+hSko/cuqKzMnPLjz19b6bocSynck4Zut sbO8VVv8sYig5awnCy/6T4/SHPJJ73QOXvrqhO4boTKj/UrmcrMa7si1nyIOzpk1A0G0Vrff15V 4AHpF6UHUu+QkEnpK6Mhh3CQAzEUOGzaEBdFuMlkpZgPVEO7dMFMuHaNfoEDGGNDnkHF6GERjTS 0HHMzt81k7Wcmt+8Hb7zQbnQ/0tD63I3R2I0PRuyPzVw7s3QciyexUAl17H8YCs1pzWFscCcBP7 Oc0KOOUg42/bXSL6PFeSWa0trck= X-Google-Smtp-Source: AGHT+IHuRcIVAITA1KX96+Tx9IfWBWEfN+yikM44Rapp1EUYieHZYbFlHLl8eN99J3HECICDxcVO4g== X-Received: by 2002:a05:6a21:9982:b0:1db:e917:5755 with SMTP id adf61e73a8af0-1ddafd590f5mr10294548637.30.1732213494596; Thu, 21 Nov 2024 10:24:54 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2024 10:24:54 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , declan.doherty@intel.com, stable@dpdk.org, Bruce Richardson , Chas Williams , "Min Hu (Connor)" , Pablo de Lara Subject: [PATCH v4 1/9] app/test: do not duplicate loop variable Date: Thu, 21 Nov 2024 10:23:22 -0800 Message-ID: <20241121182443.68025-2-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 Do not use same variable for outer and inner loop in bonding test. Since the loop is just freeing the resulting burst use bulk free. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 92073ef961ee ("bond: unit tests") Cc: declan.doherty@intel.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- app/test/test_link_bonding.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index 4d54706c21..805613d7dd 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -2288,12 +2288,7 @@ test_activebackup_rx_burst(void) } /* free mbufs */ - for (i = 0; i < MAX_PKT_BURST; i++) { - if (rx_pkt_burst[i] != NULL) { - rte_pktmbuf_free(rx_pkt_burst[i]); - rx_pkt_burst[i] = NULL; - } - } + rte_pktmbuf_free_bulk(rx_pkt_burst, burst_size); /* reset bonding device stats */ rte_eth_stats_reset(test_params->bonding_port_id); -- 2.45.2