From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 44CF5235 for ; Tue, 21 Nov 2017 14:22:01 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id DD98220CB0; Tue, 21 Nov 2017 08:22:00 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:22:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=f2UiKaHImMpMqClt+ ffigWqD7d9tMc8UgXSKe5EpLgI=; b=chKuxw9xGVFJUgRwVBpqfQJnPeQVAyKTl i3YDnYmaeplfwBrgmNF5PvmaWasrg949r26ys0M+Pi0XNkZhF2Uu8u4JISMozVVC UEj7xkU2gBtcOZKpbJ31CcudtmPeHiTaa0Nsu3CMGCO2h7aASiY5EAyiI5EFFcsW TGoUNONSRiuNeuImsBrct946y+ffL8DflfXPsw0D8CZhe8c8um3FZHu77ngqJK5o XbEHbhd7UOuJtyY70siZ73WMH3Mw02ieZq0ywjpqXO0iK4pbzxNk6mnYR4BDn/TX vlV5TIQPGYeRkfmrWyPB0lREVeg3stuwLwci17pef1GZJVEqrREmQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=f2UiKaHImMpMqClt+ffigWqD7d9tMc8UgXSKe5EpLgI=; b=Zvgx2RuC 0eNE4R+U/p73NpakuyepJYUy53f0zWLmBHCmPBTNQ+xBvcPK2hs1JsZlAJc/Jgn/ TNHicJhPFLQ5ufyUq46cCS8FBXrOlqmvYjAXINVh/4UoVszI8pMRQstjdP3gHTuc asvGkwz2e14HlkCCAzo4lQQWnPgXS87MlzMMBafMUJOekjSn5Lsfqv1dlNeC5sWo CK6y3eTAtc+SExby1vKGfxR5samTl9ebjF94NHJ6Futl/vA6rUvjdxnBxQ/OYZFz IlQpoa7gMbAGeh1Er5yBcbBKXof7vVrbmXvC/3vXzqjXTQK429Nx0pe+swBO0Z1+ AwiSdxuXZbtlTg== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 9796A2486C; Tue, 21 Nov 2017 08:21:57 -0500 (EST) From: Yuanhan Liu To: Tomasz Kulasek Cc: Radu Nicolau , Declan Doherty , dpdk stable Date: Tue, 21 Nov 2017 21:16:22 +0800 Message-Id: <1511270333-31002-40-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/bonding: fix slaves capacity check' has been queued to stable release 17.08.1 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: Tue, 21 Nov 2017 13:22:01 -0000 Hi, FYI, your patch has been queued to stable release 17.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 5c2e0c44758f0fd8128ad6eac7c2065098e52be0 Mon Sep 17 00:00:00 2001 From: Tomasz Kulasek Date: Thu, 27 Jul 2017 14:00:27 +0200 Subject: [PATCH] net/bonding: fix slaves capacity check [ upstream commit 9f78433a0ee5d1d94253a992d221ecd777e7d04d ] For i40e NIC bond_ethdev_8023ad_flow_verify fails when action queue index indicates unavailable queue before slaves configuration. This fix verifies flow settings for queue 0, which is always available, and checks if slaves max queue number capacity meets requirements. Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control") Signed-off-by: Tomasz Kulasek Reviewed-by: Radu Nicolau Acked-by: Declan Doherty --- drivers/net/bonding/rte_eth_bond_pmd.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 3ee70ba..d783320 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -175,12 +175,13 @@ const struct rte_flow_attr flow_attr_8023ad = { int bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev, uint8_t slave_port) { + struct rte_eth_dev_info slave_info; struct rte_flow_error error; struct bond_dev_private *internals = (struct bond_dev_private *) (bond_dev->data->dev_private); - struct rte_flow_action_queue lacp_queue_conf = { - .index = internals->mode4.dedicated_queues.rx_qid, + const struct rte_flow_action_queue lacp_queue_conf = { + .index = 0, }; const struct rte_flow_action actions[] = { @@ -195,8 +196,21 @@ bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev, int ret = rte_flow_validate(slave_port, &flow_attr_8023ad, flow_item_8023ad, actions, &error); - if (ret < 0) + if (ret < 0) { + RTE_BOND_LOG(ERR, "%s: %s (slave_port=%d queue_id=%d)", + __func__, error.message, slave_port, + internals->mode4.dedicated_queues.rx_qid); return -1; + } + + rte_eth_dev_info_get(slave_port, &slave_info); + if (slave_info.max_rx_queues < bond_dev->data->nb_rx_queues || + slave_info.max_tx_queues < bond_dev->data->nb_tx_queues) { + RTE_BOND_LOG(ERR, + "%s: Slave %d capabilities doesn't allow to allocate additional queues", + __func__, slave_port); + return -1; + } return 0; } @@ -206,7 +220,7 @@ bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id) { struct rte_eth_dev *bond_dev = &rte_eth_devices[port_id]; struct bond_dev_private *internals = (struct bond_dev_private *) (bond_dev->data->dev_private); - struct rte_eth_dev_info bond_info, slave_info; + struct rte_eth_dev_info bond_info; uint8_t idx; /* Verify if all slaves in bonding supports flow director and */ @@ -217,9 +231,6 @@ bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id) { internals->mode4.dedicated_queues.tx_qid = bond_info.nb_tx_queues; for (idx = 0; idx < internals->slave_count; idx++) { - rte_eth_dev_info_get(internals->slaves[idx].port_id, - &slave_info); - if (bond_ethdev_8023ad_flow_verify(bond_dev, internals->slaves[idx].port_id) != 0) return -1; -- 2.7.4