| 1157 | } |
| 1158 | |
| 1159 | int |
| 1160 | rte_efd_update(struct rte_efd_table * const table, const unsigned int socket_id, |
| 1161 | const void *key, const efd_value_t value) |
| 1162 | { |
| 1163 | uint32_t chunk_id = 0, group_id = 0, bin_id = 0; |
| 1164 | uint8_t new_bin_choice = 0; |
| 1165 | struct efd_online_group_entry entry = {{0}}; |
| 1166 | |
| 1167 | int status = efd_compute_update(table, socket_id, key, value, |
| 1168 | &chunk_id, &group_id, &bin_id, |
| 1169 | &new_bin_choice, &entry); |
| 1170 | |
| 1171 | if (status == RTE_EFD_UPDATE_NO_CHANGE) |
| 1172 | return EXIT_SUCCESS; |
| 1173 | |
| 1174 | if (status == RTE_EFD_UPDATE_FAILED) |
| 1175 | return status; |
| 1176 | |
| 1177 | efd_apply_update(table, socket_id, chunk_id, group_id, bin_id, |
| 1178 | new_bin_choice, &entry); |
| 1179 | return status; |
| 1180 | } |
| 1181 | |
| 1182 | int |
| 1183 | rte_efd_delete(struct rte_efd_table * const table, const unsigned int socket_id, |