Lines Matching refs:mac_node

8485 	struct hclge_mac_node *mac_node, *tmp;  in hclge_find_mac_node()  local
8487 list_for_each_entry_safe(mac_node, tmp, list, node) in hclge_find_mac_node()
8488 if (ether_addr_equal(mac_addr, mac_node->mac_addr)) in hclge_find_mac_node()
8489 return mac_node; in hclge_find_mac_node()
8494 static void hclge_update_mac_node(struct hclge_mac_node *mac_node, in hclge_update_mac_node() argument
8500 if (mac_node->state == HCLGE_MAC_TO_DEL) in hclge_update_mac_node()
8501 mac_node->state = HCLGE_MAC_ACTIVE; in hclge_update_mac_node()
8505 if (mac_node->state == HCLGE_MAC_TO_ADD) { in hclge_update_mac_node()
8506 list_del(&mac_node->node); in hclge_update_mac_node()
8507 kfree(mac_node); in hclge_update_mac_node()
8509 mac_node->state = HCLGE_MAC_TO_DEL; in hclge_update_mac_node()
8516 if (mac_node->state == HCLGE_MAC_TO_ADD) in hclge_update_mac_node()
8517 mac_node->state = HCLGE_MAC_ACTIVE; in hclge_update_mac_node()
8530 struct hclge_mac_node *mac_node; in hclge_update_mac_list() local
8542 mac_node = hclge_find_mac_node(list, addr); in hclge_update_mac_list()
8543 if (mac_node) { in hclge_update_mac_list()
8544 hclge_update_mac_node(mac_node, state); in hclge_update_mac_list()
8560 mac_node = kzalloc(sizeof(*mac_node), GFP_ATOMIC); in hclge_update_mac_list()
8561 if (!mac_node) { in hclge_update_mac_list()
8568 mac_node->state = state; in hclge_update_mac_list()
8569 ether_addr_copy(mac_node->mac_addr, addr); in hclge_update_mac_list()
8570 list_add_tail(&mac_node->node, list); in hclge_update_mac_list()
8810 struct hclge_mac_node *mac_node, *tmp; in hclge_sync_vport_mac_list() local
8818 list_for_each_entry_safe(mac_node, tmp, list, node) { in hclge_sync_vport_mac_list()
8819 ret = sync(vport, mac_node->mac_addr); in hclge_sync_vport_mac_list()
8821 mac_node->state = HCLGE_MAC_ACTIVE; in hclge_sync_vport_mac_list()
8846 struct hclge_mac_node *mac_node, *tmp; in hclge_unsync_vport_mac_list() local
8854 list_for_each_entry_safe(mac_node, tmp, list, node) { in hclge_unsync_vport_mac_list()
8855 ret = unsync(vport, mac_node->mac_addr); in hclge_unsync_vport_mac_list()
8857 list_del(&mac_node->node); in hclge_unsync_vport_mac_list()
8858 kfree(mac_node); in hclge_unsync_vport_mac_list()
8870 struct hclge_mac_node *mac_node, *tmp, *new_node; in hclge_sync_from_add_list() local
8873 list_for_each_entry_safe(mac_node, tmp, add_list, node) { in hclge_sync_from_add_list()
8874 if (mac_node->state == HCLGE_MAC_TO_ADD) in hclge_sync_from_add_list()
8885 new_node = hclge_find_mac_node(mac_list, mac_node->mac_addr); in hclge_sync_from_add_list()
8887 hclge_update_mac_node(new_node, mac_node->state); in hclge_sync_from_add_list()
8888 list_del(&mac_node->node); in hclge_sync_from_add_list()
8889 kfree(mac_node); in hclge_sync_from_add_list()
8890 } else if (mac_node->state == HCLGE_MAC_ACTIVE) { in hclge_sync_from_add_list()
8891 mac_node->state = HCLGE_MAC_TO_DEL; in hclge_sync_from_add_list()
8892 list_move_tail(&mac_node->node, mac_list); in hclge_sync_from_add_list()
8894 list_del(&mac_node->node); in hclge_sync_from_add_list()
8895 kfree(mac_node); in hclge_sync_from_add_list()
8905 struct hclge_mac_node *mac_node, *tmp, *new_node; in hclge_sync_from_del_list() local
8907 list_for_each_entry_safe(mac_node, tmp, del_list, node) { in hclge_sync_from_del_list()
8908 new_node = hclge_find_mac_node(mac_list, mac_node->mac_addr); in hclge_sync_from_del_list()
8918 list_del(&mac_node->node); in hclge_sync_from_del_list()
8919 kfree(mac_node); in hclge_sync_from_del_list()
8921 list_move_tail(&mac_node->node, mac_list); in hclge_sync_from_del_list()
8946 struct hclge_mac_node *mac_node, *tmp, *new_node; in hclge_sync_vport_mac_table() local
8962 list_for_each_entry_safe(mac_node, tmp, list, node) { in hclge_sync_vport_mac_table()
8963 switch (mac_node->state) { in hclge_sync_vport_mac_table()
8965 list_move_tail(&mac_node->node, &tmp_del_list); in hclge_sync_vport_mac_table()
8971 ether_addr_copy(new_node->mac_addr, mac_node->mac_addr); in hclge_sync_vport_mac_table()
8972 new_node->state = mac_node->state; in hclge_sync_vport_mac_table()
9118 struct hclge_mac_node *mac_node, *tmp; in hclge_uninit_vport_mac_list() local
9129 list_for_each_entry_safe(mac_node, tmp, list, node) { in hclge_uninit_vport_mac_list()
9130 switch (mac_node->state) { in hclge_uninit_vport_mac_list()
9133 list_move_tail(&mac_node->node, &tmp_del_list); in hclge_uninit_vport_mac_list()
9136 list_del(&mac_node->node); in hclge_uninit_vport_mac_list()
9137 kfree(mac_node); in hclge_uninit_vport_mac_list()
9152 list_for_each_entry_safe(mac_node, tmp, &tmp_del_list, node) { in hclge_uninit_vport_mac_list()
9153 list_del(&mac_node->node); in hclge_uninit_vport_mac_list()
9154 kfree(mac_node); in hclge_uninit_vport_mac_list()
10250 struct hclge_mac_node *mac_node, *tmp; in hclge_mac_node_convert_for_reset() local
10252 list_for_each_entry_safe(mac_node, tmp, list, node) { in hclge_mac_node_convert_for_reset()
10253 if (mac_node->state == HCLGE_MAC_ACTIVE) { in hclge_mac_node_convert_for_reset()
10254 mac_node->state = HCLGE_MAC_TO_ADD; in hclge_mac_node_convert_for_reset()
10255 } else if (mac_node->state == HCLGE_MAC_TO_DEL) { in hclge_mac_node_convert_for_reset()
10256 list_del(&mac_node->node); in hclge_mac_node_convert_for_reset()
10257 kfree(mac_node); in hclge_mac_node_convert_for_reset()