X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_vhost%2Frte_vdpa.h;h=51a9a7b74782cefddf629f99a7b7d7ddc8158088;hb=e1494d05b214a8915942633efe69a8db9f314636;hp=a418da47cb290f6d6ac9acf2860c9e61bbd5b836;hpb=d0d4887d621f91fb27860a1bc93a17d484443b10;p=dpdk.git diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h index a418da47cb..51a9a7b747 100644 --- a/lib/librte_vhost/rte_vdpa.h +++ b/lib/librte_vhost/rte_vdpa.h @@ -11,6 +11,8 @@ * Device specific vhost lib */ +#include + #include #include "rte_vhost.h" @@ -155,4 +157,40 @@ rte_vdpa_get_device(int did); */ int __rte_experimental rte_vdpa_get_device_num(void); + +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice + * + * Enable/Disable host notifier mapping for a vdpa port. + * + * @param vid + * vhost device id + * @param enable + * true for host notifier map, false for host notifier unmap + * @return + * 0 on success, -1 on failure + */ +int __rte_experimental +rte_vhost_host_notifier_ctrl(int vid, bool enable); + +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice + * + * Synchronize the used ring from mediated ring to guest, log dirty + * page for each writeable buffer, caller should handle the used + * ring logging before device stop. + * + * @param vid + * vhost device id + * @param qid + * vhost queue id + * @param vring_m + * mediated virtio ring pointer + * @return + * number of synced used entries on success, -1 on failure + */ +int __rte_experimental +rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m); #endif /* _RTE_VDPA_H_ */