MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_rcu_qsbr_reader

Function test_rcu_qsbr_reader

dpdk/app/test/test_rcu_qsbr.c:962–996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

960}
961
962static int
963test_rcu_qsbr_reader(void *arg)
964{
965 struct rte_rcu_qsbr *temp;
966 struct rte_hash *hash = NULL;
967 int i;
968 uint32_t lcore_id = rte_lcore_id();
969 struct test_rcu_thread_info *ti;
970 uint32_t *pdata;
971
972 ti = (struct test_rcu_thread_info *)arg;
973 temp = t[ti->ir];
974 hash = h[ti->ih];
975
976 do {
977 rte_rcu_qsbr_thread_register(temp, lcore_id);
978 rte_rcu_qsbr_thread_online(temp, lcore_id);
979 for (i = 0; i < TOTAL_ENTRY; i++) {
980 rte_rcu_qsbr_lock(temp, lcore_id);
981 if (rte_hash_lookup_data(hash, keys+i,
982 (void **)&pdata) != -ENOENT) {
983 pdata[lcore_id] = 0;
984 while (pdata[lcore_id] < COUNTER_VALUE)
985 pdata[lcore_id]++;
986 }
987 rte_rcu_qsbr_unlock(temp, lcore_id);
988 }
989 /* Update quiescent state counter */
990 rte_rcu_qsbr_quiescent(temp, lcore_id);
991 rte_rcu_qsbr_thread_offline(temp, lcore_id);
992 rte_rcu_qsbr_thread_unregister(temp, lcore_id);
993 } while (!writer_done);
994
995 return 0;
996}
997
998static int
999test_rcu_qsbr_writer(void *arg)

Callers

nothing calls this directly

Calls 9

rte_lcore_idFunction · 0.85
rte_rcu_qsbr_lockFunction · 0.85
rte_hash_lookup_dataFunction · 0.85
rte_rcu_qsbr_unlockFunction · 0.85
rte_rcu_qsbr_quiescentFunction · 0.85

Tested by

no test coverage detected