X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_kni%2Frte_kni.h;h=02ca43b4b15778cc08e8bf464539cfb34e2f282b;hb=1d4b2b4966bbb219afd2d7072ffba51f3a3067a5;hp=711c2a980a2d30285d58d67fe45a16dfd75f7190;hpb=528057df4c4fb5b5b45bd8060267cb4105eda212;p=dpdk.git diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h index 711c2a980a..02ca43b4b1 100644 --- a/lib/librte_kni/rte_kni.h +++ b/lib/librte_kni/rte_kni.h @@ -69,6 +69,7 @@ struct rte_kni_conf { __extension__ uint8_t force_bind : 1; /* Flag to bind kernel thread */ char mac_addr[ETHER_ADDR_LEN]; /* MAC address assigned to KNI */ + uint16_t mtu; }; /** @@ -80,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); /** @@ -227,6 +232,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. */