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 F042BA0C41; Wed, 23 Jun 2021 09:05:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D9CD4003F; Wed, 23 Jun 2021 09:05:00 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 1F6714003E for ; Wed, 23 Jun 2021 09:04:59 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G8vMR73BlzZhr9; Wed, 23 Jun 2021 15:01:55 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 23 Jun 2021 15:04:56 +0800 To: Martin Havlik , Chas Williams CC: , Jan Viktorin References: <20210622092531.73112-1-xhavli56@stud.fit.vutbr.cz> <20210622092531.73112-4-xhavli56@stud.fit.vutbr.cz> From: "Min Hu (Connor)" Message-ID: <5f2cd5e6-1c46-227c-7ab1-5a2a34eb337d@huawei.com> Date: Wed, 23 Jun 2021 15:04:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20210622092531.73112-4-xhavli56@stud.fit.vutbr.cz> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH 3/3] net/bonding: start ethdev prior to setting 8023ad flow 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 Sender: "dev" ÔÚ 2021/6/22 17:25, Martin Havlik дµÀ: > When dedicated queues are enabled, mlx5 PMD fails to install RTE Flows > if the underlying ethdev is not started: > bond_ethdev_8023ad_flow_set(267) - bond_ethdev_8023ad_flow_set: port not started (slave_port=0 queue_id=1) > Why mlx5 PMD doing flow create relys on port started ? I noticed other PMDs did not has that reliance. > Signed-off-by: Martin Havlik > Cc: Jan Viktorin > --- > drivers/net/bonding/rte_eth_bond_pmd.c | 26 ++++++++++++++++++-------- > 1 file changed, 18 insertions(+), 8 deletions(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c > index a6755661c..fea3bc537 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -1818,25 +1818,35 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, > rte_flow_destroy(slave_eth_dev->data->port_id, > internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id], > &flow_error); > + } > > + /* Start device */ > + errval = rte_eth_dev_start(slave_eth_dev->data->port_id); > + if (errval != 0) { > + RTE_BOND_LOG(ERR, "rte_eth_dev_start: port=%u, err (%d)", > + slave_eth_dev->data->port_id, errval); > + return -1; > + } > + > + if (internals->mode == BONDING_MODE_8023AD && > + internals->mode4.dedicated_queues.enabled == 1) { > errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev, > slave_eth_dev->data->port_id); > if (errval != 0) { > RTE_BOND_LOG(ERR, > "bond_ethdev_8023ad_flow_set: port=%d, err (%d)", > slave_eth_dev->data->port_id, errval); > + > + errval = rte_eth_dev_stop(slave_eth_dev->data->port_id); > + if (errval < 0) { > + RTE_BOND_LOG(ERR, > + "rte_eth_dev_stop: port=%d, err (%d)", > + slave_eth_dev->data->port_id, errval); > + } > return errval; > } > } > > - /* Start device */ > - errval = rte_eth_dev_start(slave_eth_dev->data->port_id); > - if (errval != 0) { > - RTE_BOND_LOG(ERR, "rte_eth_dev_start: port=%u, err (%d)", > - slave_eth_dev->data->port_id, errval); > - return -1; > - } > - > /* If RSS is enabled for bonding, synchronize RETA */ > if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) { > int i; >