On 23 August 2014 10:47, Ben Pfaff <b...@nicira.com> wrote:

> xlate_push_stats() mostly does nothing if 'stats->n_packets' is 0.  This
> commit allows it to skip more complicated internal logic in that case.
>
> The one case I see in which xlate_push_stats() does do something if
> 'stats->n_packets' is 0 is in the case of a cached fin_timeout translation.
> That translation changes the idle and hard timeouts of a flow if tcp_flags
> has FIN or RST set, even if n_packets is 0.  But I don't think that can
> happen anyway; how would FIN or RST be set without receiving a packet?
>
> Signed-off-by: Ben Pfaff <b...@nicira.com>
>

That reasoning makes sense to me. More broadly, the xlate_push_stats
handles two functions - pushing stats and implementing side-effects from
actions. If there are no packets, the stats shouldn't need updating. If
there were no packets, then no packets could have hit actions for things
such as mac learning/openflow learning. So I'd expect it to be a no-op.

Acked-by: Joe Stringer <joestrin...@nicira.com>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to