DPDK 22.11.5
Data Fields
rte_vhost_device_ops Struct Reference

#include <rte_vhost.h>

Data Fields

int(* new_device )(int vid)
 
void(* destroy_device )(int vid)
 
int(* vring_state_changed )(int vid, uint16_t queue_id, int enable)
 
int(* features_changed )(int vid, uint64_t features)
 
void(* guest_notified )(int vid)
 
void * reserved [1]
 

Detailed Description

Device and vring operations.

Examples
examples/vdpa/main.c, examples/vhost/main.c, examples/vhost_blk/vhost_blk.c, and examples/vhost_crypto/main.c.

Definition at line 276 of file rte_vhost.h.

Field Documentation

◆ new_device

int(* new_device) (int vid)

◆ destroy_device

void(* destroy_device) (int vid)

◆ vring_state_changed

int(* vring_state_changed) (int vid, uint16_t queue_id, int enable)

triggered when a vring is enabled or disabled

Examples
examples/vhost/main.c.

Definition at line 280 of file rte_vhost.h.

◆ features_changed

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.

Definition at line 288 of file rte_vhost.h.

◆ guest_notified

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.

Definition at line 299 of file rte_vhost.h.

◆ reserved

void* reserved[1]

Reserved for future extension

Definition at line 301 of file rte_vhost.h.


The documentation for this struct was generated from the following file: