|
@@ -73,6 +73,7 @@ void ovs_flow_stats_update(struct sw_flow *flow, struct sk_buff *skb)
|
|
|
|
|
|
if ((flow->key.eth.type == htons(ETH_P_IP) ||
|
|
if ((flow->key.eth.type == htons(ETH_P_IP) ||
|
|
flow->key.eth.type == htons(ETH_P_IPV6)) &&
|
|
flow->key.eth.type == htons(ETH_P_IPV6)) &&
|
|
|
|
+ flow->key.ip.frag != OVS_FRAG_TYPE_LATER &&
|
|
flow->key.ip.proto == IPPROTO_TCP &&
|
|
flow->key.ip.proto == IPPROTO_TCP &&
|
|
likely(skb->len >= skb_transport_offset(skb) + sizeof(struct tcphdr))) {
|
|
likely(skb->len >= skb_transport_offset(skb) + sizeof(struct tcphdr))) {
|
|
tcp_flags = TCP_FLAGS_BE16(tcp_hdr(skb));
|
|
tcp_flags = TCP_FLAGS_BE16(tcp_hdr(skb));
|
|
@@ -91,7 +92,7 @@ static void stats_read(struct flow_stats *stats,
|
|
unsigned long *used, __be16 *tcp_flags)
|
|
unsigned long *used, __be16 *tcp_flags)
|
|
{
|
|
{
|
|
spin_lock(&stats->lock);
|
|
spin_lock(&stats->lock);
|
|
- if (time_after(stats->used, *used))
|
|
|
|
|
|
+ if (!*used || time_after(stats->used, *used))
|
|
*used = stats->used;
|
|
*used = stats->used;
|
|
*tcp_flags |= stats->tcp_flags;
|
|
*tcp_flags |= stats->tcp_flags;
|
|
ovs_stats->n_packets += stats->packet_count;
|
|
ovs_stats->n_packets += stats->packet_count;
|