From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kiselev Subject: Re: [PATCH v3] net/bonding: add add/remove mac addrs Date: Wed, 20 Jun 2018 11:42:49 +0300 Message-ID: <1441417307.20180620114249@therouter.net> References: <0d1c4f28-e08b-40e7-9b9e-0d4bdd15279a@VE1EUR03FT041.eop-EUR03.prod.protection.outlook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Matan Azrad , "dev@dpdk.org" , Chas Williams <3chas3@gmail.com>, Stephen Hemminger Return-path: Received: from relay-out6.mail.masterhost.ru (relay-out6.mail.masterhost.ru [83.222.12.16]) by dpdk.org (Postfix) with ESMTP id 5EFFE1B473 for ; Wed, 20 Jun 2018 10:42:58 +0200 (CEST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > Please see comments below. From: Matan Azrad >> +/* >> + * Remove additional MAC addresses from the slave */ int >> +slave_remove_mac_addresses(struct rte_eth_dev *bonded_eth_dev, >> + uint16_t slave_port_id) >> +{ >> + int i, ret = 0; >> + struct ether_addr *mac_addr; >> + >> + for (i = 1; i < BOND_MAX_MAC_ADDRS; i++) { >> + mac_addr = &bonded_eth_dev->data->mac_addrs[i]; >> + if (is_same_ether_addr(mac_addr, &null_mac_addr)) >> + break; >> + >> + ret = rte_eth_dev_mac_addr_remove(slave_port_id, >> mac_addr); >> + } > I suggest to return the first error, also in case of all success > with last failure, the code here wrongly returns success. Fixed in the patch v4. -- Alex