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 98325A00C5; Sun, 25 Sep 2022 12:42:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 44CF6400D4; Sun, 25 Sep 2022 12:42:26 +0200 (CEST) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by mails.dpdk.org (Postfix) with ESMTP id 8918B4003F for ; Sun, 25 Sep 2022 12:42:25 +0200 (CEST) Received: by mail-qt1-f180.google.com with SMTP id g12so2612295qts.1 for ; Sun, 25 Sep 2022 03:42:25 -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; bh=Z6PMkew6Cf1PZXd0Ik1yMVfVjVl+AME+nRY2/7efzk4=; b=DjCJTeZTcE9HZyexAzWan3vXrEagSm20cJ0I+9JyJ04nRWdK5UMwWD4nHY6EP26o5J Ef3w1PoJelk6GywXlipejm2EcJ28uz+852v8vx+eJ0LhHM2yu9NLJ1kBzTPDdupVdr++ 4lYHRQ2djd4PO603cTnDt1plF+fH8qO2HDUJ5BInDZXhTnCCxudyes9FA3/zlS4U6OM0 xGC1+sRnjaBZJ1veEPpuAMpn0FN36XUgHxGVa/dxyaz+xueX/AIvxYGWx4d2Rgmj38Re PtMe3gcxBnuBSMkxGdbMHEgOmkStg5/WWQJOD6Wf3vV6uea2oaWQ4HlcdPAB97NQ6yoq +osQ== 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; bh=Z6PMkew6Cf1PZXd0Ik1yMVfVjVl+AME+nRY2/7efzk4=; b=GlvaJp+mCSlV08tbUihRBN07P3W8FXj58RxUzn1zNB9ifVlJAAiyOp3U9XBYduslvX /Zm+pcWvrUkfUkjWEeOQ8taoJGO8eube8+MgUVIdDy9ePsMfx+q1OadwSGl3Av4UoAGT F3u+EMkFNIIRv8n0wtmOpFmYo17kUB0GVf6kAtZw2emkcuWzb7IF+Bl1kVjjwznpot+x Hb1ifJadZ9tOAlbr8Sh+aChNbuxxlBQ4JA6ifN6nbyMGwEIsTP9OWqiUKVZ1wRFLw+cE Z6mdm6uIpHhiX80r6m9zZJkz8gaoPNWddQuimQU/lfzwG8b6iMd3JRkGWpZyJyP9nPtt wMgw== X-Gm-Message-State: ACrzQf2CwMWtdZm02yGXk53ieJB4C7vUXgKM+p7TnYGzF5xFFH2SCi36 KhVmXAajy6JAsY3tZctE1zc= X-Google-Smtp-Source: AMsMyM6O88XQHpQTJ1IL2W7WGEX5lFN8ezke4U03k3JE+0sPjMJ/KxaPMsTofHneheY2AICSOhor7A== X-Received: by 2002:ac8:7d55:0:b0:35c:d884:449b with SMTP id h21-20020ac87d55000000b0035cd884449bmr13702702qtb.446.1664102544940; Sun, 25 Sep 2022 03:42:24 -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 d21-20020ac86155000000b0035cebb79aaesm9074875qtm.18.2022.09.25.03.42.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Sep 2022 03:42:24 -0700 (PDT) Message-ID: Date: Sun, 25 Sep 2022 06:42:23 -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 error in bonding mode 4 with dedicated queues enabled Content-Language: en-US To: Usman Tanveer , chas3@att.com, humin29@huawei.com Cc: dev@dpdk.org References: <20220924141953.273290-1-usman.tanveer@emumba.com> From: Chas Williams <3chas3@gmail.com> In-Reply-To: <20220924141953.273290-1-usman.tanveer@emumba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 It's probably cleaner to just move the bond_ethdev_8023ad_flow_set until after the device start. For the reader, they don't need to understand why you might not have started the device earlier. On 9/24/22 10:19, Usman Tanveer wrote: > when dedicated queues are enable with bonding mode 4 (mlx5), the > application sets the flow, which cannot be set if the device is not > started. This fixed the issue by starting the device just before > setting the flow. Because device should be started to set the flow. > Also it does not effect other driver codes (I have tried on ixgbe). > > Bugzilla ID: 759 > > Signed-off-by: Usman Tanveer > --- > drivers/net/bonding/rte_eth_bond_pmd.c | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c > index 73e6972035..2dfb613ea6 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -1829,6 +1829,13 @@ slave_start(struct rte_eth_dev *bonded_eth_dev, > slave_eth_dev->data->port_id, errval); > } > > + 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; > + } > + > errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev, > slave_eth_dev->data->port_id); > if (errval != 0) { > @@ -1840,11 +1847,13 @@ slave_start(struct rte_eth_dev *bonded_eth_dev, > } > > /* 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 (!slave_eth_dev->data->dev_started) { > + 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 */