+1 with Thomas, see below,
Le 12/10/2017 à 08:51, Tomasz Duszynski a écrit :
What is MUSDK_DMA_MEMSIZE?
If the value cannot change, it must be a constant in the code.
If it can change, it should be a run-time driver option.
It's up to the user what MUSDK_DMA_MEMSIZE is going to be. Currently it's
set to value that should work it all cases.
Except that, MUSDK_DMA_MEMSIZE is used as synchronization point for net
and crypto (on condition they are used together i.e ipsec-secgw).
Suppose we have two different MUSDK_DMA_MEMSIZE defined for net/crypto then
dma memsize allocated will depend on driver probing sequence which might
confuse user.
It does not make sense,
+ /*
+ * ret == -EEXIST is correct, it means DMA
+ * has been already initialized (by another PMD).
+ */
+ ret = mv_sys_dma_mem_init(RTE_MRVL_MUSDK_DMA_MEMSIZE
int mv_sys_dma_mem_init(u64 size)
{
struct sys_dma *i_sys_dma;
int err;
if (sys_dma) {
pr_err("Dma object already exits.\n");
return -EEXIST;
}
So, I do not understand why you cannot add some checks into the drivers
to assert that users must have set the same value for both when calling:
ret = mv_sys_dma_mem_init(my_best_size);
maybe, you need to fix and improve musdk first to avoid DPDK from
getting such compilation issues.
best regards,
Vincent