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 235B5A0584; Wed, 19 Oct 2022 13:27:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97E0A42B77; Wed, 19 Oct 2022 13:27:37 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 36785410D1; Wed, 19 Oct 2022 13:27:36 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 115) id A3AF662; Wed, 19 Oct 2022 14:27:35 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mail1.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from bree.oktetlabs.ru (bree.oktetlabs.ru [192.168.34.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPS id 03B1166; Wed, 19 Oct 2022 14:27:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 03B1166 Authentication-Results: shelob.oktetlabs.ru/03B1166; dkim=none; dkim-atps=neutral Date: Wed, 19 Oct 2022 14:27:34 +0300 (MSK) From: Ivan Malov To: Andrew Rybchenko cc: Chas Williams , "Min Hu (Connor)" , Chas Williams <3chas3@gmail.com>, stable@dpdk.org, Declan Doherty , Matan Azrad , dev@dpdk.org Subject: Re: [PATCH] net/bonding: fix flow flush order on bonded device close In-Reply-To: <6bf67a5b-6171-07cd-bd1a-6d6feb642487@oktetlabs.ru> Message-ID: References: <20220911122221.3993511-1-ivan.malov@oktetlabs.ru> <28f8636e-bef9-c569-9cbc-2445630e4fae@oktetlabs.ru> <965bc75e-5012-8c9e-06af-06c5f3aaf71b@gmail.com> <6bf67a5b-6171-07cd-bd1a-6d6feb642487@oktetlabs.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463810782-143899467-1666178855=:1074115" 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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463810782-143899467-1666178855=:1074115 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT Hi Chas, Andrew, On Wed, 19 Oct 2022, Andrew Rybchenko wrote: > On 10/17/22 15:34, Chas Williams wrote: >> This appears to be correct, but it needs to be coordinated with the >> proposed changes in net/bonding: make bonded device configure method >> re-entrant Needs to be coordinated - in which way? Are you looking to reorder the patches? If yes, v2 should be OK with this regard. > > Ivan, could you comment and send rebased v2 version anyway. Please see https://patches.dpdk.org/project/dpdk/patch/20221019111805.1070381-1-ivan.malov@oktetlabs.ru/ . > >> >> >> On 10/17/22 04:41, Andrew Rybchenko wrote: >>> 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); >>> > > ---1463810782-143899467-1666178855=:1074115--