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 1A280A00C4; Thu, 29 Sep 2022 06:16:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C0D0F40FAE; Thu, 29 Sep 2022 06:16:25 +0200 (CEST) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by mails.dpdk.org (Postfix) with ESMTP id 8B49140E5A for ; Thu, 29 Sep 2022 06:16:24 +0200 (CEST) Received: by mail-ej1-f44.google.com with SMTP id r18so245032eja.11 for ; Wed, 28 Sep 2022 21:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=oqjlxFXM9w999PqVGH+rlDTEBMcP5jDg0ZTNIvmixEs=; b=P6bWf5SSWwSGqaaBaZdj0o5KjukoFwz+g9M9tX2qxmQ5LaXvBkl/60XzQcZ29GYa98 O4kLAVrs3B4ikLIqLJa2j33kHf3fEzCQjrL7duW1MlVmaCRCnxiTo0xyuo4awJX9z35u HF7NGgitOpLzUyh4UrCb1w6g5JK3oUhfVWJPcgX9Ik3GybVWKSsOW08tSb59QIBy18G7 jazJMABbU4u0c66wKTPOFraKaStMxFTxc0Tm2f/O/YLiF/oyvKZmDgVQNvV1ncXLWD+U RcP4glf1FBgHWYnPj2lVJVmPsvSgLm1p3XBxOE2QmlrkBlXW+7gTFOdx8klA0zsI2ZoQ QO3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=oqjlxFXM9w999PqVGH+rlDTEBMcP5jDg0ZTNIvmixEs=; b=4L2tk8Z9YMpwrky00PQZuiV9SMks7fjcvYqYNVfbS2q7Mua4by5egVzJmLwkyzavGE SdQ3nbpoQKpeW4joyY4ZsibXmJ77b6Bc0ilmY46HWn9cgJC76tdkkAQ38ucIXa3AvU+Q 3Kri35u7k1eQ3MDUsG1JC9IYfS2OQfu9o63xT6PukkHFCOh2T7NhWd7UtVSpw3mDiSPn rXzZhNQHCg8NlBTVY9TMmQ7U9dd6eUKo3pGrTRLSeeq4C/HmwY58p5+e9QP5YKnFzOum RTcffx0oF/OTFt1bnnAbtrrpPH3FqiDH/K5SIX1MgFlO6SrS70uIASODk9Jcjz4INnUl i5Lw== X-Gm-Message-State: ACrzQf2G7smSxRtE9D7l8Csh5dXB41M/maNSJRVOV0NfWm3B/wC8N61P nYiyB4FeK75yO+nUFfYeUN1Ng7imV3lvXup0O9ebx/d/sPQicg== X-Google-Smtp-Source: AMsMyM5Z9vfMDyESAfKs9kwIBPUknOZHAWoFgAshj8yKRazihaoMnhKoOpLwTZrXMOs9PQanbjtH97hRSgs4pFjq7i4= X-Received: by 2002:a17:906:fc6:b0:72f:d080:416 with SMTP id c6-20020a1709060fc600b0072fd0800416mr1011081ejk.1.1664424984197; Wed, 28 Sep 2022 21:16:24 -0700 (PDT) MIME-Version: 1.0 References: <20220929040551.120717-1-usman.tanveer@emumba.com> In-Reply-To: <20220929040551.120717-1-usman.tanveer@emumba.com> From: Usman Tanveer Date: Thu, 29 Sep 2022 09:16:12 +0500 Message-ID: Subject: Re: [PATCH v2] net/bonding: fix error in bonding mode 4 with dedicated queues enabled To: chas3@att.com, humin29@huawei.com Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" 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 We cannot configure the queues when the device is started. So, that part is still before the device starts. I just moved bond_ethdev_8023ad_flow_set() after the device start. On Thu, Sep 29, 2022 at 9:05 AM 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; > -- > 2.25.1 >