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 85C251B1A8 for ; Wed, 24 Jan 2018 16:39:59 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 377F7226A6; Wed, 24 Jan 2018 10:39:59 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:39:59 -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=la+ar0HIleQhBCi7Y 2uVfm3ym6XeHw0aAEWIETRXSLg=; b=g9YxLElkQrXM+dHf1rqjnCNSXI47QXfzC Bzu9+MS2BUMqY0YdGYudSLMeNLsCwc1Lb3PLR1MKxslGnp+qe7anGOWO5di6tsN/ sBSffekll9kNUbCmdgWlZotIDLgl7YR3vR40wX4B8y43azgpcXSIXe6OJxnlrrfm YBQTfjpJD99KtIYwgr5+SxWUyZEdXvca3HYE+gKQoULhdCZp88X7+iXprU3+cure CXmds/vTSO8WBpDPE6uZO3NbbQ5GNnNU5+eCrwDt1EzI2VFNxuivXBl02+JlqE2f 07kGUdQI11N/Wq91+tbpchyg4d2jTYLsu0vdhI/jB6gwQq3ZUDm7w== 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=la+ar0HIleQhBCi7Y2uVfm3ym6XeHw0aAEWIETRXSLg=; b=Y2CCPqul Y5seCahd6r+5+EgPTDvrlvL/0i+y152pV4j5XXbs37MBfAGCiQSRxDLo0s5Qx6Q9 IuQhFqIcMnjPUnrJod2AwNBwd135Qf0yBul5sXT8wM7SD1t5E4urkO6LvfVZmk5D 9OSd5TAbPwuJML8DJ0aNOLmPZV5lDuzAA6fhjHu7wWNdMrjKEyOG77ec0sKszsCe 8nATUPQ+zLl8voDr2BF3OPjoem2beVMGyDoi6usdA4vhhiDDpKRrknbzrjdugfRZ 03qhPNG4SxWtn4MRwKheKRNfusM33Kah8NM8YIpbEuF3xm0b6323iWnkjcKZlYRc d1YJd4n6L5g3NA== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 221C67E1A2; Wed, 24 Jan 2018 10:39:56 -0500 (EST) From: Yuanhan Liu To: Chas Williams Cc: Declan Doherty , dpdk stable Date: Wed, 24 Jan 2018 23:32:40 +0800 Message-Id: <1516808026-25523-92-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/bonding: fix setting slave MAC addresses' has been queued to LTS release 17.11.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: Wed, 24 Jan 2018 15:39:59 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.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 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From b3831c7ec3b2a6ba964b441dd7621e62bbfeb2e8 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Wed, 27 Dec 2017 21:12:31 -0500 Subject: [PATCH] net/bonding: fix setting slave MAC addresses [ upstream commit aa7791ba8de07c9e67ac4a42c7322409886cf6e5 ] Use rte_eth_dev_default_mac_addr_set() to change a slave MAC address. mac_address_set() only updates the software copy and does nothing to update the hardware. Signed-off-by: Chas Williams Acked-by: Declan Doherty --- drivers/net/bonding/rte_eth_bond_api.c | 2 +- drivers/net/bonding/rte_eth_bond_pmd.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 703bb39..532683b 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -453,7 +453,7 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id, &rte_eth_devices[bonded_port_id].data->port_id); /* Restore original MAC address of slave device */ - mac_address_set(&rte_eth_devices[slave_port_id], + rte_eth_dev_default_mac_addr_set(slave_port_id, &(internals->slaves[slave_idx].persisted_mac_addr)); slave_eth_dev = &rte_eth_devices[slave_port_id]; diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index fe23289..1d3fbeb 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1500,7 +1500,8 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev) case BONDING_MODE_BALANCE: case BONDING_MODE_BROADCAST: for (i = 0; i < internals->slave_count; i++) { - if (mac_address_set(&rte_eth_devices[internals->slaves[i].port_id], + if (rte_eth_dev_default_mac_addr_set( + internals->slaves[i].port_id, bonded_eth_dev->data->mac_addrs)) { RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address", internals->slaves[i].port_id); @@ -1518,15 +1519,16 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev) for (i = 0; i < internals->slave_count; i++) { if (internals->slaves[i].port_id == internals->current_primary_port) { - if (mac_address_set(&rte_eth_devices[internals->primary_port], + if (rte_eth_dev_default_mac_addr_set( + internals->primary_port, bonded_eth_dev->data->mac_addrs)) { RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address", internals->current_primary_port); return -1; } } else { - if (mac_address_set( - &rte_eth_devices[internals->slaves[i].port_id], + if (rte_eth_dev_default_mac_addr_set( + internals->slaves[i].port_id, &internals->slaves[i].persisted_mac_addr)) { RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address", internals->slaves[i].port_id); -- 2.7.4