| 3004 | } |
| 3005 | |
| 3006 | static bool |
| 3007 | nfp_pre_tun_table_add(struct nfp_flow_priv *priv, |
| 3008 | char *hash_data, |
| 3009 | uint32_t hash_len) |
| 3010 | { |
| 3011 | int ret; |
| 3012 | uint32_t hash_key; |
| 3013 | |
| 3014 | hash_key = rte_jhash(hash_data, hash_len, priv->hash_seed); |
| 3015 | ret = rte_hash_add_key_data(priv->pre_tun_table, &hash_key, hash_data); |
| 3016 | if (ret != 0) { |
| 3017 | PMD_DRV_LOG(ERR, "Add to pre tunnel table failed"); |
| 3018 | return false; |
| 3019 | } |
| 3020 | |
| 3021 | return true; |
| 3022 | } |
| 3023 | |
| 3024 | static bool |
| 3025 | nfp_pre_tun_table_delete(struct nfp_flow_priv *priv, |
no test coverage detected