<div dir="ltr">Hi all,<div><br></div><div>I have two dpdk app, one primary and one secondary. I create a hash table in the primary dpdk app like this:</div><div><br></div><div>static struct rte_hash_parameters ut_params = {<br>    .name = "BufferTable2",<br>    .entries = 1024*256,<br>    .key_len = sizeof(uint64_t),<br>    .hash_func = rte_jhash,<br>    //.extra_flag=RTE_HASH_EXTRA_FLAGS_EXT_TABLE,<br>    //.extra_flag=RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY,<br><div>};</div><div><br></div><div>    buffer_table = rte_hash_create(&ut_params);<br></div><div>    if (buffer_table == NULL) {<br>        printf("UNABLE TO CREATE HASHTABLE\n");<br>        rte_exit(EXIT_FAILURE, "UNABLE TO CREATE HASHTABLE\n");<br>    }</div></div><div><br></div><div><br></div><div>and in secondary I use :</div><div><br></div><div><div>    h=rte_hash_find_existing("BufferTable1");<br>    if (!h) {<br>        fprintf(stderr, "Failed to find existing hash table\n");<br>        return -1;<br>    }<br></div><div><br></div><div>int ret = rte_hash_lookup_data(buffer_table, &teid, (void**)&packet_in_bucket);</div></div><div><br></div><div>I can find the table pointer, but it gives a segmentation fault when I want to look up something or add some key value.</div><div>I cannot add a key value in the primary app, so it should be in the secondary app.</div><div><br></div><div><div>I checked rte_hash_lookup_with_hash_data and rte_hash_add_key_with_hash. these get a hash signature along with a key/value. but it also gives segfault. in this way, the hash sig should be calculated manually. </div><br class="gmail-Apple-interchange-newline"></div><div><br></div><div>I saw this too in dpdk doc:</div><div><br></div><div>The use of function pointers between multiple processes running based on different compiled binaries is not supported, since the location of a given function in one process may be different from its location in a second. This prevents the librte_hash library from behaving properly as in a multi-process instance since it uses a pointer to the hash function internally.<br><div><a href="https://doc.dpdk.org/guides/prog_guide/multi_proc_support.html" target="_blank">https://doc.dpdk.org/guides/prog_guide/multi_proc_support.html</a></div></div><div><br></div><div>can you explain what I should do?</div><div>dpdk version 24.03</div><div><br></div><div><br></div><div><br></div><div>Best,</div><div>Mohsen</div></div>