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

Function write_keys

dpdk/app/test/test_hash_readwrite_lf_perf.c:659–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657}
658
659static int
660write_keys(uint8_t write_type)
661{
662 uint32_t i;
663 int ret;
664 uint32_t key_cnt = 0;
665 uint32_t *keys;
666 if (write_type == WRITE_KEY_SHIFT) {
667 key_cnt = tbl_rwc_test_param.count_keys_ks;
668 keys = tbl_rwc_test_param.keys_ks;
669 } else if (write_type == WRITE_NO_KEY_SHIFT) {
670 key_cnt = tbl_rwc_test_param.count_keys_no_ks;
671 keys = tbl_rwc_test_param.keys_no_ks;
672 } else if (write_type == WRITE_EXT_BKT) {
673 key_cnt = tbl_rwc_test_param.count_keys_extbkt;
674 keys = tbl_rwc_test_param.keys_ext_bkt;
675 }
676 for (i = 0; i < key_cnt; i++) {
677 ret = rte_hash_add_key(tbl_rwc_test_param.h, keys + i);
678 if ((write_type == WRITE_NO_KEY_SHIFT) && ret < 0) {
679 printf("writer failed %"PRIu32"\n", i);
680 return -1;
681 }
682 }
683 return 0;
684}
685
686static int
687test_rwc_multi_writer(__rte_unused void *arg)

Calls 2

rte_hash_add_keyFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected