[dpdk-dev] getting errno 14 while creating mbuf pool

2021-09-26 Thread Mohsen Meamarian
Hi friends,

when I increase mbuf , creating mbuf pool in vpp starting failed :

vnet[18135]: dpdk_pool_create:504: ioctl(VFIO_IOMMU_MAP_DMA) pool
'dpdk_mbuf_pool_socket0': Bad address (errno 14)

how can I allocate more memory for mbuf creating pool? I can't decrease
mbuf number. I use VFIO driver and enable intel_iommu in grub. also I have
14000 free hugepage on each Numa node.

Best regards
Mohsen Memariyan


hash lookup in secondary process

2024-05-28 Thread Mohsen Meamarian
Hi all,

I have two dpdk app, one primary and one secondary. I create a hash table
in the primary dpdk app like this:

static struct rte_hash_parameters ut_params = {
.name = "BufferTable2",
.entries = 1024*256,
.key_len = sizeof(uint64_t),
.hash_func = rte_jhash,
//.extra_flag=RTE_HASH_EXTRA_FLAGS_EXT_TABLE,
//.extra_flag=RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY,
};

buffer_table = rte_hash_create(&ut_params);
if (buffer_table == NULL) {
printf("UNABLE TO CREATE HASHTABLE\n");
rte_exit(EXIT_FAILURE, "UNABLE TO CREATE HASHTABLE\n");
}


and in secondary I use :

h=rte_hash_find_existing("BufferTable1");
if (!h) {
fprintf(stderr, "Failed to find existing hash table\n");
return -1;
}

int ret = rte_hash_lookup_data(buffer_table, &teid,
(void**)&packet_in_bucket);

I can find the table pointer, but it gives a segmentation fault when I want
to look up something or add some key value.
I cannot add a key value in the primary app, so it should be in the
secondary app.

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.


I saw this too in dpdk doc:

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.
https://doc.dpdk.org/guides/prog_guide/multi_proc_support.html

can you explain what I should do?
dpdk version 24.03



Best,
Mohsen