From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 29D94A04F3 for ; Thu, 19 Dec 2019 15:36:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 21600330; Thu, 19 Dec 2019 15:36:27 +0100 (CET) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 2230B1BF7F for ; Thu, 19 Dec 2019 15:36:26 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id a5so5670251wmb.0 for ; Thu, 19 Dec 2019 06:36:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JKIFagxWVnny2ONLuXJUeNmkiZSxtTuK0q/AlVdAam8=; b=lHP37AGVRMre6ZBhkDOldCBE7RQFaSobhil1wZFIfzbI6QtCGTrnMXG+6328sOJwSj NwopE7a0uNih3A5MEDfM5Wocd/VjsUDcAp6zRk58tmYTmmKH7lrT3j1qbieKdQmUd17i KPKDRTzQ3sGFVK+GKuzfB6jN59tJ99ef2/lSt5EBwNR77rVu4u4BJ4ExKVNOg/N73ctd rq2CkJiLnAnEChMNvc4gooaLLkWt47VohfZOzp7uV99qNrJzi0QE07NWHVEqn0QtxlrW GJEHXSKNowyEqwP+R4U47Ap8jyYhsWSCf49VBiW2fPHi3n5hDtJeHpL3++su75BHpUQX sJag== 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:mime-version:content-transfer-encoding; bh=JKIFagxWVnny2ONLuXJUeNmkiZSxtTuK0q/AlVdAam8=; b=NSg08ouerejqylewYpA/yTJ13xxlbmbDk0KLthrbOA4DlAzSNQydw1jEht8U+aLLCu AV0SCHMipJdQh1MFYNuTX7OWRc19FoeBYrskIiRAZjl4kcKUobQ+pgVUU8zC0s4/MVdl Rhf36+KwnQNioCETd8OrsEhEDE+d475yDMOc0Y+GpjEojVNZXb3CnVQih8cqyHerkh+9 imGxEsKiaGFVhjV0YTLXDI2FlKBoyvNAAhHnIDAIEaEk/JEURUDI0LkT043d0CpIjp3c TSGrW2cbc/2aaT2uEqJUginkvy7+fHHVlHUl2y6qY8bBWRPDLWCIlOfDAGbSN4RQ7VfK nJ7w== X-Gm-Message-State: APjAAAUbsVvYxgdTihygHOzs3iYWWGj4Wo2VIDJp8u8rAUBjyNzy5Vnk GPgMdf23iofmfOzYSLh0UdY= X-Google-Smtp-Source: APXvYqx38d9+T94pFS0XWvnYAP7+srHki7cca30zfsby9VyT3fn/Ux8qi0U5Lp8RbDi+IUi/3AjzMQ== X-Received: by 2002:a7b:c084:: with SMTP id r4mr9855772wmh.99.1576766185847; Thu, 19 Dec 2019 06:36:25 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id e12sm6649029wrn.56.2019.12.19.06.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:36:23 -0800 (PST) From: luca.boccassi@gmail.com To: Hui Zhao Cc: David Marchand , Maxime Coquelin , dpdk stable Date: Thu, 19 Dec 2019 14:33:05 +0000 Message-Id: <20191219143447.21506-38-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bonding: fix slave id types' has been queued to LTS release 17.11.10 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 17.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/21/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 68e34fdd450d1efd9d3df7065798acc9d98f9284 Mon Sep 17 00:00:00 2001 From: Hui Zhao Date: Thu, 21 Mar 2019 21:28:13 +0100 Subject: [PATCH] net/bonding: fix slave id types [ upstream commit c28aff1e41eedd9d44c480264efbd7f4dd5cf31e ] mode_bond_id and mode_band_id are slave ids, stored on 16bits. Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Hui Zhao Signed-off-by: David Marchand Reviewed-by: Maxime Coquelin --- drivers/net/bonding/rte_eth_bond_8023ad.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 14b82bb304..abf833f6e1 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -659,7 +659,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id) SM_FLAG_CLR(port, NTT); } -static uint8_t +static uint16_t max_index(uint64_t *a, int n) { if (n <= 0) @@ -693,7 +693,8 @@ selection_logic(struct bond_dev_private *internals, uint8_t slave_id) uint64_t agg_bandwidth[8] = {0}; uint64_t agg_count[8] = {0}; uint16_t default_slave = 0; - uint8_t mode_count_id, mode_band_id; + uint16_t mode_count_id; + uint16_t mode_band_id; struct rte_eth_link link_info; slaves = internals->active_slaves; @@ -729,13 +730,11 @@ selection_logic(struct bond_dev_private *internals, uint8_t slave_id) switch (internals->mode4.agg_selection) { case AGG_COUNT: - mode_count_id = max_index( - (uint64_t *)agg_count, slaves_count); + mode_count_id = max_index(agg_count, slaves_count); new_agg_id = mode_count_id; break; case AGG_BANDWIDTH: - mode_band_id = max_index( - (uint64_t *)agg_bandwidth, slaves_count); + mode_band_id = max_index(agg_bandwidth, slaves_count); new_agg_id = mode_band_id; break; case AGG_STABLE: -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:27.853764628 +0000 +++ 0038-net-bonding-fix-slave-id-types.patch 2019-12-19 14:32:25.873293225 +0000 @@ -1,12 +1,13 @@ -From c28aff1e41eedd9d44c480264efbd7f4dd5cf31e Mon Sep 17 00:00:00 2001 +From 68e34fdd450d1efd9d3df7065798acc9d98f9284 Mon Sep 17 00:00:00 2001 From: Hui Zhao Date: Thu, 21 Mar 2019 21:28:13 +0100 Subject: [PATCH] net/bonding: fix slave id types +[ upstream commit c28aff1e41eedd9d44c480264efbd7f4dd5cf31e ] + mode_bond_id and mode_band_id are slave ids, stored on 16bits. Fixes: f8244c6399d9 ("ethdev: increase port id range") -Cc: stable@dpdk.org Signed-off-by: Hui Zhao Signed-off-by: David Marchand @@ -16,10 +17,10 @@ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c -index e50d946eba..c6a645a653 100644 +index 14b82bb304..abf833f6e1 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c -@@ -639,7 +639,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id) +@@ -659,7 +659,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id) SM_FLAG_CLR(port, NTT); } @@ -28,7 +29,7 @@ max_index(uint64_t *a, int n) { if (n <= 0) -@@ -673,7 +673,8 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id) +@@ -693,7 +693,8 @@ selection_logic(struct bond_dev_private *internals, uint8_t slave_id) uint64_t agg_bandwidth[8] = {0}; uint64_t agg_count[8] = {0}; uint16_t default_slave = 0; @@ -36,9 +37,9 @@ + uint16_t mode_count_id; + uint16_t mode_band_id; struct rte_eth_link link_info; - int ret; -@@ -717,13 +718,11 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id) + slaves = internals->active_slaves; +@@ -729,13 +730,11 @@ selection_logic(struct bond_dev_private *internals, uint8_t slave_id) switch (internals->mode4.agg_selection) { case AGG_COUNT: