rte_vhost_device_ops(3)
π rte_vhost_device_ops(3) π
okay bestie, welcome to the manual page for rte_vhost_device_ops β that's the Library Functions Manual one, and yes we're doing the whole thing, every field, no skips, periodt. β¨
πΈ NAME πΈ
rte_vhost_device_ops β the struct that holds all your device and vring ops, and she is iconic.
π¦ SYNOPSIS π¦
#include <rte_vhost.h>
β¨ Data Fields β¨
int(* new_device )(int vid)β add device πvoid(* destroy_device )(int vid)β remove device, bye bestie πint(* vring_state_changed )(int vid, uint16_t queue_id, int enable)β fired when a vring gets enabled or disabledint(* features_changed )(int vid, uint64_t features)β fired when features changevoid(* guest_notified )(int vid)β called every time the guest gets notified about waiting packetsbool(* guest_notify )(int vid, uint16_t queue_id)β if you register this, notification to the guest can be handled by the front-end callingrte_vhost_notify_guest()
π Detailed Description π
Device and vring operations.
Definition at line 277 of file rte_vhost.h.
π Field Documentation π
int(* new_device) (int vid)
Add device. like, welcome to the function pointer family π«Ά
Definition at line 278 of file rte_vhost.h.
void(* destroy_device) (int vid)
Remove device. she's leaving the group chat π
Definition at line 279 of file rte_vhost.h.
int(* vring_state_changed) (int vid, uint16_t queue_id, int enable)
triggered when a vring is enabled or disabled β lowkey the vibe check for your queue π₯
Definition at line 281 of file rte_vhost.h.
int(* features_changed) (int vid, uint64_t features)
Features could be changed after the feature negotiation. For example, VHOST_F_LOG_ALL will be set/cleared at the start/end of live migration, respectively. This callback is used to inform the application on such change. so basically: features can shift under you, and this is how you get told, no cap β¨
Definition at line 289 of file rte_vhost.h.
void(* guest_notified) (int vid)
This callback gets called each time a guest gets notified about waiting packets. This is the interrupt handling through the eventfd_write(callfd), which can be used for counting these "slow" syscalls. counting the slow ones is such a main character move tbh π
Definition at line 300 of file rte_vhost.h.
bool(* guest_notify) (int vid, uint16_t queue_id)
If this callback is registered, notification to the guest can be handled by the front-end calling rte_vhost_notify_guest(). If it's not handled, 'false' should be returned. This can be used to remove the "slow" eventfd_write() syscall from the datapath. like, get that syscall out of the datapath, she does NOT belong there π
Definition at line 308 of file rte_vhost.h.
π Author π
Generated automatically by Doxygen for DPDK from the source code. (not me writing prose for once, the robot did it π€β¨)
that's the whole page bestie, every field, every line number, every word β nothing dropped, nothing invented. ate and left no crumbs. π
and that's a wrap on rte_vhost_device_ops(3) from DPDK, Version 25.11.3 π mwah, go write some callbacks π
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms