Skip to content

Conversation

@soburi
Copy link
Owner

@soburi soburi commented Nov 14, 2025

Summary

  • add event index tracking to virtqueues so used_event is maintained when the feature is negotiated
  • enable VIRTIO_RING_F_EVENT_IDX negotiation in the MMIO and PCI transports and propagate it to created queues

Testing

  • west build -b native_posix_64 samples/hello_world (fails: west not available in environment)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +60 to +64
vq->last_used_idx++;

if (cbe.cb) {
cbe.cb(cbe.opaque, used_len);
}
}
}
if (vq->event_idx_enabled) {
*vq->used_event = sys_cpu_to_le16(vq->last_used_idx);
barrier_dmem_fence_full();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include barrier header for new fence usage

The new event-idx handling in virtio_isr() writes to used_event and then calls barrier_dmem_fence_full() (lines 62‑64), but drivers/virtio/virtio_common.c still only includes logging, byteorder, and virtio headers (lines 7‑11). None of those headers declare barrier_dmem_fence_full(), so this translation unit now lacks a prototype for that function and fails to compile with implicit declaration of function ‘barrier_dmem_fence_full’ when built with the default C standard. Please add #include <zephyr/sys/barrier.h> to this file’s include list.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants