Lines Matching refs:found

744 	struct ofdpa_flow_tbl_entry *found;  in ofdpa_flow_tbl_find()  local
745 size_t key_len = match->key_len ? match->key_len : sizeof(found->key); in ofdpa_flow_tbl_find()
747 hash_for_each_possible(ofdpa->flow_tbl, found, in ofdpa_flow_tbl_find()
749 if (memcmp(&found->key, &match->key, key_len) == 0) in ofdpa_flow_tbl_find()
750 return found; in ofdpa_flow_tbl_find()
760 struct ofdpa_flow_tbl_entry *found; in ofdpa_flow_tbl_add() local
761 size_t key_len = match->key_len ? match->key_len : sizeof(found->key); in ofdpa_flow_tbl_add()
768 found = ofdpa_flow_tbl_find(ofdpa, match); in ofdpa_flow_tbl_add()
770 if (found) { in ofdpa_flow_tbl_add()
771 match->cookie = found->cookie; in ofdpa_flow_tbl_add()
772 hash_del(&found->entry); in ofdpa_flow_tbl_add()
773 kfree(found); in ofdpa_flow_tbl_add()
774 found = match; in ofdpa_flow_tbl_add()
775 found->cmd = ROCKER_TLV_CMD_TYPE_OF_DPA_FLOW_MOD; in ofdpa_flow_tbl_add()
777 found = match; in ofdpa_flow_tbl_add()
778 found->cookie = ofdpa->flow_tbl_next_cookie++; in ofdpa_flow_tbl_add()
779 found->cmd = ROCKER_TLV_CMD_TYPE_OF_DPA_FLOW_ADD; in ofdpa_flow_tbl_add()
782 hash_add(ofdpa->flow_tbl, &found->entry, found->key_crc32); in ofdpa_flow_tbl_add()
788 found, NULL, NULL); in ofdpa_flow_tbl_add()
795 struct ofdpa_flow_tbl_entry *found; in ofdpa_flow_tbl_del() local
796 size_t key_len = match->key_len ? match->key_len : sizeof(found->key); in ofdpa_flow_tbl_del()
804 found = ofdpa_flow_tbl_find(ofdpa, match); in ofdpa_flow_tbl_del()
806 if (found) { in ofdpa_flow_tbl_del()
807 hash_del(&found->entry); in ofdpa_flow_tbl_del()
808 found->cmd = ROCKER_TLV_CMD_TYPE_OF_DPA_FLOW_DEL; in ofdpa_flow_tbl_del()
815 if (found) { in ofdpa_flow_tbl_del()
819 found, NULL, NULL); in ofdpa_flow_tbl_del()
820 kfree(found); in ofdpa_flow_tbl_del()
1051 struct ofdpa_group_tbl_entry *found; in ofdpa_group_tbl_find() local
1053 hash_for_each_possible(ofdpa->group_tbl, found, in ofdpa_group_tbl_find()
1055 if (found->group_id == match->group_id) in ofdpa_group_tbl_find()
1056 return found; in ofdpa_group_tbl_find()
1079 struct ofdpa_group_tbl_entry *found; in ofdpa_group_tbl_add() local
1084 found = ofdpa_group_tbl_find(ofdpa, match); in ofdpa_group_tbl_add()
1086 if (found) { in ofdpa_group_tbl_add()
1087 hash_del(&found->entry); in ofdpa_group_tbl_add()
1088 ofdpa_group_tbl_entry_free(found); in ofdpa_group_tbl_add()
1089 found = match; in ofdpa_group_tbl_add()
1090 found->cmd = ROCKER_TLV_CMD_TYPE_OF_DPA_GROUP_MOD; in ofdpa_group_tbl_add()
1092 found = match; in ofdpa_group_tbl_add()
1093 found->cmd = ROCKER_TLV_CMD_TYPE_OF_DPA_GROUP_ADD; in ofdpa_group_tbl_add()
1096 hash_add(ofdpa->group_tbl, &found->entry, found->group_id); in ofdpa_group_tbl_add()
1103 found, NULL, NULL); in ofdpa_group_tbl_add()
1110 struct ofdpa_group_tbl_entry *found; in ofdpa_group_tbl_del() local
1116 found = ofdpa_group_tbl_find(ofdpa, match); in ofdpa_group_tbl_del()
1118 if (found) { in ofdpa_group_tbl_del()
1119 hash_del(&found->entry); in ofdpa_group_tbl_del()
1120 found->cmd = ROCKER_TLV_CMD_TYPE_OF_DPA_GROUP_DEL; in ofdpa_group_tbl_del()
1127 if (found) { in ofdpa_group_tbl_del()
1131 found, NULL, NULL); in ofdpa_group_tbl_del()
1132 ofdpa_group_tbl_entry_free(found); in ofdpa_group_tbl_del()
1221 struct ofdpa_neigh_tbl_entry *found; in ofdpa_neigh_tbl_find() local
1223 hash_for_each_possible(ofdpa->neigh_tbl, found, in ofdpa_neigh_tbl_find()
1225 if (found->ip_addr == ip_addr) in ofdpa_neigh_tbl_find()
1226 return found; in ofdpa_neigh_tbl_find()
1264 struct ofdpa_neigh_tbl_entry *found; in ofdpa_port_ipv4_neigh() local
1282 found = ofdpa_neigh_tbl_find(ofdpa, ip_addr); in ofdpa_port_ipv4_neigh()
1284 updating = found && adding; in ofdpa_port_ipv4_neigh()
1285 removing = found && !adding; in ofdpa_port_ipv4_neigh()
1286 adding = !found && adding; in ofdpa_port_ipv4_neigh()
1295 memcpy(entry, found, sizeof(*entry)); in ofdpa_port_ipv4_neigh()
1296 ofdpa_neigh_del(found); in ofdpa_port_ipv4_neigh()
1298 ofdpa_neigh_update(found, eth_dst, true); in ofdpa_port_ipv4_neigh()
1299 memcpy(entry, found, sizeof(*entry)); in ofdpa_port_ipv4_neigh()
1381 struct ofdpa_neigh_tbl_entry *found; in ofdpa_port_ipv4_nh() local
1395 found = ofdpa_neigh_tbl_find(ofdpa, ip_addr); in ofdpa_port_ipv4_nh()
1397 updating = found && adding; in ofdpa_port_ipv4_nh()
1398 removing = found && !adding; in ofdpa_port_ipv4_nh()
1399 adding = !found && adding; in ofdpa_port_ipv4_nh()
1408 *index = found->index; in ofdpa_port_ipv4_nh()
1409 ofdpa_neigh_del(found); in ofdpa_port_ipv4_nh()
1411 ofdpa_neigh_update(found, NULL, false); in ofdpa_port_ipv4_nh()
1412 resolved = !is_zero_ether_addr(found->eth_dst); in ofdpa_port_ipv4_nh()
1413 *index = found->index; in ofdpa_port_ipv4_nh()
1888 struct ofdpa_fdb_tbl_entry *found; in ofdpa_fdb_tbl_find() local
1890 hash_for_each_possible(ofdpa->fdb_tbl, found, entry, match->key_crc32) in ofdpa_fdb_tbl_find()
1891 if (memcmp(&found->key, &match->key, sizeof(found->key)) == 0) in ofdpa_fdb_tbl_find()
1892 return found; in ofdpa_fdb_tbl_find()
1903 struct ofdpa_fdb_tbl_entry *found; in ofdpa_port_fdb() local
1920 found = ofdpa_fdb_tbl_find(ofdpa, fdb); in ofdpa_port_fdb()
1922 if (found) { in ofdpa_port_fdb()
1923 found->touched = jiffies; in ofdpa_port_fdb()
1926 hash_del(&found->entry); in ofdpa_port_fdb()
1936 if (!found != !removing) { in ofdpa_port_fdb()
1938 if (!found && removing) in ofdpa_port_fdb()
1950 struct ofdpa_fdb_tbl_entry *found; in ofdpa_port_fdb_flush() local
1964 hash_for_each_safe(ofdpa->fdb_tbl, bkt, tmp, found, entry) { in ofdpa_port_fdb_flush()
1965 if (found->key.ofdpa_port != ofdpa_port) in ofdpa_port_fdb_flush()
1967 if (!found->learned) in ofdpa_port_fdb_flush()
1970 found->key.addr, in ofdpa_port_fdb_flush()
1971 found->key.vlan_id); in ofdpa_port_fdb_flush()
1974 hash_del(&found->entry); in ofdpa_port_fdb_flush()
2215 struct ofdpa_internal_vlan_tbl_entry *found; in ofdpa_internal_vlan_tbl_find() local
2217 hash_for_each_possible(ofdpa->internal_vlan_tbl, found, in ofdpa_internal_vlan_tbl_find()
2219 if (found->ifindex == ifindex) in ofdpa_internal_vlan_tbl_find()
2220 return found; in ofdpa_internal_vlan_tbl_find()
2231 struct ofdpa_internal_vlan_tbl_entry *found; in ofdpa_port_internal_vlan_id_get() local
2243 found = ofdpa_internal_vlan_tbl_find(ofdpa, ifindex); in ofdpa_port_internal_vlan_id_get()
2244 if (found) { in ofdpa_port_internal_vlan_id_get()
2246 goto found; in ofdpa_port_internal_vlan_id_get()
2249 found = entry; in ofdpa_port_internal_vlan_id_get()
2250 hash_add(ofdpa->internal_vlan_tbl, &found->entry, found->ifindex); in ofdpa_port_internal_vlan_id_get()
2255 found->vlan_id = htons(OFDPA_INTERNAL_VLAN_ID_BASE + i); in ofdpa_port_internal_vlan_id_get()
2256 goto found; in ofdpa_port_internal_vlan_id_get()
2261 found: in ofdpa_port_internal_vlan_id_get()
2262 found->ref_count++; in ofdpa_port_internal_vlan_id_get()
2265 return found->vlan_id; in ofdpa_port_internal_vlan_id_get()
2318 struct ofdpa_internal_vlan_tbl_entry *found; in ofdpa_port_internal_vlan_id_put() local
2324 found = ofdpa_internal_vlan_tbl_find(ofdpa, ifindex); in ofdpa_port_internal_vlan_id_put()
2325 if (!found) { in ofdpa_port_internal_vlan_id_put()
2332 if (--found->ref_count <= 0) { in ofdpa_port_internal_vlan_id_put()
2333 bit = ntohs(found->vlan_id) - OFDPA_INTERNAL_VLAN_ID_BASE; in ofdpa_port_internal_vlan_id_put()
2335 hash_del(&found->entry); in ofdpa_port_internal_vlan_id_put()
2336 kfree(found); in ofdpa_port_internal_vlan_id_put()