diff options
Diffstat (limited to 'lib/librte_kni/rte_kni.h')
-rw-r--r-- | lib/librte_kni/rte_kni.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h index 99055e2c..02ca43b4 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); /** @@ -229,6 +233,26 @@ int rte_kni_register_handlers(struct rte_kni *kni, struct rte_kni_ops *ops); int rte_kni_unregister_handlers(struct rte_kni *kni); /** + * Update link carrier state for KNI port. + * + * Update the linkup/linkdown state of a KNI interface in the kernel. + * + * @param kni + * pointer to struct rte_kni. + * @param linkup + * New link state: + * 0 for linkdown. + * > 0 for linkup. + * + * @return + * On failure: -1 + * Previous link state == linkdown: 0 + * Previous link state == linkup: 1 + */ +int __rte_experimental +rte_kni_update_link(struct rte_kni *kni, unsigned int linkup); + +/** * Close KNI device. */ void rte_kni_close(void); |