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 C2A6CA0547; Thu, 24 Jun 2021 13:57:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E44F40040; Thu, 24 Jun 2021 13:57:21 +0200 (CEST) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.176.14]) by mails.dpdk.org (Postfix) with ESMTP id 4E3954003C for ; Thu, 24 Jun 2021 13:57:20 +0200 (CEST) Received: from roundcube.fit.vutbr.cz (spytihnev.fit.vutbr.cz [IPv6:2001:67c:1220:809:0:0:93e5:9e2]) (authenticated bits=0) by eva.fit.vutbr.cz (8.16.1/8.16.1) with ESMTPSA id 15OBv985025566 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 24 Jun 2021 13:57:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stud.fit.vutbr.cz; s=studfit; t=1624535829; bh=l1Qw38Xb19DDeylZm4RcbRSCuEiB9O83iTmZ56kXxNo=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=qFWbPHqWrf1oJBvcog7TTPP6QTVJSeSP2RbsxXzzoSwLnRX2Cgm89a4l6xy5Ikl8s sUp5x+1XZ45fX0s2jW2n42dGEtpc2Ae03N+szMiSNBM3L+rLqqTmG4Bii8Cq6CuuAX slhhXH6EGNfRliYggTdBpQhH5ElvgIGB2MvmDS74= MIME-Version: 1.0 Date: Thu, 24 Jun 2021 13:57:09 +0200 From: =?UTF-8?Q?Havl=C3=ADk_Martin?= To: "Min Hu (Connor)" , chas3@att.com Cc: dev@dpdk.org, viktorin@cesnet.cz, matan@nvidia.com, shahafs@nvidia.com, viacheslavo@nvidia.com In-Reply-To: <5f2cd5e6-1c46-227c-7ab1-5a2a34eb337d@huawei.com> References: <20210622092531.73112-1-xhavli56@stud.fit.vutbr.cz> <20210622092531.73112-4-xhavli56@stud.fit.vutbr.cz> <5f2cd5e6-1c46-227c-7ab1-5a2a34eb337d@huawei.com> User-Agent: Roundcube Webmail Message-ID: <01bd8d8fcd364584fecdea3bc70abd1c@stud.fit.vutbr.cz> X-Sender: xhavli56@stud.fit.vutbr.cz Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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" Dne 2021-06-23 09:04, Min Hu (Connor) napsal: > 在 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. > After looking into it, I really can't answer this mlx5 centered question. Closest related info we found so far is the 5th point in https://doc.dpdk.org/guides/prog_guide/rte_flow.html#caveats but it only specifies it's the application's responsibility and that flow rules are assumed invalid after port stop/close/restart but doesn't say anything about vs where the former is the point of failure on mlx5. I'm addressing the maintainers for mlx5, who might know a bit more on the topic. >> 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; >>