src/dpdk/drivers/net/bonding/rte_eth_bond_pmd.c
int
slave_remove_mac_addresses(struct rte_eth_dev *bonded_eth_dev,
		uint16_t slave_port_id)
{
	int i, rc, ret;
	struct rte_ether_addr *mac_addr;

	rc = 0;
	for (i = 1; i < BOND_MAX_MAC_ADDRS; i++) {
		mac_addr = &bonded_eth_dev->data->mac_addrs[i];
		if (rte_is_same_ether_addr(mac_addr, &null_mac_addr))
			break;

		ret = rte_eth_dev_mac_addr_remove(slave_port_id, mac_addr);
		/* save only the first error */
		if (ret < 0 && rc == 0)
			rc = ret;
	}

	return rc;
}
/*
 * Remove additional MAC addresses from the slave
 */
Remove additional MAC addresses from the slave
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, rc, ret;
	struct rte_ether_addr *mac_addr;
	rc = 0;
	for (i = 1; i < BOND_MAX_MAC_ADDRS; i++) {
		mac_addr = &bonded_eth_dev->data->mac_addrs[i];
		if (rte_is_same_ether_addr(mac_addr, &null_mac_addr))
			break;
		ret = rte_eth_dev_mac_addr_remove(slave_port_id, mac_addr);
		if (ret < 0 && rc == 0)
			rc = ret;
	}
	return rc;
}
int slave_remove_mac_addresses ( struct rte_eth_dev * bonded_eth_dev , uint16_t slave_port_id ) { int i , rc , ret ; struct rte_ether_addr * mac_addr ; rc = 0 ; for ( i = 1 ; i < BOND_MAX_MAC_ADDRS ; i ++ ) { mac_addr = & bonded_eth_dev -> data -> mac_addrs [ i ] ; if ( rte_is_same_ether_addr ( mac_addr , & null_mac_addr ) ) break ; ret = rte_eth_dev_mac_addr_remove ( slave_port_id , mac_addr ) ; if ( ret < 0 && rc == 0 ) rc = ret ; } return rc ; }
Remove additional MAC addresses from the slave
Remove additional MAC addresses from the slave
/* save only the first error */