Softnet question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



How come the softnet stats total is incremented in both netif_rx() and
netif_receive_skb() in net/core/dev.c in the kernel 

netif_rx()
	__get_cpu_var(netdev_rx_stat).total++;


netif_receive_skb()
	 __get_cpu_var(netdev_rx_stat).total++;


It is my understanding that a non-NAPI NIC driver calls netif_rx() to
place incoming packets on the backlog queue. The poll method for the
backlog queue is process_backlog() which processes the packets. It calls
netif_receive_skb() which in turns calls the ingress filter and then
passes the packet to its registered protcol handler. 

In this case it appears to me that the total is incremented twice for a
packet on its path up the network stack. Is my understanding of this
incorrect ?


Jonathan Lynch
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux