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 AE8CCA0560; Mon, 17 Oct 2022 14:34:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 955994021D; Mon, 17 Oct 2022 14:34:06 +0200 (CEST) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by mails.dpdk.org (Postfix) with ESMTP id 9A62D40143; Mon, 17 Oct 2022 14:34:04 +0200 (CEST) Received: by mail-qt1-f173.google.com with SMTP id c23so7542558qtw.8; Mon, 17 Oct 2022 05:34:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=GED+v00UScEVvkSdp9pZoTPWcyQrrz2+m36JnWLoQ64=; b=JfR6+6rChjsw9nBQqfHgLLEzeKFpvVx1gAQ9WUp1DbxQiyXyO1Yn+MuP+A4+qA1RAw r9z24Vp532sCkc8kpwuhVZtO0fzg5e4qsIzqDMale6+8AxAplO9zc1YXew8sfqIXrfcj n1GRi73L8MHWmB4r6tW9MdTWRJalUu1u49xPlFWpmCVi6uXNQ1UHM5Vlmuxj1mWGwBZr rwU32YfzgcNcqdYb4/Bti/IuFaJ7Ib5jI/Z44UnE+5nOAnlceMBmPoC9k1wiSLmy+d7R Day8yty3zfdd9u7JIHKNknPC28mGtgxWYmt8zMz43l60Fp+purPqz3QE5iY08+7LtxkC xUzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GED+v00UScEVvkSdp9pZoTPWcyQrrz2+m36JnWLoQ64=; b=HWUVD3klBgk07XmieqBld95GFEfZbUfUscN/fhaFpXx2u5rB9vM3f9emqx+9bQuWaM VY/35r4dGQ1ZBkHvjOBzH8WcTzbySCOsSd3l5pUI5S6SmFd8E49Hiq5AHi8dtjeI4ss3 eJ61Q4/kpgntruHTTRYiG/iMidgrmDS+FLNNaAQcuDw/KwkmPw9QRCJ40KQ9q5LJzVnK X56TNS51omg+UIUnKr8He+3i9ZKZd19QFHA526NYS+3+CkS/fmtaio4DkN7VaihItFEn ZQWbupa1kLHtpimiiBHCp6/GfmFDy09jrCWzbJ8DzIUkay6feNNUvV3DfSvcNxFCCCdH E13g== X-Gm-Message-State: ACrzQf2hHhaBWtdRYLvWeDS1FHzdsze0Mg+B4/PUnkUOAKFwoFummrF1 d6Z8fXMYU6+KHCqYNgwy+WY= X-Google-Smtp-Source: AMsMyM7jhpKrrpQsds0kgv5Ls55hoELivi6p1tcWL7KG5LLk6DNGC++/FKn9acQdsRBEjl6IjhSaug== X-Received: by 2002:a05:622a:2d0:b0:395:e96a:8eeb with SMTP id a16-20020a05622a02d000b00395e96a8eebmr8655566qtx.176.1666010044006; Mon, 17 Oct 2022 05:34:04 -0700 (PDT) Received: from ?IPV6:2600:4040:225b:ea00:6063:8c9b:774a:6cf4? ([2600:4040:225b:ea00:6063:8c9b:774a:6cf4]) by smtp.googlemail.com with ESMTPSA id dm54-20020a05620a1d7600b006b5c061844fsm9169735qkb.49.2022.10.17.05.34.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Oct 2022 05:34:03 -0700 (PDT) Message-ID: <965bc75e-5012-8c9e-06af-06c5f3aaf71b@gmail.com> Date: Mon, 17 Oct 2022 08:34:02 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] net/bonding: fix flow flush order on bonded device close Content-Language: en-US To: Andrew Rybchenko , 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> <28f8636e-bef9-c569-9cbc-2445630e4fae@oktetlabs.ru> From: Chas Williams <3chas3@gmail.com> In-Reply-To: <28f8636e-bef9-c569-9cbc-2445630e4fae@oktetlabs.ru> Content-Type: text/plain; charset=UTF-8; format=flowed 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 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 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); >