On 11/15/2019 11:18 AM, vattun...@marvell.com wrote: > From: Vamsi Attunuru <vattun...@marvell.com> > > Current KNI implementation only operates in IOVA_PA mode > patch adds required functionality to enable KNI in > IOVA_VA mode. > > KNI loopback mode tests will have performance impact in > this mode due to IOVA to KVA address translations. > However, In KNI real world use cases, the performace > impact will be based on Linux kernel stack and scheduler > latencies. Performance varies based on the KNI use case. > If bus iommu scheme is IOVA_DC and KNI module is loaded, > DPDK chooses IOVA as PA as existing behaviour. > > During KNI creation, app's iova_mode details are passed to > the KNI kernel module, accordingly kernel module translates > PA/IOVA addresses to KVA and vice-versa. > > Signed-off-by: Vamsi Attunuru <vattun...@marvell.com> > Signed-off-by: Kiran Kumar K <kirankum...@marvell.com> > Suggested-by: Ferruh Yigit <ferruh.yi...@intel.com> > --- > doc/guides/prog_guide/kernel_nic_interface.rst | 15 +++++++++++++++ > doc/guides/rel_notes/release_19_11.rst | 15 ++++++++++++++- > lib/librte_eal/linux/eal/eal.c | 23 ++++++++++++++++------- > lib/librte_kni/rte_kni.c | 6 ++++++ > 4 files changed, 51 insertions(+), 8 deletions(-) > > diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst > b/doc/guides/prog_guide/kernel_nic_interface.rst > index 2fd58e1..3bed18f 100644 > --- a/doc/guides/prog_guide/kernel_nic_interface.rst > +++ b/doc/guides/prog_guide/kernel_nic_interface.rst > @@ -300,6 +300,21 @@ The sk_buff is then freed and the mbuf sent in the tx_q > FIFO. > The DPDK TX thread dequeues the mbuf and sends it to the PMD via > ``rte_eth_tx_burst()``. > It then puts the mbuf back in the cache. > > +IOVA = VA: Support > +------------------ > + > +KNI operates in IOVA_VA scheme when > + > +- LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) and > +- eal option `iova-mode=va` is passed or bus IOVA scheme in the DPDK is > selected > + as RTE_IOVA_VA. > + > +KNI loopback mode tests will have performance impact in this mode due to > IOVA to > +KVA address translations. However, In KNI real world use cases, the > performace > +impact will be based on Linux kernel stack and scheduler latencies. > Performance > +varies based on the KNI use case. If bus iommu scheme is IOVA_DC and KNI > module > +is loaded, DPDK chooses IOVA as PA as existing behaviour.
I understand you are trying to neglect the affect but mentioning the Linux kernel stack and scheduler latency etc is confusing I think, also I am for mentioning the availability of the eal "--iova-mode=pa" option, what about following like more simple message: " Due to IOVA to KVA address translations, based on the KNI use case there can be a performance impact. For mitigation forcing IOVA to PA via eal "--iova-mode=pa" option can be used. " IOVA_DC bus iommu scheme resulting IOVA as PA either can be another paragraph I think, as a single sentences.