diff options
author | Ben Pfaff <blp@nicira.com> | 2011-01-04 17:00:36 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-01-27 21:08:38 -0800 |
commit | 1ba530f4b2cd5476a224dbbf87a3089a831a24b6 (patch) | |
tree | 1a45e81e1e06ce0478a80e9786971b55df4530b1 /lib/dpif.c | |
parent | ea7bd5973fb426f3a6ea66b0953c6000980e77ec (diff) |
datapath: Drop queue information from odp_stats.
This queue information will be available through the kernel socket layer
once we move over to Netlink socket as transports, so we might as well get
rid of the redundancy.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'lib/dpif.c')
-rw-r--r-- | lib/dpif.c | 24 |
1 files changed, 4 insertions, 20 deletions
@@ -1030,30 +1030,14 @@ dpif_recv(struct dpif *dpif, struct dpif_upcall *upcall) } /* Discards all messages that would otherwise be received by dpif_recv() on - * 'dpif'. Returns 0 if successful, otherwise a positive errno value. */ -int + * 'dpif'. */ +void dpif_recv_purge(struct dpif *dpif) { - struct odp_stats stats; - unsigned int i; - int error; - COVERAGE_INC(dpif_purge); - - error = dpif_get_dp_stats(dpif, &stats); - if (error) { - return error; - } - - for (i = 0; i < stats.max_miss_queue + stats.max_action_queue + stats.max_sflow_queue; i++) { - struct dpif_upcall upcall; - error = dpif_recv(dpif, &upcall); - if (error) { - return error == EAGAIN ? 0 : error; - } - ofpbuf_delete(upcall.packet); + if (dpif->dpif_class->recv_purge) { + dpif->dpif_class->recv_purge(dpif); } - return 0; } /* Arranges for the poll loop to wake up when 'dpif' has a message queued to be |