diff options
Diffstat (limited to 'net/openvswitch/flow.c')
-rw-r--r-- | net/openvswitch/flow.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index 70bef2ab7f2b..da2fae0873a5 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c | |||
@@ -70,6 +70,7 @@ void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, | |||
70 | { | 70 | { |
71 | struct flow_stats *stats; | 71 | struct flow_stats *stats; |
72 | int node = numa_node_id(); | 72 | int node = numa_node_id(); |
73 | int len = skb->len + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0); | ||
73 | 74 | ||
74 | stats = rcu_dereference(flow->stats[node]); | 75 | stats = rcu_dereference(flow->stats[node]); |
75 | 76 | ||
@@ -105,7 +106,7 @@ void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, | |||
105 | if (likely(new_stats)) { | 106 | if (likely(new_stats)) { |
106 | new_stats->used = jiffies; | 107 | new_stats->used = jiffies; |
107 | new_stats->packet_count = 1; | 108 | new_stats->packet_count = 1; |
108 | new_stats->byte_count = skb->len; | 109 | new_stats->byte_count = len; |
109 | new_stats->tcp_flags = tcp_flags; | 110 | new_stats->tcp_flags = tcp_flags; |
110 | spin_lock_init(&new_stats->lock); | 111 | spin_lock_init(&new_stats->lock); |
111 | 112 | ||
@@ -120,7 +121,7 @@ void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, | |||
120 | 121 | ||
121 | stats->used = jiffies; | 122 | stats->used = jiffies; |
122 | stats->packet_count++; | 123 | stats->packet_count++; |
123 | stats->byte_count += skb->len; | 124 | stats->byte_count += len; |
124 | stats->tcp_flags |= tcp_flags; | 125 | stats->tcp_flags |= tcp_flags; |
125 | unlock: | 126 | unlock: |
126 | spin_unlock(&stats->lock); | 127 | spin_unlock(&stats->lock); |