Network Device Driver Interface

sahil aggarwal sahilagg0693 at gmail.com
Tue Apr 28 04:18:05 EDT 2015


Hi

I enabled sampling on net_dev_queue and net_dev_xmit using
perf_event_open(). This is what i get for cmd:  ping google.com -c 1

TID:21608 PID:21608  TIME:1022501870535899 CPU:5 DEV_QUEUE Skb:
0xffff880fc6389000 Len:98
TID:21608 PID:21608  TIME:1022501870541280 CPU:5 DEV_QUEUE Skb:
0xffff880fc6389000 Len:98
TID:21608 PID:21608  TIME:1022501870119689 CPU:7 DEV_QUEUE Skb:
0xffff880fc6389000 Len:70
TID:21608 PID:21608  TIME:1022501902225838 CPU:5 DEV_QUEUE Skb:
0xffff880fc4156100 Len:86
TID:21608 PID:21608  TIME:1022501870128677 CPU:7 DEV_XMIT Skb:
0xffff880fc6389000 Len:70 Ret:0
TID:21608 PID:21608  TIME:1022501870545283 CPU:5 DEV_XMIT Skb:
0xffff880fc6389000 Len:98 Ret:0
TID:21608 PID:21608  TIME:1022501870547378 CPU:5 DEV_XMIT Skb:
0xffff880fc6389000 Len:98 Ret:0
TID:21608 PID:21608  TIME:1022501902232222 CPU:5 DEV_XMIT Skb:
0xffff880fc4156100 Len:86 Ret:0
TID:21608 PID:21608  TIME:1022501870132327 CPU:7 DEV_RECV Skb:
0xffff880fc6389000 Len: 56
TID:21608 PID:21608  TIME:1022501902235039 CPU:5 DEV_RECV Skb:
0xffff880fc4156100 Len: 72
TID:21608 PID:21608  TIME:1022501870125880 CPU:7 DEV_RX Skb:
0xffff880fc6389000 Len: 56
TID:21608 PID:21608  TIME:1022501902229768 CPU:5 DEV_RX Skb:
0xffff880fc4156100 Len: 72


Here, net_dev_queue is called multiple times for same skb with changed
length. What i understood till now reading this:
http://www.cubrid.org/blog/dev-platform/understanding-tcp-ip-network-stack/
 was that skb received by device driver from IP layer is queued by
__dev_queue_xmit(): tracepoint net_dev_queue() exist here
 and transmitted to network device by
dev_hard_start_xmit(): tracepoint net_dev_xmit() exist here.

So, what is making it to queue skb again and what data it is adding to skb.?


Thanks
Regards



More information about the Kernelnewbies mailing list