path: root/lib/librte_kni/rte_kni.h
diff options
authorBruce Richardson <>2015-05-27 14:47:49 +0100
committerThomas Monjalon <>2015-06-16 16:15:39 +0200
commitfdaff83d1ee1519662c74e9b4e2b51d55007a659 (patch)
treef5df014e468f22e1bdd418d1eb9f957af662772e /lib/librte_kni/rte_kni.h
parentae19d71c80804bb5e7fd94df308268b132497294 (diff)
kni: query the name of an instance
When a KNI object is created, a name is assigned to it which is stored internally. There is also an API function to look up a KNI object by name, but there is no API to query the current name of an existing KNI object. This patch adds just such an API. Signed-off-by: Bruce Richardson <> Acked-by: Helin Zhang <>
Diffstat (limited to 'lib/librte_kni/rte_kni.h')
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
index 603e2cd..fd2b78f 100644
--- a/lib/librte_kni/rte_kni.h
+++ b/lib/librte_kni/rte_kni.h
@@ -248,6 +248,16 @@ extern uint8_t rte_kni_get_port_id(struct rte_kni *kni) \
extern struct rte_kni *rte_kni_get(const char *name);
+ * Get the name given to a KNI device
+ *
+ * @param kni
+ * The KNI instance to query
+ * @return
+ * The pointer to the KNI name
+ */
+extern const char *rte_kni_get_name(const struct rte_kni *kni);
* Get the KNI context of the specific port.
* Note: It is deprecated and just for backward compatibility.