Skip to content
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

Error while building #17

Open
goyalanurag opened this issue Oct 30, 2021 · 0 comments
Open

Error while building #17

goyalanurag opened this issue Oct 30, 2021 · 0 comments

Comments

@goyalanurag
Copy link

Hi! I am trying to build the module on Ubuntu 20.04 having kernel version 5.4.0 . After running the make command I get the following errors:

make -C /lib/modules/5.4.0-26-generic/build M=/home/ubuntu/Desktop/tcptuner/module modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-26-generic'
  CC [M]  /home/ubuntu/Desktop/tcptuner/module/tcp_tuner.o
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c: In function ‘bictcp_update’:
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c:223:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  223 |       (s32)(tcp_time_stamp - ca->last_time) <= HZ / 32) {
      |       ^
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c:231:41: warning: comparison between pointer and integer
  231 |   if (ca->epoch_start && tcp_time_stamp == ca->last_time) {
      |                                         ^~
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c:236:17: warning: assignment to ‘u32’ {aka ‘unsigned int’} from ‘u32 (*)(const struct tcp_sock *)’ {aka ‘unsigned int (*)(const struct tcp_sock *)’} makes integer from pointer without a cast [-Wint-conversion]
  236 |   ca->last_time = tcp_time_stamp;
      |                 ^
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c:239:21: warning: assignment to ‘u32’ {aka ‘unsigned int’} from ‘u32 (*)(const struct tcp_sock *)’ {aka ‘unsigned int (*)(const struct tcp_sock *)’} makes integer from pointer without a cast [-Wint-conversion]
  239 |     ca->epoch_start = tcp_time_stamp;                    /* record beginning */
      |                     ^
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c:271:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  271 |   t = (s32)(tcp_time_stamp - ca->epoch_start);
      |       ^
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c: In function ‘hystart_update’:
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c:408:9: error: implicit declaration of function ‘NET_INC_STATS_BH’; did you mean ‘NET_INC_STATS’? [-Werror=implicit-function-declaration]
  408 |         NET_INC_STATS_BH(sock_net(sk),
      |         ^~~~~~~~~~~~~~~~
      |         NET_INC_STATS
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c:410:9: error: implicit declaration of function ‘NET_ADD_STATS_BH’; did you mean ‘NET_ADD_STATS’? [-Werror=implicit-function-declaration]
  410 |         NET_ADD_STATS_BH(sock_net(sk),
      |         ^~~~~~~~~~~~~~~~
      |         NET_ADD_STATS
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c: In function ‘bictcp_acked’:
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c:454:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  454 |   if (ca->epoch_start && (s32)(tcp_time_stamp - ca->epoch_start) < HZ) {
      |                          ^
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c: At top level:
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c:481:21: error: initialization of ‘void (*)(struct sock *, const struct ack_sample *)’ from incompatible pointer type ‘void (*)(struct sock *, u32,  s32)’ {aka ‘void (*)(struct sock *, unsigned int,  int)’} [-Werror=incompatible-pointer-types]
  481 |   .pkts_acked     = bictcp_acked,
      |                     ^~~~~~~~~~~~
/home/ubuntu/Desktop/tcptuner/module/tcp_tuner.c:481:21: note: (near initialization for ‘cubictcp.pkts_acked’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:275: /home/ubuntu/Desktop/tcptuner/module/tcp_tuner.o] Error 1
make[1]: *** [Makefile:1719: /home/ubuntu/Desktop/tcptuner/module] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-26-generic'
make: *** [Makefile:4: all] Error 2

Kindly help me with this.

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

No branches or pull requests

1 participant