Initially, My approach was to re-compile whole kernel from scratch but all hopes went down the moment I found out that it requires large amount of disk space.
Now, I'm trying to figure out how to compile only part of it.
The file I modified is net/ipv4/tcp_ipv4.c
I then followed following steps but lost at middle,
Downloaded kernel source files to /home/linux ran cp /boot/config-$(uname -r) .config make oldconfig make scripts prepare modules_prepare apt-get install linux-headers-$(uname -r) make -C . M=net/ipv4 make net/ipv4/tcp_ipv4.c
I don't know what to do next as the answers found on Stackoverflow are describing about building custom made modules.
An answer found on Stackoverflow (LINK) describes that it can't be done, and that it's only possible to compile whole Kernel.
"It can't be done. Just compile the whole kernel. After the first compilation, make will ensure only changed files are recompiled so future builds will be fast."
I had thought about using Google Drive as the HDD for full compile but it looks like there are lack of options doing that as-well.
My last option would be resizing the whole server.
I entered into /net/ipv4 dir via CD and tried
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules_install
and it outputs
Building modules, stage 2. MODPOST 61 modules FATAL: parse error in symbol dump file make: *** [scripts/Makefile.modpost:94: __modpost] Error 1 make: *** [Makefile:1632: modules] Error 2 make: Leaving directory '/usr/src/linux-headers-5.4.0-26-generic'