Functions to modify - sid1607/linux-3.14.65-src GitHub Wiki
-
INTERCEPTING TCP RETRANSMISSIONS
- Timeout based retransmit - tcp_timer.c:344 - *void tcp_retransmit_timer(struct sock sk) Intercept this function, set state and call again later in callback
- Fast retransmit - tcp_output.c:2505 - *void tcp_xmit_retransmit_queue(struct sock sk) Intercept this, set state and call again in callback
-
tcp_output.c:852 - tcp_transmit_skb - sock, sk_buff, clone_it, gfp_mask
- Intercept this function to make it deadline aware
-
Important functions
- sock.c:2390 - void sock_init_data(struct socket *sock, struct sock *sk)
- sock.c:1504 - void sk_free(struct sock *sk)
- sock.c:986 - int sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen)
-
Add locks and intercept here:
- tcp_output.c:2511 - void tcp_xmit_retransmit_queue(struct sock *sk)
- tcp_output.c:1852 - static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, int push_one, gfp_t gfp)
-
Resources
- Kernel atomic types - http://www.makelinux.net/books/lkd2/ch09lev1sec1
- Kernel GDB - http://elinux.org/Debugging_The_Linux_Kernel_Using_Gdb
- Kernel timers - http://www.ibm.com/developerworks/library/l-timers-list/
- More about timers - http://www.makelinux.net/ldd3/chp-7-sect-4
- TCP Output Handling
- TCP Socket Bufs
- Linux IP Networking
- Linux network stack - http://www.cubrid.org/blog/dev-platform/understanding-tcp-ip-network-stack/
-
Papers
- An Evaluation of Network Stack Parallelization Strategies in Modern Operating Systems - https://www.usenix.org/legacy/event/usenix06/tech/full_papers/willmann/willmann_html/Paper_html.html