Results 1 to 2 of 2
Dear all,
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, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-31-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 1
Processor time spent on Network stack
Dear all,
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 ?
Thank you
karthikmatrix
- 05-31-2008 #2Just Joined!
- Join Date
- Apr 2005
- Location
- Romania
- Posts
- 42
Hi,
1. Try to run your program with strace:
strace -c -r -T ./program
2.
#include <time.h>
#include <iostream.h>
main() {
clock_t start, stop;
start=clock();
<-Your code here->
stop=clock();
cout<<"Total time:"<< (double)(stop-start)/CLOCK_PER_SEC<<"sec"<<"\n";
return 0;
}
Has Your TOE a packet generator too ?


Reply With Quote
