netdev-dummy: Count rx packets regardless of source
authorSimon Horman <horms@verge.net.au>
Wed, 16 Oct 2013 10:17:01 +0000 (19:17 +0900)
committerBen Pfaff <blp@nicira.com>
Wed, 16 Oct 2013 16:08:30 +0000 (09:08 -0700)
commitb5799021ba92444cdb8ba0a85168a0175a72ee84
treef1129c564eb4900c3355cae4e743c11ed41c5886
parent48a5f330e33b1d115e15587472b32e476a0b9563
netdev-dummy: Count rx packets regardless of source

This alters the way rx packets are accounted for by
counting them when they are processed by netdev_dummy_rx_recv(),
which seems to be a common path used by all received packets.

Previously accounting was done earlier, in netdev_dummy_receive(),
however this does not appear to count packets that are received via
a socket.

This resolves packet counting errors reported by the following
OFtest tests:

port_stats.MultiFlowStats
port_stats.SingleFlowStats
pktact.WildcardPriorityWithDelete
pktact.WildcardPriority

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/netdev-dummy.c