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 01083A00C4; Thu, 29 Sep 2022 06:05:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99CA340FAE; Thu, 29 Sep 2022 06:05:58 +0200 (CEST) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by mails.dpdk.org (Postfix) with ESMTP id 51E9240E5A for ; Thu, 29 Sep 2022 06:05:57 +0200 (CEST) Received: by mail-ed1-f54.google.com with SMTP id x92so321225ede.9 for ; Wed, 28 Sep 2022 21:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=kVI246FUlYstnSm2LYHaZ8g6MmHfgBVk8a5Q7q9xAPo=; b=6OtluytZeXfZDDvOlqpd5fPi4opodDfy0WIrggiGoRDR49ujrodygyndKZJsiNNvB7 Wc3t9Efd0Dz919RV+stOk3fSDArEkYsvZoZeq2eQPHylUVVbBHDUndQaa7ctYwhc1Vm5 gDmiqJ35vugjt2U69CCKvbclAGwG73hDnz64grAj2j7WeunKAIGEfnyyjXvGRjUVRhYN ePDmfmgoAsEJ3E2QwO5QU88NCXuSXBjlqodEs4hpmH/P4QiCWOR1PGFjUxR1kQZgIcep YJNKfXd/xXysxzwwDu0i53vKYg35dn6J8dOVF57ZCTCkzr4fDWMlJcvM3MSd9IzFl+3n pOKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=kVI246FUlYstnSm2LYHaZ8g6MmHfgBVk8a5Q7q9xAPo=; b=JYnUf6gdFGFRn18fM/QVP7m+2N4FPRJ4VVnLXqr6C4b7wadWuPMwWANAwdcVCldVeA Duwl1gBH+pKLDUocIqiz4m/Q0dl9UIq9y8UnXkPKJ6K4/2AmZ8mx9Wth9lrZaiqvMUn0 CTGU7t/7uKDAoZ3YsDjR7LVxBNoMO7e3aL7h8FeiRMiEr2j5vz1+FFjEh0xAD/79l5FA 8GIkUQskIaG99b0w2FQdqAXycB+gC7uIH4sZeXKgBaVXMxuPqcbzkxJxMolUZY51ZGEK RW7GplqPahNpPWnBCoDmNuFq/GriPIn4BH+tR2idOa3mq/jib6y2vNxtYGMWJYfbhgqu +wzg== X-Gm-Message-State: ACrzQf2dt//5JJLosIlZwXmtFgbPOn/ryh+giHTKUly1GVLiF0lsNAix OMROd2Ea8nwPrKJW/129u+Csow== X-Google-Smtp-Source: AMsMyM7XB7FdOAz1ApP02ZyrQJdDheQaYeSzmnG4uYEv1vbUpaT7vQuCN1XzUwt0+29fmwOrFobH1g== X-Received: by 2002:a05:6402:1761:b0:455:37bb:93c3 with SMTP id da1-20020a056402176100b0045537bb93c3mr1208341edb.403.1664424357078; Wed, 28 Sep 2022 21:05:57 -0700 (PDT) Received: from localhost.localdomain ([182.191.83.208]) by smtp.gmail.com with ESMTPSA id la25-20020a170907781900b007829fb46a0esm3347057ejc.142.2022.09.28.21.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 21:05:56 -0700 (PDT) From: Usman Tanveer To: chas3@att.com, humin29@huawei.com Cc: dev@dpdk.org, Usman Tanveer Subject: [PATCH v2] net/bonding: fix error in bonding mode 4 with dedicated queues enabled Date: Thu, 29 Sep 2022 09:05:51 +0500 Message-Id: <20220929040551.120717-1-usman.tanveer@emumba.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 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, 11 insertions(+), 8 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index fd2d95a751..69cbbe19ff 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1828,7 +1828,18 @@ slave_start(struct rte_eth_dev *bonded_eth_dev, RTE_BOND_LOG(ERR, "bond_ethdev_8023ad_flow_destroy: port=%d, err (%d)", slave_eth_dev->data->port_id, 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 (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) { @@ -1839,14 +1850,6 @@ 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 RSS is enabled for bonding, synchronize RETA */ if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) { int i; -- 2.25.1