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 5140FA0560; Sat, 15 Oct 2022 17:28:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FDBF42BB8; Sat, 15 Oct 2022 17:28:30 +0200 (CEST) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by mails.dpdk.org (Postfix) with ESMTP id 435B440E25 for ; Sat, 15 Oct 2022 17:28:28 +0200 (CEST) Received: by mail-qk1-f175.google.com with SMTP id b25so4292973qkk.7 for ; Sat, 15 Oct 2022 08:28:28 -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:message-id:reply-to; bh=cExk3hRVku3QTqaNpGE5eAYu4DZ0fZPoKwDMmKDKXTc=; b=S4R+sTy8Rdxx1ZJ4W1bvatS7PmfCfg3Fgv7cGuBjpTb6f0BU2jGS3P1s7y3Z6jnlLe LgBFgjuVSkJ7g4DTvZdzpifHUIDiDzfLRk/TFWyzKU7lNaiRl8yUy+8wMWFvmBCduBSV 58uFkBYOqjjLiwXbCEUXMMLpTMgO97/eGzif4adSwgEDcDUajG5PwDjy3pvozYilRjnG Vb8bgJStt35qJejYWnAwzlmKT/uC4c8cvvuG0cEiHYUBFFY3kmM3ixuwo9KvjgBHiWRc FLv8X6Wk3Yn0ODQIIWlFk8HO41PkRwpl+rzVq8gHnDVXfKjLu0zEgL/n5g66J2LtpRrr dNbQ== 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:message-id:reply-to; bh=cExk3hRVku3QTqaNpGE5eAYu4DZ0fZPoKwDMmKDKXTc=; b=C7EU8MYawaVfQwpMtU7GUIBAC7mCdXh0BDk5u3rm2KI/QH78bn6JOxOOfRnr0ehDFC BGzrXmabeZXGAIhv0p6TD2r/aV+URZmCVpItoY6cuvUXKnI54UJ4QPWG2G/jkS35Vqvu xIlrdr5bx+d/8P8Ji+7jaH7S8X0G+JUti/3oGiPd4vNYEqv00Kv1sTlmxBes3gngUByC nEGcmpCGyQKcSTah/QzOUCPqA0kO0v+WGhLic3mOiNs9LQMmiigmzySuO5c/gBzyIQ5n s8twJmu763oYA09LFfY2wYlRT+++qZvsUHFJ9zJ/29bVjEQbTMOMzGcV0VRV8Ya5MKon ddsw== X-Gm-Message-State: ACrzQf0A3/XfoUIl7D7oSUo1gUHswnH5z9/xDl2I7Qa03h9mjYwXyUjn LWJvckDgV9bkBvZJYfMFvkc= X-Google-Smtp-Source: AMsMyM4OG7Rd/R2SLXhJg93YXKIOjZ6PVW3DqgBgWAZlWeGWGQAO5XTC8Zk/iQgp1rUMFSP6ohMlmQ== X-Received: by 2002:a05:620a:46a4:b0:6ce:c4af:5a54 with SMTP id bq36-20020a05620a46a400b006cec4af5a54mr2132926qkb.377.1665847707442; Sat, 15 Oct 2022 08:28:27 -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 r28-20020ae9d61c000000b006ed30a8fb21sm4392864qkk.76.2022.10.15.08.28.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 Oct 2022 08:28:27 -0700 (PDT) Message-ID: <567bc309-c475-25c2-d9ed-f8ef3b47db2f@gmail.com> Date: Sat, 15 Oct 2022 11:28:26 -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 v2] 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: <20220929040551.120717-1-usman.tanveer@emumba.com> From: Chas Williams <3chas3@gmail.com> In-Reply-To: <20220929040551.120717-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 Thanks for making the change, IMHO this is much clearer. Signed-off-by: Chas Williams <3chas3@gmail.com> On 9/29/22 00:05, 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, 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;