src/dpdk/drivers/net/hinic/hinic_pmd_ethdev.c
static void hinic_deinit_mac_addr(struct rte_eth_dev *eth_dev)
{
	struct hinic_nic_dev *nic_dev =
				HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev);
	u16 func_id = 0;
	int rc;
	int i;

	func_id = hinic_global_func_id(nic_dev->hwdev);

	for (i = 0; i < HINIC_MAX_UC_MAC_ADDRS; i++) {
		if (rte_is_zero_ether_addr(&eth_dev->data->mac_addrs[i]))
			continue;

		rc = hinic_del_mac(nic_dev->hwdev,
				   eth_dev->data->mac_addrs[i].addr_bytes,
				   0, func_id);
		if (rc && rc != HINIC_PF_SET_VF_ALREADY)
			PMD_DRV_LOG(ERR, "Delete mac table failed, dev_name: %s",
				    eth_dev->data->name);

		memset(&eth_dev->data->mac_addrs[i], 0,
		       sizeof(struct rte_ether_addr));
	}

	/* delete multicast mac addrs */
	hinic_delete_mc_addr_list(nic_dev);

	rte_free(nic_dev->mc_list);

}
/**
 * Deinit mac_vlan table in NIC.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 *
 * @return
 *   0 on success and stats is filled,
 *   negative error value otherwise.
 */
Deinit mac_vlan table in NIC.
@param dev
Pointer to Ethernet device structure.

@return
0 on success and stats is filled,
negative error value otherwise.
Deinit mac_vlan table in NIC . @param dev Pointer to Ethernet device structure . @return 0 on success and stats is filled negative error value otherwise .
static void hinic_deinit_mac_addr(struct rte_eth_dev *eth_dev)
{
	struct hinic_nic_dev *nic_dev =
				HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev);
	u16 func_id = 0;
	int rc;
	int i;
	func_id = hinic_global_func_id(nic_dev->hwdev);
	for (i = 0; i < HINIC_MAX_UC_MAC_ADDRS; i++) {
		if (rte_is_zero_ether_addr(&eth_dev->data->mac_addrs[i]))
			continue;
		rc = hinic_del_mac(nic_dev->hwdev,
				   eth_dev->data->mac_addrs[i].addr_bytes,
				   0, func_id);
		if (rc && rc != HINIC_PF_SET_VF_ALREADY)
			PMD_DRV_LOG(ERR, "Delete mac table failed, dev_name: %s",
				    eth_dev->data->name);
		memset(&eth_dev->data->mac_addrs[i], 0,
		       sizeof(struct rte_ether_addr));
	}
	hinic_delete_mc_addr_list(nic_dev);
	rte_free(nic_dev->mc_list);
}
static void hinic_deinit_mac_addr ( struct rte_eth_dev * eth_dev ) { struct hinic_nic_dev * nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV ( eth_dev ) ; u16 func_id = 0 ; int rc ; int i ; func_id = hinic_global_func_id ( nic_dev -> hwdev ) ; for ( i = 0 ; i < HINIC_MAX_UC_MAC_ADDRS ; i ++ ) { if ( rte_is_zero_ether_addr ( & eth_dev -> data -> mac_addrs [ i ] ) ) continue ; rc = hinic_del_mac ( nic_dev -> hwdev , eth_dev -> data -> mac_addrs [ i ] . addr_bytes , 0 , func_id ) ; if ( rc && rc != HINIC_PF_SET_VF_ALREADY ) PMD_DRV_LOG ( ERR , " " , eth_dev -> data -> name ) ; memset ( & eth_dev -> data -> mac_addrs [ i ] , 0 , sizeof ( struct rte_ether_addr ) ) ; } hinic_delete_mc_addr_list ( nic_dev ) ; rte_free ( nic_dev -> mc_list ) ; }
Deinit mac_vlan table in NIC.
Deinit mac_vlan table in NIC .
/* delete multicast mac addrs */