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 00EF9237 for ; Tue, 21 Nov 2017 14:28:20 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A9EFC207F5; Tue, 21 Nov 2017 08:28:19 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:28:19 -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=nPYvCY3r6Ccy2lB2J mGrorDzSsvfZxFcXIyh7+YeJIE=; b=pMrTutkE7igEFXz5DeuVcqdBVqdk1ghtR /N+xXE/xfSR3sDGbfpyI2Rwa7vvHjMMoWNyXN77rExjeDEwAkEORyKR0DsO1BcZ6 80vdQYnXJqRdf3swYeA6qHeszjxWfi56uvIr8UuubHq+zpXfHSHuQH7j/rMBZbkQ xjNzwmFzd/ZOGZ9VSPotI8Beop0skmkgt9jEd6myjW6sJf1lRfiETuZGtBm5Npr+ DKkAofwL+FFdmslR1LaCFHxTdww06tvqTXytFWoM+ziGheqfUbPVkHxZNG8FFBid rFKc48VSgoqireCKUV1FAgxuvkQmOZtj3DTIQgAhkpaaFzculfmRA== 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=nPYvCY3r6Ccy2lB2JmGrorDzSsvfZxFcXIyh7+YeJIE=; b=oIUJOTWF KC3717xCqceOeQiSSoQZdZ6+lpsKYZBZ84p2nQwIlMXUqLVR7G1hfKFULpWUQL2N 0DN25b/8U0GopzHpSDZAg1FLYWUArk/AED3pdIOJ4V1tcQ8EfbdOUKc6XFrdRDQP 9D1bANJtLNWKTc5TtjoCUHMQ3DAB5l7RtvhrKXKj0L4UNXK6BBE8RGuMS97yLhqR 0jxS6ygrh2kZDsQAbQMGK73nikiRVuzcnleYVinyWfq09OBP+UvJuHjJ18skuUKk LBWSXIrkMqHgDVFdiCVKgVys6me61RSYlNRdzETg3lqLh4/VDlFV+q0n3TVZgwxq I458U25tcO8g9w== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id AD03E24810; Tue, 21 Nov 2017 08:28:16 -0500 (EST) From: Yuanhan Liu To: Wenzhuo Lu Cc: Cristian Dumitrescu , dpdk stable Date: Tue, 21 Nov 2017 21:18:03 +0800 Message-Id: <1511270333-31002-141-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/ixgbe: fix TM node parameter checking' 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:28:20 -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 007cf2deff0b6d92e46cf590b6ac7ac6de17313e Mon Sep 17 00:00:00 2001 From: Wenzhuo Lu Date: Tue, 17 Oct 2017 13:50:36 +0800 Subject: [PATCH] net/ixgbe: fix TM node parameter checking [ upstream commit 6bff19690d46a51cb8b5d38d0e0307bc73480673 ] Only queue nodes should be taken as leaf nodes, all the other nodes are non-leaf nodes. Correct it when checking the parameters of the TM nodes. Fixes: e0ff4d304ccf ("net/ixgbe: support adding TM node") Signed-off-by: Wenzhuo Lu Acked-by: Cristian Dumitrescu --- drivers/net/ixgbe/ixgbe_tm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_tm.c b/drivers/net/ixgbe/ixgbe_tm.c index cdcf45c..e7d8d39 100644 --- a/drivers/net/ixgbe/ixgbe_tm.c +++ b/drivers/net/ixgbe/ixgbe_tm.c @@ -482,7 +482,7 @@ ixgbe_queue_base_nb_get(struct rte_eth_dev *dev, uint16_t tc_node_no, } static int -ixgbe_node_param_check(uint32_t node_id, uint32_t parent_node_id, +ixgbe_node_param_check(struct rte_eth_dev *dev, uint32_t node_id, uint32_t priority, uint32_t weight, struct rte_tm_node_params *params, struct rte_tm_error *error) @@ -517,8 +517,8 @@ ixgbe_node_param_check(uint32_t node_id, uint32_t parent_node_id, return -EINVAL; } - /* for root node */ - if (parent_node_id == RTE_TM_NODE_ID_NULL) { + /* for non-leaf node */ + if (node_id >= dev->data->nb_tx_queues) { /* check the unsupported parameters */ if (params->nonleaf.wfq_weight_mode) { error->type = @@ -542,7 +542,7 @@ ixgbe_node_param_check(uint32_t node_id, uint32_t parent_node_id, return 0; } - /* for TC or queue node */ + /* for leaf node */ /* check the unsupported parameters */ if (params->leaf.cman) { error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS_CMAN; @@ -606,7 +606,7 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id, return -EINVAL; } - ret = ixgbe_node_param_check(node_id, parent_node_id, priority, weight, + ret = ixgbe_node_param_check(dev, node_id, priority, weight, params, error); if (ret) return ret; -- 2.7.4