Skip to content

Possible fixes/improvements/feedback #2

@alloncm

Description

@alloncm

Hi, just finished this training (solution available on my fork) and wanted to contribute back some of my experience.

Setup

  1. I completed this on Ubuntu 22.04 and had problem with the initial setup since tomli is not available on the python std lib in 3.10, worked around this by installing it manually pip install tomli
  2. At first I could not build the driver at all since the guest machine does not have make installed and the host buildroot cross compiler was not detected, only way I could make this work was to change CROSS_PREFIX := x86_64-buildroot-linux-gnu- to CROSS_PREFIX := x86_64-linux- here in order to build on host.
  3. Took some time to setup vscode intellisense and the Makefile extension was a nice solution, perhaps the guide can suggest how to setup this?

Development

  1. Could not find the allocation message in dmesg as suggested here (perhaps it expects me to log it?)
  2. Why would MSI-X not be available if the guest machine is known (as suggested here), is this purely for learning purpose or Im missing something about interrupts on Linux?
  3. On the mmap part, does the solution where we map the whole ring buffer could even work with dma_mmap_coherent as the guide suggested? I couldn't make this work and after chatting with claude it suggested that it is not possible to achieve the whole ring buffer mapped using a single mmap call without using remap_pfn_range instead (of-course claude could be wrong so wanted to verify if I had some problem with my implementation or the whole idea was to make me understand the different between those 2 functions).

At first I wanted to just open a PR to upstream my workarounds for the setup issues but figured out that 1 - Ubuntu 22.04 is pretty old, 2 - I might be missing something so its better to first discuss it here.

Any way thank you very much for this guide! it helped me a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions