PlatformLab / HomaModule

A Linux kernel module that implements the Homa transport protocol.
175 stars 43 forks source link

compilation failed with Fedora38 #47

Closed mikehb closed 1 month ago

mikehb commented 1 year ago

It works on Fedora37 with kernel 6.4.15-100, while it failed on Fedora38 with kernel 6.5.5-200

[mikehuang@fedora HomaModule]$ make
make -C /lib/modules/6.5.5-200.fc38.x86_64/build M=/home/mikehuang/Downloads/HomaModule modules
make[1]: Entering directory '/usr/src/kernels/6.5.5-200.fc38.x86_64'
  CC [M]  /home/mikehuang/Downloads/HomaModule/homa_incoming.o
  CC [M]  /home/mikehuang/Downloads/HomaModule/homa_offload.o
  CC [M]  /home/mikehuang/Downloads/HomaModule/homa_outgoing.o
  CC [M]  /home/mikehuang/Downloads/HomaModule/homa_peertab.o
  CC [M]  /home/mikehuang/Downloads/HomaModule/homa_pool.o
  CC [M]  /home/mikehuang/Downloads/HomaModule/homa_plumbing.o
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:79:10: error: ‘const struct proto_ops’ has no member named ‘sendpage’
   79 |         .sendpage          = sock_no_sendpage,
      |          ^~~~~~~~
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:79:30: error: ‘sock_no_sendpage’ undeclared here (not in a function); did you mean ‘sock_no_sendmsg’?
   79 |         .sendpage          = sock_no_sendpage,
      |                              ^~~~~~~~~~~~~~~~
      |                              sock_no_sendmsg
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:101:10: error: ‘const struct proto_ops’ has no member named ‘sendpage’
  101 |         .sendpage          = sock_no_sendpage,
      |          ^~~~~~~~
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:117:30: error: initialization of ‘int (*)(struct sock *, int,  int *)’ from incompatible pointer type ‘int (*)(struct sock *, int,  long unsigned int)’ [-Werror=incompatible-pointer-types]
  117 |         .ioctl             = homa_ioctl,
      |                              ^~~~~~~~~~
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:117:30: note: (near initialization for ‘homa_prot.ioctl’)
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:124:10: error: ‘struct proto’ has no member named ‘sendpage’
  124 |         .sendpage          = homa_sendpage,
      |          ^~~~~~~~
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:124:30: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
  124 |         .sendpage          = homa_sendpage,
      |                              ^~~~~~~~~~~~~
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:124:30: note: (near initialization for ‘homa_prot’)
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:124:30: error: initialization of ‘void (*)(struct socket *)’ from incompatible pointer type ‘int (*)(struct sock *, struct page *, int,  size_t,  int)’ {aka ‘int (*)(struct sock *, struct page *, int,  long unsigned int,  int)’} [-Werror=incompatible-pointer-types]
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:124:30: note: (near initialization for ‘homa_prot.splice_eof’)
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:145:30: error: initialization of ‘int (*)(struct sock *, int,  int *)’ from incompatible pointer type ‘int (*)(struct sock *, int,  long unsigned int)’ [-Werror=incompatible-pointer-types]
  145 |         .ioctl             = homa_ioctl,
      |                              ^~~~~~~~~~
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:145:30: note: (near initialization for ‘homav6_prot.ioctl’)
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:152:10: error: ‘struct proto’ has no member named ‘sendpage’
  152 |         .sendpage          = homa_sendpage,
      |          ^~~~~~~~
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:152:30: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
  152 |         .sendpage          = homa_sendpage,
      |                              ^~~~~~~~~~~~~
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:152:30: note: (near initialization for ‘homav6_prot’)
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:152:30: error: initialization of ‘void (*)(struct socket *)’ from incompatible pointer type ‘int (*)(struct sock *, struct page *, int,  size_t,  int)’ {aka ‘int (*)(struct sock *, struct page *, int,  long unsigned int,  int)’} [-Werror=incompatible-pointer-types]
/home/mikehuang/Downloads/HomaModule/homa_plumbing.c:152:30: note: (near initialization for ‘homav6_prot.splice_eof’)
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /home/mikehuang/Downloads/HomaModule/homa_plumbing.o] Error 1
make[2]: *** [/usr/src/kernels/6.5.5-200.fc38.x86_64/Makefile:2046: /home/mikehuang/Downloads/HomaModule] Error 2
make[1]: *** [Makefile:246: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.5.5-200.fc38.x86_64'
make: *** [Makefile:22: all] Error 2
johnousterhout commented 1 year ago

Thanks for the information. I haven't tried Homa on 6.5.5 (I'm currently on 6.1.38). I suspect these will all be easy to fix when I make my next Linux upgrade.

sulaimansuhas commented 7 months ago

@mikehb I have submitted a PR that might be of interest to you. It should work fine for everything except possibly homa_abort()

johnousterhout commented 1 month ago

I just upgraded Homa to run under 6.10.6, so all of the above issues have now been fixed.