On 3/9/2018 12:14 PM, cys wrote: > Commit 8451269e6d7ba7501723fe2efd0 said "remove continuous memory > restriction"; > http://dpdk.org/browse/dpdk/commit/lib/librte_eal/linuxapp/kni/kni_net.c?id=8451269e6d7ba7501723fe2efd05745010295bac > For chained mbufs(nb_segs > 1), function va2pa use the offset of previous mbuf > to calculate physical address of next mbuf. > So anywhere guarante that all mbufs have the same offset (buf_addr - > buf_physaddr) ? > Or have I misunderstood chained mbufs?
Hi, Your description is correct, KNI chained mbufs is broken if chained mbufs are from different mempools. Two commits seems involved, in time order:  d89a58dfe90b ("kni: support chained mbufs")  8451269e6d7b ("kni: remove continuous memory restriction") With current implementation, kernel needs to know physical address of the mbuf to be able to access it. For chained mbufs, first mbuf is OK but for rest kernel side gets the virtual address of the mbuf and this only works if all chained mbufs are from same mempool. I don't have any good solution indeed, but it is possible to: a) If you are using chained mbufs, keep old limitation of using singe mempool b) Serialize chained mbufs for KNI in userspace