From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) by dpdk.org (Postfix) with ESMTP id 852251B505; Mon, 7 Jan 2019 19:44:41 +0100 (CET) Received: by mail-qt1-f193.google.com with SMTP id i7so1583460qtj.10; Mon, 07 Jan 2019 10:44:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uXK7qyu85Ply8jC6S/LlASkGE7MM7A3o7bHa9EDitM4=; b=PHx1yZiqLazWLYr6pP+gg/6eUlrOhuowUTOGQhzSL+DwW3V3AQSnPwPLd13jhVdK9z DPmAEto9YU3nYGbrk3/T/euNq0wGc/EGEMZl0hobiApOZfgRmE3nYAT5I4SODnBFOvdF K4aangP1oJh42bbpYJtP3+pAJwFaK+Z7Jc2bTZqR4Pre4tGGI6xGNJ/qDnz7lpHco+TC G971OW7hiSYuHfHly4MhFtVx9tjGoRGrGMiUFaXB8WFRVpyQMVau0LawxlL1DCimyjVv D4gl+t4lC6Oh9PQTD5l+HOpTXQ6+mK87Gt6GlW+xRBFMzoSvD3bCVi6uC0MD6LV6YydU kxTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uXK7qyu85Ply8jC6S/LlASkGE7MM7A3o7bHa9EDitM4=; b=o9aHccVHMfQf7+MpQF0BuhDvEk+gqnBibcTs0gGLqqkLZYD5AyhNpznuTpWCW70GNp J/R9fSkRC2/LGlRwRwpjZuuQPH2Kl7wqZe4LParXwJy/EhKnxrZVyq0oq8o5tChB9WwF 1/mxHAXZxaK0g3ckWgWyg4njm1j1eydof/hQ/7h+E04n0VRNKls7BZuBLRlA2fEdmlrI 8OfUVnAxVP2G6B1r8XY+h4sh4LbH5eYfk9ofzRNyPNteNee96PsCxhDDXlpgnVV+ZsXK GFXEb/U1CIP27xLVbZtvAfez0/GJEZAyczoW1ZQ43RzVjx/BDXCnTRmst+FynEQ4rweX +LDQ== X-Gm-Message-State: AJcUukeM4GZr8MZRl5oNe3rviOOHrl/F6x8PGEsGB48CgP20yo3LjawI BOidzIAd0vN85BGcml1toNc7sRno X-Google-Smtp-Source: ALg8bN7/gWauV6YIeeTO4qyutw5ytzmD5NXi/owJ8ANzoMi94B4VjJnUiF6VlEMGoAnOg+4Zvj00xg== X-Received: by 2002:aed:2ae3:: with SMTP id t90mr60111273qtd.19.1546886680739; Mon, 07 Jan 2019 10:44:40 -0800 (PST) Received: from [192.168.1.10] (pool-96-255-82-34.washdc.fios.verizon.net. [96.255.82.34]) by smtp.gmail.com with ESMTPSA id m10sm33716691qtg.39.2019.01.07.10.44.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jan 2019 10:44:40 -0800 (PST) To: Hari Kumar Vemula , dev@dpdk.org Cc: reshma.pattan@intel.com, declan.doherty@intel.com, jananeex.m.parthasarathy@intel.com, stable@dpdk.org References: <1546866064-11929-1-git-send-email-hari.kumarx.vemula@intel.com> From: Chas Williams <3chas3@gmail.com> Message-ID: <69a66875-ec6c-f284-a5bc-78c10e987f68@gmail.com> Date: Mon, 7 Jan 2019 13:44:39 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <1546866064-11929-1-git-send-email-hari.kumarx.vemula@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/bonding: fix create bonded device test failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 18:44:41 -0000 On 1/7/19 8:01 AM, Hari Kumar Vemula wrote: > Create bonded device test is failing due to improper initialisation in > bonded device configuration. which leads to crash while setting up queues. > > The value of nb_rx_desc is checked if it is not in range of rx_desc_lim of > bonded device which fails. > This is due to "rx_desc_lim" is set to 0 as default value of bonded device > during bond_alloc(). > Hence nb_rx_desc (1024) is > 0 and test fails. > > Fix is to set the default values of rx_desc_lim of bonded device to > appropriate value. The default values for the bond device aren't known until the first slave is added. Can you explain your setup? What PMD are you using for testing? > > Fixes: 2efb58cbab ("bond: new link bonding library") > Cc: stable@dpdk.org > > Signed-off-by: Hari Kumar Vemula > --- > drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c > index 44deaf119..e0888e960 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -2225,6 +2225,11 @@ static void > bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) > { > struct bond_dev_private *internals = dev->data->dev_private; > + struct rte_eth_desc_lim bond_lim = { > + .nb_max = UINT16_MAX, > + .nb_min = 0, > + .nb_align = 1, > + }; > > uint16_t max_nb_rx_queues = UINT16_MAX; > uint16_t max_nb_tx_queues = UINT16_MAX; > @@ -2263,10 +2268,8 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) > memcpy(&dev_info->default_txconf, &internals->default_txconf, > sizeof(dev_info->default_txconf)); > > - memcpy(&dev_info->rx_desc_lim, &internals->rx_desc_lim, > - sizeof(dev_info->rx_desc_lim)); > - memcpy(&dev_info->tx_desc_lim, &internals->tx_desc_lim, > - sizeof(dev_info->tx_desc_lim)); > + dev_info->rx_desc_lim = bond_lim; > + dev_info->tx_desc_lim = bond_lim; > > /** > * If dedicated hw queues enabled for link bonding device in LACP mode >