Skip to contentSkip to conversation

Is the TCP-code threaded?

DISCUSSION Kristian Evensen 3 participants 3 messages Feb 23, 2007 – Feb 24, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

I have been looking quite deeply into the TCP-code, but there is one thing I simply dont manage to understand. Can the code process more than one skb on a socket at the time, or is it strictly one and one?

E.g say that you are going to send something (an skb), and you recieve an ack at the same time. Will the kernel finish whatever of the two comes first (say, finish sending) or can it, in the middle of treating the new packet to send, do a switch and process the ack?

Thanks,
Kristian

#1 lore raw
Quoted 11 lines · Kristian Evensen

Hello,

I have been looking quite deeply into the TCP-code, but there is one thing I simply dont manage to understand. Can the code process more than one skb on a socket at the time, or is it strictly one and one?

E.g say that you are going to send something (an skb), and you recieve an ack at the same time. Will the kernel finish whatever of the two comes first (say, finish sending) or can it, in the middle of treating the new packet to send, do a switch and process the ack?

send happes in process context, recv in interrupt context...isn't it?

#2 lore raw
Quoted 7 lines · kalash nainwal
Quoted 6 lines · Kristian Evensen

Hello,

I have been looking quite deeply into the TCP-code, but there is one thing I simply dont manage to understand. Can the code process more than one skb on a socket at the time, or is it strictly one and one?

Quoted 6 lines
Quoted 5 lines

E.g say that you are going to send something (an skb), and you recieve an ack at the same time. Will the kernel finish whatever of the two comes first (say, finish sending) or can it, in the middle of treating the new packet to send, do a switch and process the ack?

send happes in process context, recv in interrupt context...isn't it?

Hum, except if sending is delayed because of lack of windows, waiting for ack etc. In this case, sending may be delayed to soft-irq and single-threaded with reception (data are processed in soft-irq)..

Is this correct ?

Cyprien