From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by dpdk.org (Postfix) with ESMTP id 765CD276C for ; Sat, 15 Jul 2017 13:18:03 +0200 (CEST) Received: by mail-pf0-f194.google.com with SMTP id c24so13932741pfe.1 for ; Sat, 15 Jul 2017 04:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QemqNQUd483D4MX0s62AaY3kcF/6lQBgUurpF2+ZRkM=; b=Ph1tttppiYtCYwipVNnntIJVvOnQtqO5D0NyNpMXrHdNE/pDVNplNF6F2dpG6b+7uK sgkjH+kM1l4EG7whPrZFVVYnR4zHTbigstrVbfBbzGQNWn/psRtm8VpUszc5wLrrFvnI awErZyvopWW0ZnabJOV8M4yTobEDF57F8O7iqrbWTXjFcqlKT3O4vK9ICSEJON9OfISw Y17/SxLlMmlRkTuI1bGZ+AHuv4xKC88nBqzgSlNcZTi84SV4QzT7Ha4Uruap9ypevoLr KyAA4annxGWd/CgnIjpRIIS/wypLFyr5+jdgx5sLjrtTMTLqArcFyv3DNTl1YeuUnSxX RHnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QemqNQUd483D4MX0s62AaY3kcF/6lQBgUurpF2+ZRkM=; b=o1KxcZPht89VAznz7htJHBp96f4HtDXLpWNdoKtC7muO87dnDdpUkpykCR47VCKZ0C 7Q0trOi2yHMB6oFCoQZDpgWnkr6t7yTzOTnrfS2eKidkm6lRPwMK9mAE0M55mLM7/o3b RT11HNBpqjdkEBp9buqW+ltmekQa+bFoq+EqF9p+SfxrDREWUPLC71/sMifLoKEO7iBh l2m0WV6gnftWI93vAB0FlpmFNeIj65r/4fbhhmyRIwqnU8xCrU0PYcjBY+F5C6hyW8PU nHkHhaPl9ifY16Vk/6dAGH5yjImleWas1fMpXELnF6xowLZbxxaF6ScbX+3Bn1mzI448 jxzA== X-Gm-Message-State: AIVw1136FS5hDfmtFq8E/N03wDIevu/pqY+E80euXM2LKmwKAK73C677 B3skWBLn7xWnAQNo X-Received: by 10.84.234.2 with SMTP id m2mr20986486plk.268.1500117482767; Sat, 15 Jul 2017 04:18:02 -0700 (PDT) Received: from localhost.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id k194sm19000874pgc.31.2017.07.15.04.17.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Jul 2017 04:18:01 -0700 (PDT) From: Yuanhan Liu To: Declan Doherty Cc: dpdk stable Date: Sat, 15 Jul 2017 19:17:09 +0800 Message-Id: <1500117433-28932-3-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500117433-28932-1-git-send-email-yliu@fridaylinux.org> References: <1500117433-28932-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/bonding: fix number of bonding Tx/Rx queues' has been queued to LTS release 16.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jul 2017 11:18:03 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/19/17. So please shout if anyone has objections. Thanks. --yliu --- >>From a553b4971cef88f214485c97868b8231893721e5 Mon Sep 17 00:00:00 2001 From: Declan Doherty Date: Tue, 4 Jul 2017 17:46:24 +0100 Subject: [PATCH] net/bonding: fix number of bonding Tx/Rx queues [ upstream commit acfb51e2fe96c27a042248ee32930cbd78f36cd7 ] This patch fixes the maximum number of Tx an Rx queues supported by a bonding device return by the rte_eth_dev_info_get function. The bonding device now calculates the maximum number of supported Tx and Rx queues based on the slaves bound to the bonded device, with the minimum values of Tx and Rx queues from the device slaves being the bonded devices maximum, as each slave must be able to support the same number of Tx and Rx queues. Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Declan Doherty --- drivers/net/bonding/rte_eth_bond_pmd.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 71316b4..7811a5a 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1667,6 +1667,8 @@ 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; + uint16_t max_nb_rx_queues = UINT16_MAX; + uint16_t max_nb_tx_queues = UINT16_MAX; dev_info->max_mac_addrs = 1; @@ -1674,8 +1676,29 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) ? internals->candidate_max_rx_pktlen : ETHER_MAX_JUMBO_FRAME_LEN; - dev_info->max_rx_queues = (uint16_t)128; - dev_info->max_tx_queues = (uint16_t)512; + if (internals->slave_count > 0) { + /* Max number of tx/rx queues that the bonded device can + * support is the minimum values of the bonded slaves, as + * all slaves must be capable of supporting the same number + * of tx/rx queues. + */ + struct rte_eth_dev_info slave_info; + uint8_t idx; + + for (idx = 0; idx < internals->slave_count; idx++) { + rte_eth_dev_info_get(internals->slaves[idx].port_id, + &slave_info); + + if (slave_info.max_rx_queues < max_nb_rx_queues) + max_nb_rx_queues = slave_info.max_rx_queues; + + if (slave_info.max_tx_queues < max_nb_tx_queues) + max_nb_tx_queues = slave_info.max_tx_queues; + } + } + + dev_info->max_rx_queues = max_nb_rx_queues; + dev_info->max_tx_queues = max_nb_tx_queues; dev_info->min_rx_bufsize = 0; dev_info->pci_dev = NULL; -- 2.7.4