When a TCP/IP Connection is established, is all handled at the network interface (NIC) level or does it also hit the OS kernel? If so, is it expensive to the CPU (in terms of CPU cycles)?
closed as not a real question by Shane Madden, EightBitTony, Tom O'Connor♦, sysadmin1138♦ Dec 16 '12 at 19:40
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.
The OS kernel implements the TCP/IP stack which means it manages the TCP/IP connections/packets. The NIC (& its network driver) handles usually the physical and data link layers in spite it can handle some other functionalities like the case of TCP off-loading.
You can have a look at this link to see an example of the involved calls within Linux kernel when a packet is received/sent. Although it is old (kernel 2.4.x), it is still can be useful to get a better idea.
Whether it is expensive or not depends on the functionality you are implementing and the size of traffic. There is no simple answer to this!