Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- May 2008
Processor time spent on Network stack
Can anyone help me out in finding the processor time spent on the kernel network stack ? I have a TCP/IP offload Engine module that bypasses the INET, TCP and IP layers of the linux network stack and directs the incoming packets onto the gigabit ethernet card. Now I have to prove that the time spent by CPU on my module is less than the time spent on the existing kernel stack. The first function of the INET that is called after the BSD socket layer is inet_create( ) [this is in /net/ipv4/af_inet.c] and the last function that the CPU executes is ip_finish_output2( ) [this is in /net/ipv4/ip_output.c]. I require some means to fetch the time at the beginning and then at the end. At the user level time( ) function does it but what about in the kernel level ?
- Join Date
- Apr 2005
1. Try to run your program with strace:
strace -c -r -T ./program
clock_t start, stop;
<-Your code here->
cout<<"Total time:"<< (double)(stop-start)/CLOCK_PER_SEC<<"sec"<<"\n";
Has Your TOE a packet generator too ?