aboutsummaryrefslogtreecommitdiff
path: root/samples/server.c
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-03-09 16:24:27 +0000
committerGitHub <noreply@github.com>2021-03-09 16:24:27 +0000
commit997536eee6609827b5053afef497f94bc6f6dbf4 (patch)
tree5f2c556a8a1a8f5f991f84bb6e4ba975f0574d37 /samples/server.c
parenta8242d117118d5191dad69a96e28a21d66fe8b50 (diff)
downloadlibvfio-user-997536eee6609827b5053afef497f94bc6f6dbf4.zip
libvfio-user-997536eee6609827b5053afef497f94bc6f6dbf4.tar.gz
libvfio-user-997536eee6609827b5053afef497f94bc6f6dbf4.tar.bz2
remove vfu_irq_message() (#389)
This sends a message to a vfio-user client to trigger an IRQ, instead of writing to an eventfd. However, this isn't necessary on the cases we care about, where eventfds *are* available. Furthermore, this isn't something an API user should need to know about: if we ever care, the better way to do this is to make vfu_irq_trigger() automatically use a message if an eventfd isn't available. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples/server.c')
-rw-r--r--samples/server.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/samples/server.c b/samples/server.c
index 4391bca..cb966f5 100644
--- a/samples/server.c
+++ b/samples/server.c
@@ -580,15 +580,9 @@ int main(int argc, char *argv[])
if (ret == -1 && errno == EINTR) {
if (irq_triggered) {
irq_triggered = false;
- vfu_irq_trigger(vfu_ctx, 0);
- /*
- * Apart from triggering an IRQ via the eventfd, we also
- * trigger an IRQ via a message, simply for demonstrating how
- * it's done. The client expects this behavior from the server.
- */
- ret = vfu_irq_message(vfu_ctx, 0);
+ ret = vfu_irq_trigger(vfu_ctx, 0);
if (ret < 0) {
- err(EXIT_FAILURE, "vfu_irq_message() failed");
+ err(EXIT_FAILURE, "vfu_irq_trigger() failed");
}
/*