Skip to content

Failed to build with Linux v6.11 #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jserv opened this issue Apr 30, 2025 · 0 comments · Fixed by #74
Closed

Failed to build with Linux v6.11 #73

jserv opened this issue Apr 30, 2025 · 0 comments · Fixed by #74

Comments

@jserv
Copy link
Contributor

jserv commented Apr 30, 2025

Reported by CI, on a Linux v6.11 host:

make -C /lib/modules/6.11.0-1012-azure/build M=/home/runner/work/vwifi/vwifi modules
  cc -std=gnu99 -Wno-declaration-after-statement -o vwifi-tool vwifi-tool.c
  make[1]: Entering directory '/usr/src/linux-headers-6.11.0-1012-azure'
  warning: the compiler differs from the one used to build the kernel
    The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
    You are using:           gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
    CC [M]  /home/runner/work/vwifi/vwifi/vwifi.o
  /home/runner/work/vwifi/vwifi/vwifi.c: In function ‘vwifi_virtio_init_vqs’:
  /home/runner/work/vwifi/vwifi/vwifi.c:3170:60: error: passing argument 4 of ‘virtio_find_vqs’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   3170 |     return virtio_find_vqs(vdev, VWIFI_NUM_VQS, vwifi_vqs, callbacks, names,
        |                                                            ^~~~~~~~~
        |                                                            |
        |                                                            void (**)(struct virtqueue *)
  In file included from /home/runner/work/vwifi/vwifi/vwifi.c:11:
  ./include/linux/virtio_config.h:223:43: note: expected ‘struct virtqueue_info *’ but argument is of type ‘void (**)(struct virtqueue *)’
    223 |                     struct virtqueue_info vqs_info[],
        |                     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  /home/runner/work/vwifi/vwifi/vwifi.c:3170:71: error: passing argument 5 of ‘virtio_find_vqs’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   3170 |     return virtio_find_vqs(vdev, VWIFI_NUM_VQS, vwifi_vqs, callbacks, names,
        |                                                                       ^~~~~
        |                                                                       |
        |                                                                       const char **
  ./include/linux/virtio_config.h:224:42: note: expected ‘struct irq_affinity *’ but argument is of type ‘const char **’
    224 |                     struct irq_affinity *desc)
        |                     ~~~~~~~~~~~~~~~~~~~~~^~~~
  /home/runner/work/vwifi/vwifi/vwifi.c:3170:12: error: too many arguments to function ‘virtio_find_vqs’
   3170 |     return virtio_find_vqs(vdev, VWIFI_NUM_VQS, vwifi_vqs, callbacks, names,
        |            ^~~~~~~~~~~~~~~
  ./include/linux/virtio_config.h:221:5: note: declared here
    221 | int virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
        |     ^~~~~~~~~~~~~~~
  cc1: some warnings being treated as errors
  make[3]: *** [scripts/Makefile.build:244: /home/runner/work/vwifi/vwifi/vwifi.o] Error 1
  make[2]: *** [/usr/src/linux-headers-6.11.0-[101](https://github.com/sysprog21/vwifi/actions/runs/14741735868/job/41392812159#step:4:102)2-azure/Makefile:1932: /home/runner/work/vwifi/vwifi] Error 2
  make[1]: *** [Makefile:224: __sub-make] Error 2
  make[1]: Leaving directory '/usr/src/linux-headers-6.11.0-1012-azure'
  make: *** [Makefile:11: kmod] Error 2
  cpp/autobuilder: trying to run make [current dir: /home/runner/work/vwifi/vwifi]
  make -C /lib/modules/6.11.0-1012-azure/build M=/home/runner/work/vwifi/vwifi modules
  make[1]: Entering directory '/usr/src/linux-headers-6.11.0-1012-azure'
  warning: the compiler differs from the one used to build the kernel
    The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
    You are using:           gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
    CC [M]  /home/runner/work/vwifi/vwifi/vwifi.o
  /home/runner/work/vwifi/vwifi/vwifi.c: In function ‘vwifi_virtio_init_vqs’:
  /home/runner/work/vwifi/vwifi/vwifi.c:3170:60: error: passing argument 4 of ‘virtio_find_vqs’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   3170 |     return virtio_find_vqs(vdev, VWIFI_NUM_VQS, vwifi_vqs, callbacks, names,
        |                                                            ^~~~~~~~~
        |                                                            |
        |                                                            void (**)(struct virtqueue *)
  In file included from /home/runner/work/vwifi/vwifi/vwifi.c:11:
  ./include/linux/virtio_config.h:223:43: note: expected ‘struct virtqueue_info *’ but argument is of type ‘void (**)(struct virtqueue *)’
    223 |                     struct virtqueue_info vqs_info[],
        |                     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  /home/runner/work/vwifi/vwifi/vwifi.c:3170:71: error: passing argument 5 of ‘virtio_find_vqs’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   3170 |     return virtio_find_vqs(vdev, VWIFI_NUM_VQS, vwifi_vqs, callbacks, names,
        |                                                                       ^~~~~
        |                                                                       |
        |                                                                       const char **
  ./include/linux/virtio_config.h:224:42: note: expected ‘struct irq_affinity *’ but argument is of type ‘const char **’
    224 |                     struct irq_affinity *desc)
        |                     ~~~~~~~~~~~~~~~~~~~~~^~~~
  /home/runner/work/vwifi/vwifi/vwifi.c:3170:12: error: too many arguments to function ‘virtio_find_vqs’
   3170 |     return virtio_find_vqs(vdev, VWIFI_NUM_VQS, vwifi_vqs, callbacks, names,
        |            ^~~~~~~~~~~~~~~
  ./include/linux/virtio_config.h:221:5: note: declared here
    221 | int virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
        |     ^~~~~~~~~~~~~~~
  cc1: some warnings being treated as errors
  make[3]: *** [scripts/Makefile.build:244: /home/runner/work/vwifi/vwifi/vwifi.o] Error 1
horseface1110 added a commit to horseface1110/vwifi that referenced this issue May 27, 2025
To align with the virtio subsystem changes introduced in Linux kernel
v6.11 API, this commit updates the virtqueue setup logic to use
`struct virtqueue_info` and the new `virtio_find_vqs()` interface.

The old `virtio_find_vqs()` interface has been reworked and renamed to
use `struct virtqueue_info` starting from Linux 6.11, replacing the
legacy helpers entirely.

Since the original code uses `virtio_find_vqs()` (which internally
passes `NULL` for ctx), `ctx` is conservatively set to `false`.

ref:
Introduce struct virtqueue_info and find_vqs_info() config op
torvalds/linux@c502eb8

Rename virtio_find_vqs_info() to virtio_find_vqs
torvalds/linux@6c85d6b

Remove legacy virtio_find_vqs() and virtio_find_vqs_ctx() helpers
torvalds/linux@3e8d51c

Closes sysprog21#73
horseface1110 added a commit to horseface1110/vwifi that referenced this issue May 27, 2025
To align with the virtio subsystem changes introduced in Linux kernel
v6.11 API, this commit updates the virtqueue setup logic to use
`struct virtqueue_info` and the new `virtio_find_vqs()` interface.

The old `virtio_find_vqs()` interface has been reworked and renamed to
use `struct virtqueue_info` starting from Linux 6.11, replacing the
legacy helpers entirely.

Since the original code uses `virtio_find_vqs()` (which internally
passes `NULL` for ctx), `ctx` is conservatively set to `false`.

ref:
Introduce struct virtqueue_info and find_vqs_info() config op
torvalds/linux@c502eb8

Rename virtio_find_vqs_info() to virtio_find_vqs
torvalds/linux@6c85d6b

Remove legacy virtio_find_vqs() and virtio_find_vqs_ctx() helpers
torvalds/linux@3e8d51c

Closes sysprog21#73
@jserv jserv closed this as completed in #74 Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant