Acked-by: Chengwen Feng <fengcheng...@huawei.com> On 2024/11/22 2:23, Stephen Hemminger wrote: > 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.dohe...@intel.com > Cc: sta...@dpdk.org > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> > Acked-by: Bruce Richardson <bruce.richard...@intel.com> > --- > 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);
- [PATCH v3 07/10] test/eal: fix core check in c f... Stephen Hemminger
- [PATCH v3 08/10] app/test-pmd: remove redundant ... Stephen Hemminger
- Re: [PATCH v3 08/10] app/test-pmd: remove re... Ajit Khaparde
- [PATCH v3 10/10] app/test-dma-perf: fix parsing ... Stephen Hemminger
- Re: [PATCH v3 10/10] app/test-dma-perf: fix ... fengchengwen
- [PATCH v3 04/10] app/test: avoid duplicate initi... Stephen Hemminger
- RE: [PATCH v3 04/10] app/test: avoid duplica... Gujjar, Abhinandan S
- [PATCH v3 09/10] app/test-pmd: avoid potential o... Stephen Hemminger
- [PATCH v4 0/9] Bug fixes for standalone tests Stephen Hemminger
- [PATCH v4 1/9] app/test: do not duplicate loop v... Stephen Hemminger
- Re: [PATCH v4 1/9] app/test: do not duplicat... fengchengwen
- [PATCH v4 4/9] app/test: avoid duplicate initial... Stephen Hemminger
- [PATCH v4 5/9] app/test: fix TLS zero length rec... Stephen Hemminger
- RE: [EXTERNAL] [PATCH v4 5/9] app/test: fix ... Anoob Joseph
- [PATCH v4 2/9] app/test: fix typo in address com... Stephen Hemminger
- Re: [PATCH v4 2/9] app/test: fix typo in add... fengchengwen
- Re: [PATCH v4 2/9] app/test: fix typo in add... Bruce Richardson
- [PATCH v4 6/9] app/test: fix operator precedence... Stephen Hemminger
- [PATCH v4 9/9] app/test-pmd: avoid potential out... Stephen Hemminger
- Re: [PATCH v4 9/9] app/test-pmd: avoid poten... fengchengwen
- [PATCH v4 8/9] app/test-pmd: remove redundant co... Stephen Hemminger