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 2801E45D6B for ; 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 17A6142FB7; Thu, 21 Nov 2024 19:25:01 +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 9F14142F8F for ; Thu, 21 Nov 2024 19:24:55 +0100 (CET) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-7f3e30a43f1so940487a12.1 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=rSekxnIMFc0uT69O09Cf4wknFFxUSDboXQMerNaMqQ1iiILNzSBLvlzH07LAl10ABG GtQ9OUenaH8H7hZ4atOfiN5fmS/vFEkuZNlsqThjVpkId5eVbQ4Nya65kRbskpuzaPuS iZJRhVvWRwpmB9UeQVzIO5J+WID+ZF1QYvY45koM+sUO1TqFd8qC7p5uvsigeoJlz6Cw lQ/TJR+e+JyXN2y2FNfCFYkgP/af5ly+0lP5/SBefl4L3iqgQWOJNW0zFNRrC7F9/4bS c8yrG4LupMzaLNXYvAlR42mAUGF5UfHEpG/1oITmPjBPz3v9F3pOqU45pu021blHhjJJ 3Alg== X-Forwarded-Encrypted: i=1; AJvYcCXQGOJq4Ia7Ss3pJk69RnKT4YUOmR/WwgXSi1YK9S1GzGXc8cn5uI1LsS/HhbVveg178ISFJiw=@dpdk.org X-Gm-Message-State: AOJu0YyjWYs84GTYeqcMs1lp4sF4MZPih6G4d7DJcOU6yxUfv9pgc131 kJzSgzUAwFLlLw/dnGqJSUEFpte2osqR0V+vY5qkBufUUS/HpuhopdhQ4ZDwrmc= X-Gm-Gg: ASbGncvuDWtw8yV3yqU5J2cpaXsv/t8cXYlYaimAEPTPb1h6rpppGvW2uc5ncAI3Gn8 +sukJispSTLGI9PcMYG38DqcCcJocXoaXTJEc0TJXLSVlU9fhNCksLtLSSxNmxt/jFkVkADu2Ej Iv5J7hOfiz05GK1blOY0aVs+HLzXSQnAsfHLM3VgSTEnzoclGosuDJExbDkuT5Hm5lkiCieJOZi kSbd6mky1t04j4+nHDXz3maD8tOVW22fr5yLPGHW16QKVwSwzujqnA0fwsInfcO3oDc9Fhi2jH9 ToN3UeV63GLfYJB2IJBeAP9Fq70= 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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