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 F413F42D01; Tue, 20 Jun 2023 05:02:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D0494068E; Tue, 20 Jun 2023 05:02:11 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 335D8400D6; Tue, 20 Jun 2023 05:02:10 +0200 (CEST) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QlWYZ6kBhzMpdM; Tue, 20 Jun 2023 10:58:58 +0800 (CST) Received: from [10.78.231.32] (10.78.231.32) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 20 Jun 2023 11:02:06 +0800 Message-ID: <78d00943-e942-9498-b1d1-ac92a4695919@huawei.com> Date: Tue, 20 Jun 2023 11:02:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.3 Subject: Re: [PATCH] net/bonding: fix destroy dedicated queues flow To: Chaoyong He , CC: , , Long Wu , , References: <20230608025903.814504-1-chaoyong.he@corigine.com> From: "humin (Q)" In-Reply-To: <20230608025903.814504-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.78.231.32] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected 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 Acked-by: Min Hu (Connor) 在 2023/6/8 10:59, Chaoyong He 写道: > From: Long Wu > > Bonding port in mode 4 enables dedicated queues, we > will create a flow for this feature. So we need to > destroy this flow when we remove the member port. > > Furthermore if we don't destroy the flow that created > for dedicated queues when we remove the member port, > maybe we couldn't add the member port to a new bonding > port that needed dedicated queues. > > We add the destroy action in removing member port > function. > > Fixes: 49dad9028e2a ("net/bonding: support flow API") > Cc: matan@mellanox.com > Cc: stable@dpdk.org > > Signed-off-by: Long Wu > Reviewed-by: Niklas Söderlund > Reviewed-by: Chaoyong He > --- > drivers/net/bonding/rte_eth_bond_api.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c > index c0178369b4..85d0528b7c 100644 > --- a/drivers/net/bonding/rte_eth_bond_api.c > +++ b/drivers/net/bonding/rte_eth_bond_api.c > @@ -712,6 +712,16 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id, > } > } > > + /* Remove the dedicated queues flow */ > + if (internals->mode == BONDING_MODE_8023AD && > + internals->mode4.dedicated_queues.enabled == 1 && > + internals->mode4.dedicated_queues.flow[slave_port_id] != NULL) { > + rte_flow_destroy(slave_port_id, > + internals->mode4.dedicated_queues.flow[slave_port_id], > + &flow_error); > + internals->mode4.dedicated_queues.flow[slave_port_id] = NULL; > + } > + > slave_eth_dev = &rte_eth_devices[slave_port_id]; > slave_remove(internals, slave_eth_dev); > slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDED_SLAVE);