kni: add deprecation warning at runtime

When KNI is being used at runtime, output a warning message about its
deprecated status. This is part of the deprecation process for KNI
agreed by the DPDK technical board.[1]

[1] https://mails.dpdk.org/archives/dev/2022-June/243596.html

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
Bruce Richardson 2022-10-10 11:44:47 +01:00 committed by David Marchand
parent bbaf917565
commit 66f624e4ea
2 changed files with 4 additions and 4 deletions

View File

@ -37,10 +37,8 @@ Deprecation Notices
applications - other technologies such as virtio-user are recommended instead. applications - other technologies such as virtio-user are recommended instead.
Following the DPDK technical board Following the DPDK technical board
`decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_ `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_: and `refinement <https://mails.dpdk.org/archives/dev/2022-June/243596.html>`_,
the KNI kernel module, library and PMD will be removed from the DPDK 23.11 release.
* Some deprecation warnings will be added in DPDK 22.11.
* The KNI kernel module, library and PMD will be removed from the DPDK 23.11.
* lib: will fix extending some enum/define breaking the ABI. There are multiple * lib: will fix extending some enum/define breaking the ABI. There are multiple
samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is

View File

@ -96,6 +96,8 @@ static volatile int kni_fd = -1;
int int
rte_kni_init(unsigned int max_kni_ifaces __rte_unused) rte_kni_init(unsigned int max_kni_ifaces __rte_unused)
{ {
RTE_LOG(WARNING, KNI, "WARNING: KNI is deprecated and will be removed in DPDK 23.11\n");
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
if (rte_eal_iova_mode() != RTE_IOVA_PA) { if (rte_eal_iova_mode() != RTE_IOVA_PA) {
RTE_LOG(ERR, KNI, "KNI requires IOVA as PA\n"); RTE_LOG(ERR, KNI, "KNI requires IOVA as PA\n");