diff options
| author | Ethan Jackson <ethan@nicira.com> | 2011-03-03 15:59:25 -0800 |
|---|---|---|
| committer | Ethan Jackson <ethan@nicira.com> | 2011-03-03 16:21:24 -0800 |
| commit | 9fe215f0f65c77593436e920cd07cf9bb24a7db8 (patch) | |
| tree | 069ac072d43f63e5815554900f066414c55c761e /ofproto | |
| parent | 0b13821fe00d918e24c71419355a10b65081a71a (diff) | |
| download | openvswitch-9fe215f0f65c77593436e920cd07cf9bb24a7db8.tar.gz | |
ofproto: facet_execute() stats changes.
facet_execute() should rely on facet_update_stats() to update the
relevant facet's used parameter.
Before this patch, in very rare cases, the current practice could
lead to assertion failures. The used value of a facet could be
slightly in the future due to the clocks being out of sync between
the kernel and user space. Thus manually setting the used
parameter of a facet could put it slightly behind an already pushed
used value causing an assertion failure.
Bug #4745.
Diffstat (limited to 'ofproto')
| -rw-r--r-- | ofproto/ofproto.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 590b792a1..49f99cbba 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2161,12 +2161,10 @@ facet_execute(struct ofproto *ofproto, struct facet *facet, assert(ofpbuf_headroom(packet) >= sizeof(struct ofp_packet_in)); flow_extract_stats(&facet->flow, packet, &stats); + stats.used = time_msec(); if (execute_odp_actions(ofproto, &facet->flow, facet->actions, facet->actions_len, packet)) { - facet->used = time_msec(); facet_update_stats(ofproto, facet, &stats); - netflow_flow_update_time(ofproto->netflow, - &facet->nf_flow, facet->used); } } |
