projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
odp-util: Use PRIu8 instead of PRId8 when printing ip_proto.
[openvswitch]
/
datapath
/
vport.c
diff --git
a/datapath/vport.c
b/datapath/vport.c
index 6fe6042a7fefbc4dd165fc756d07671d1fb1da92..a6b686c85928c1ea389b447f8a997d1fa2a02310 100644
(file)
--- a/
datapath/vport.c
+++ b/
datapath/vport.c
@@
-459,16
+459,18
@@
void vport_receive(struct vport *vport, struct sk_buff *skb)
*/
int vport_send(struct vport *vport, struct sk_buff *skb)
{
*/
int vport_send(struct vport *vport, struct sk_buff *skb)
{
- struct vport_percpu_stats *stats;
int sent = vport->ops->send(vport, skb);
int sent = vport->ops->send(vport, skb);
- stats = per_cpu_ptr(vport->percpu_stats, smp_processor_id());
+ if (likely(sent)) {
+ struct vport_percpu_stats *stats;
- write_seqcount_begin(&stats->seqlock);
- stats->tx_packets++;
- stats->tx_bytes += sent;
- write_seqcount_end(&stats->seqlock);
+ stats = per_cpu_ptr(vport->percpu_stats, smp_processor_id());
+ write_seqcount_begin(&stats->seqlock);
+ stats->tx_packets++;
+ stats->tx_bytes += sent;
+ write_seqcount_end(&stats->seqlock);
+ }
return sent;
}
return sent;
}