LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   In linux kernel, why doesn't tcp_transmit_skb delete the skbuff in the write queue whereas udp_send_skb does (https://www.linuxquestions.org/questions/linux-networking-3/in-linux-kernel-why-doesnt-tcp_transmit_skb-delete-the-skbuff-in-the-write-queue-whereas-udp_send_skb-does-4175585626/)

gauravsuman007 07-27-2016 07:26 AM

In linux kernel, why doesn't tcp_transmit_skb delete the skbuff in the write queue whereas udp_send_skb does
 
Hello,
I'm trying to implement a new protocol on top of UDP in the linux kernel. I need to implement flow control for this protocol but when I use the function udp_send_skb(), the transmitted skbuff gets removed from the write queue.
How does TCP manage to send an skbuff without removing it from the queue? I think the relevant tcp function is tcp_transmit_skb().
Once I understand this behaviour in TCP, I can do that in UDP. Or maybe someone can point out what to change in udp_send_skb (or in the functions called by it) to ensure that the skbuff is not deleted.

smallpond 07-27-2016 01:36 PM

TCP is lossless so needs to resend a packet if it doesn't get an ack. Once UDP sends, it's gone.

nini09 08-02-2016 03:03 PM

If you implement new staff on top of UDP, it is easy way to use socket API.


All times are GMT -5. The time now is 02:45 PM.