Q:

Division in linux kernel

Is it possible to divide in linux kernel and use double values?
When I tried:
typedef struct{ 
    ...
    long long int sbe;
    ...
} connection;

hook_func(){
  connection* found 
  ...
  uint32_t time_misec ..
  uint32_t bytes_diff ..
  ...
  double be = bytes_diff / time_misec;
  found->sbe = be / 2 + found->sbe / 2;
  ...
}

I got errors:
WARNING: "__fixunsdfsi" [/home/kir/netfilter/hello.ko] undefined!
WARNING: "__adddf3" [/home/kir/netfilter/hello.ko] undefined!
WARNING: "__floatdidf" [/home/kir/netfilter/hello.ko] undefined!
WARNING: "__muldf3" [/home/kir/netfilter/hello.ko] undefined!
WARNING: "__floatunsidf" [/home/kir/netfilter/hello.ko] undefined!

A:

For most CPU, there is no floating point support in the Linux kernel. The reason is to avoid the high cost of saving FPU registers.

