On Mon, Nov 7, 2011 at 6:52 PM, Pravin B Shelar <[email protected]> wrote: > Signed-off-by: Pravin B Shelar <[email protected]> > --- > datapath/vport.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/datapath/vport.c b/datapath/vport.c > index 6fe6042..b8eecf8 100644 > --- a/datapath/vport.c > +++ b/datapath/vport.c > @@ -465,7 +465,7 @@ int vport_send(struct vport *vport, struct sk_buff *skb) > stats = per_cpu_ptr(vport->percpu_stats, smp_processor_id()); > > write_seqcount_begin(&stats->seqlock); > - stats->tx_packets++; > + stats->tx_packets += (sent != 0); > stats->tx_bytes += sent; > write_seqcount_end(&stats->seqlock);
Given that this entire thing becomes a no-op in the event that sent is zero, I think it would be better to put it in one big if block. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
