| 2985 | } |
| 2986 | |
| 2987 | static struct nfp_pre_tun_entry * |
| 2988 | nfp_pre_tun_table_search(struct nfp_flow_priv *priv, |
| 2989 | char *hash_data, |
| 2990 | uint32_t hash_len) |
| 2991 | { |
| 2992 | int index; |
| 2993 | uint32_t hash_key; |
| 2994 | struct nfp_pre_tun_entry *mac_index; |
| 2995 | |
| 2996 | hash_key = rte_jhash(hash_data, hash_len, priv->hash_seed); |
| 2997 | index = rte_hash_lookup_data(priv->pre_tun_table, &hash_key, (void **)&mac_index); |
| 2998 | if (index < 0) { |
| 2999 | PMD_DRV_LOG(DEBUG, "Data NOT found in the hash table"); |
| 3000 | return NULL; |
| 3001 | } |
| 3002 | |
| 3003 | return mac_index; |
| 3004 | } |
| 3005 | |
| 3006 | static bool |
| 3007 | nfp_pre_tun_table_add(struct nfp_flow_priv *priv, |
no test coverage detected