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 624E2A0518 for ; Fri, 24 Jul 2020 14:10:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5A68C1C20A; Fri, 24 Jul 2020 14:10:51 +0200 (CEST) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id D2D721C235 for ; Fri, 24 Jul 2020 14:10:49 +0200 (CEST) Received: by mail-wm1-f68.google.com with SMTP id o2so8076010wmh.2 for ; Fri, 24 Jul 2020 05:10:49 -0700 (PDT) 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=6W0R5fwdqIah0DtOhY3FvagaRwllbUrVGI0aq/djcI8=; b=YqfxW6CCEyMH9RpDl2gaiS7XWuXFWeSI34mOYppUJeqx6ipFzv3wt1n3AzD2HYzqDv nPpaDcBXaIwqGSbkvy0MN7Ro8Dx103w6UxQTxeo9M8cf+0XRTueffyYbbKe4zza/ZDyt blNRFNQGxpbT4kYS7OWjZVDDwoohk6ORdGKT7Rkc/33qy27GHdbWpR9t7sE8BsBvVtal HdZ/Y5Flp//gCWngMqh1LyLfCpqFqW/MSjaDwJVIEG0meA9M5Lm48KMhKrPeH1YFvk18 +yJP+LSB+sNgu7bsQvboNA5iMB4TkEU4A/nywkmHwxBpIXG5/Py4eRS83k2SjtO0MxDk 4oow== 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=6W0R5fwdqIah0DtOhY3FvagaRwllbUrVGI0aq/djcI8=; b=sALWVTLPUSROKCFl9Uw3pH/kbJyz4wdRhQ1O4Bur4MkxLFIjTihq1gV3CK7JzbSme7 1i0O0OT68vZdB7lTfqUnTvBr+hKcDN/HmzY2kBLI/U5UxLeznf56q25Movf+yOwcez9h tzUghYaYOHZD/Ireq7w2arMLIjL57+44H3JFA6vak4eEuJniyQBDls5/9fduXOIVMpm1 U7rnDzhuUcjHRnyMmuRUR9VuMDW+NOU0mdjncT9AbtGEWENI7s+NVax+llQLGbD6Tht1 cZ7P9n98Qd39y0r/JumZzbWsr1Gfv8JYN3CywuA7C4X+3/22ne2ywCK2GTsHuhD5C4B6 Z4nA== X-Gm-Message-State: AOAM530U/hko20hQykQGCMD8imdbelwRFx8BYT1dEKIS0ZEpGhFEa7L/ eJTBnMCfhnW7rdcdvF3nI9UYsWBke+L3YA== X-Google-Smtp-Source: ABdhPJx0aXL/Za8Q/8WYSVWPYrBe/HQ+cRVPgfvzWtatLFRSyqwnVpyJtSLKzSk7yzXQwnsO331SFA== X-Received: by 2002:a1c:5581:: with SMTP id j123mr8268580wmb.75.1595592649585; Fri, 24 Jul 2020 05:10:49 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id p8sm1216917wrq.9.2020.07.24.05.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:10:49 -0700 (PDT) From: luca.boccassi@gmail.com To: "Wei Hu (Xavier)" Cc: Hongbo Zheng , Chunsong Feng , Xuan Li , dpdk stable Date: Fri, 24 Jul 2020 12:59:57 +0100 Message-Id: <20200724120030.1863487-159-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bonding: fix MAC address when one port resets' has been queued to stable release 19.11.4 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 stable release 19.11.4 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/26/20. 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 d65301e19f3b8b157652668c1b0c90b9c2de50a7 Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Fri, 17 Apr 2020 16:19:18 +0800 Subject: [PATCH] net/bonding: fix MAC address when one port resets [ upstream commit 2d944002762e85e351be7cea432919f159d2ecae ] The current bonding PMD driver call mac_address_slaves_update function to modify the MAC address of all slaves devices. In mac_address_slaves_update function, the rte_eth_dev_default_mac_addr_set API function is called to set the MAC address of the slave devices in turn in the for loop statement. When one port reset, calling rte_eth_dev_default_mac_addr_set API fails because the firmware will not respond to the commands from the driver, and exit the loop, so other slave devices cannot continue to update the MAC address. This patch fixes the issue by avoid exiting the loop when calling rte_eth_dev_default_mac_addr_set fails. Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Hongbo Zheng Signed-off-by: Wei Hu (Xavier) Signed-off-by: Chunsong Feng Signed-off-by: Xuan Li --- drivers/net/bonding/rte_eth_bond_pmd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index ddae3518c..419e03c00 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1502,6 +1502,7 @@ int mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev) { struct bond_dev_private *internals = bonded_eth_dev->data->dev_private; + bool set; int i; /* Update slave devices MAC addresses */ @@ -1529,6 +1530,7 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev) case BONDING_MODE_TLB: case BONDING_MODE_ALB: default: + set = true; for (i = 0; i < internals->slave_count; i++) { if (internals->slaves[i].port_id == internals->current_primary_port) { @@ -1537,7 +1539,7 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev) bonded_eth_dev->data->mac_addrs)) { RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address", internals->current_primary_port); - return -1; + set = false; } } else { if (rte_eth_dev_default_mac_addr_set( @@ -1545,10 +1547,11 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev) &internals->slaves[i].persisted_mac_addr)) { RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address", internals->slaves[i].port_id); - return -1; } } } + if (!set) + return -1; } return 0; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:54.686183990 +0100 +++ 0159-net-bonding-fix-MAC-address-when-one-port-resets.patch 2020-07-24 12:53:48.527010931 +0100 @@ -1,8 +1,10 @@ -From 2d944002762e85e351be7cea432919f159d2ecae Mon Sep 17 00:00:00 2001 +From d65301e19f3b8b157652668c1b0c90b9c2de50a7 Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Fri, 17 Apr 2020 16:19:18 +0800 Subject: [PATCH] net/bonding: fix MAC address when one port resets +[ upstream commit 2d944002762e85e351be7cea432919f159d2ecae ] + The current bonding PMD driver call mac_address_slaves_update function to modify the MAC address of all slaves devices. In mac_address_slaves_update function, the rte_eth_dev_default_mac_addr_set @@ -18,7 +20,6 @@ rte_eth_dev_default_mac_addr_set fails. Fixes: 2efb58cbab6e ("bond: new link bonding library") -Cc: stable@dpdk.org Signed-off-by: Hongbo Zheng Signed-off-by: Wei Hu (Xavier) @@ -29,7 +30,7 @@ 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c -index 6f361c7b2..116e2f29d 100644 +index ddae3518c..419e03c00 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1502,6 +1502,7 @@ int