kni: support userspace VA
authorVamsi Attunuru <vattunuru@marvell.com>
Sun, 17 Nov 2019 15:12:43 +0000 (16:12 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 18 Nov 2019 15:00:51 +0000 (16:00 +0100)
commite73831dc6c26441bfa910d65aab486043f432b12
tree6693c17f5044609e1454f79e94d7fff89567a8ac
parent1407b0752eee2353160701d0182c7e911ccb538a
kni: support userspace VA

Patch adds support for kernel module to work in IOVA = VA mode by
providing address translation routines to convert userspace VA to
kernel VA.

KNI performance using PA is not changed by this patch.
But comparing KNI using PA to KNI using VA, the latter will have lower
performance due to the cost of the added translation.

This translation is implemented only with kernel versions starting 4.6.0.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
kernel/linux/kni/compat.h
kernel/linux/kni/kni_dev.h
kernel/linux/kni/kni_misc.c
kernel/linux/kni/kni_net.c
lib/librte_eal/linux/eal/include/rte_kni_common.h