You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: don't duplicate VIRTIO_F_* constants in generated modules
Add a dedicated virtio_config.rs module that is bindgen'd from
virtio_config.h and contains exactly the VIRTIO_F constants. This avoid
the VIRTIO_F constants being redefined across bindgen'd modules for the
block, net and rng devices (or in the case of the balloon device, avoids
one device using another's bindgen module). Since this completely
eliminates all contents from virtio_rng.rs, delete that module.
Note that for some reason, my laptop's virtio_config.h was missing half
the constants, despite upstream 6.8 headers containing them. So I
bindgen'd this file on a .metal where all the constants were present in
the header.
Lastly, there's the question of the vsock modules, which has manually
written bindings in the uapi module, contained in `vsock/mod.rs`. I
tried autogenerating these, but bindgen chokes on the enum-constants
contained in virtio_vsock.h, so I'm leaving that as-is for now, apart
from deduplicating the VIRTIO_F_* constants.
Signed-off-by: Patrick Roy <[email protected]>
0 commit comments