summaryrefslogtreecommitdiff
path: root/lib/librte_kni/rte_kni.h
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2018-09-26 19:21:06 +0300
committerThomas Monjalon <thomas@monjalon.net>2018-10-02 17:57:00 +0200
commitedd2fafbc0b89bd98b23d4e34402bb79363cb70a (patch)
tree70422f7eefa127f1bcdec95a41202cdb10fc6856 /lib/librte_kni/rte_kni.h
parent559f003f21e93b113fa55ae2c1a4fc73a877e82b (diff)
downloaddpdk-edd2fafbc0b89bd98b23d4e34402bb79363cb70a.zip
dpdk-edd2fafbc0b89bd98b23d4e34402bb79363cb70a.tar.gz
dpdk-edd2fafbc0b89bd98b23d4e34402bb79363cb70a.tar.xz
kni: allocate memory dynamically for each device
Long time ago preallocation of memory for KNI was introduced in commit 0c6bc8e. It was done because of lack of ability to free previously allocated memzones, which led to memzone exhaustion. Currently memzones can be freed and this patch uses this ability for dynamic KNI memory allocation. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'lib/librte_kni/rte_kni.h')
-rw-r--r--lib/librte_kni/rte_kni.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
index 99055e2..601abdf 100644
--- a/lib/librte_kni/rte_kni.h
+++ b/lib/librte_kni/rte_kni.h
@@ -81,8 +81,12 @@ struct rte_kni_conf {
*
* @param max_kni_ifaces
* The maximum number of KNI interfaces that can coexist concurrently
+ *
+ * @return
+ * - 0 indicates success.
+ * - negative value indicates failure.
*/
-void rte_kni_init(unsigned int max_kni_ifaces);
+int rte_kni_init(unsigned int max_kni_ifaces);
/**