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 61A1DA0556; Mon, 17 Oct 2022 10:41:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 568074021D; Mon, 17 Oct 2022 10:41:33 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 30EFC40143; Mon, 17 Oct 2022 10:41:31 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 9877987; Mon, 17 Oct 2022 11:41:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 9877987 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1665996090; bh=SMNLMa4sOzL5inuUYwQ+KNJE264kpVIlMMEIB/s1y7w=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mRC90szkueObkfsLo4dDJFUkZ1H04ZB23L8U7q1+qt6vIFWc5yukh2pO1GYAjn75K aNO9m7WsH7evYwH5eS0BWY2pcRoP2bsvJeeRCVm82TuUOURJ30R55A+3ZXFMi3EtW+ 0pkWyj1+rKdY+uCPCWmYFG5KrdJh4PhvnXaFADK4= Message-ID: <28f8636e-bef9-c569-9cbc-2445630e4fae@oktetlabs.ru> Date: Mon, 17 Oct 2022 11:41:30 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH] net/bonding: fix flow flush order on bonded device close Content-Language: en-US To: Chas Williams , "Min Hu (Connor)" Cc: stable@dpdk.org, Declan Doherty , Matan Azrad , Ivan Malov , dev@dpdk.org References: <20220911122221.3993511-1-ivan.malov@oktetlabs.ru> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20220911122221.3993511-1-ivan.malov@oktetlabs.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Chas, Cornor, could you review the patch, please. Thanks, Andrew. On 9/11/22 15:22, Ivan Malov wrote: > The current code first removes all back-end devices of > the bonded device and then invokes flush operation to > remove flows in such back-end devices, which makes no > sense. Fix that by re-ordering the steps accordingly. > > Fixes: 49dad9028e2a ("net/bonding: support flow API") > Cc: stable@dpdk.org > > Signed-off-by: Ivan Malov > Reviewed-by: Andrew Rybchenko > --- > drivers/net/bonding/rte_eth_bond_pmd.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c > index a5429f5e97..d01c954296 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -2155,6 +2155,10 @@ bond_ethdev_close(struct rte_eth_dev *dev) > return 0; > > RTE_BOND_LOG(INFO, "Closing bonded device %s", dev->device->name); > + > + /* Flush flows in all back-end devices before removing them */ > + bond_flow_ops.flush(dev, &ferror); > + > while (internals->slave_count != skipped) { > uint16_t port_id = internals->slaves[skipped].port_id; > > @@ -2172,7 +2176,6 @@ bond_ethdev_close(struct rte_eth_dev *dev) > skipped++; > } > } > - bond_flow_ops.flush(dev, &ferror); > bond_ethdev_free_queues(dev); > rte_bitmap_reset(internals->vlan_filter_bmp); > rte_bitmap_free(internals->vlan_filter_bmp);