summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--lib/dpif-netdev.c2
-rw-r--r--lib/dpif.h2
-rw-r--r--utilities/ovs-dpctl.c4
4 files changed, 5 insertions, 4 deletions
diff --git a/AUTHORS b/AUTHORS
index 1c2d9eabd..2632f108b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -39,6 +39,7 @@ Edouard Bourguignon madko@linuxed.net
Edward Tomasz NapieraƂa trasz@freebsd.org
Ethan Jackson ethan@nicira.com
Flavio Leitner fbl@redhat.com
+Francesco Fusco ffusco@redhat.com
FUJITA Tomonori fujita.tomonori@lab.ntt.co.jp
Gaetano Catalli gaetano.catalli@gmail.com
Geoffrey Wossum gwossum@acm.org
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index b4d76fc1f..aa08446c7 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -407,7 +407,7 @@ dpif_netdev_get_stats(const struct dpif *dpif, struct dpif_dp_stats *stats)
stats->n_hit = dp->n_hit;
stats->n_missed = dp->n_missed;
stats->n_lost = dp->n_lost;
- stats->n_masks = UINT64_MAX;
+ stats->n_masks = UINT32_MAX;
stats->n_mask_hit = UINT64_MAX;
ovs_mutex_unlock(&dp_netdev_mutex);
diff --git a/lib/dpif.h b/lib/dpif.h
index d447a8656..974fbbfe7 100644
--- a/lib/dpif.h
+++ b/lib/dpif.h
@@ -413,9 +413,9 @@ struct dpif_dp_stats {
uint64_t n_missed; /* Number of flow table misses. */
uint64_t n_lost; /* Number of misses not sent to userspace. */
uint64_t n_flows; /* Number of flows present. */
- uint64_t n_masks; /* Number of mega flow masks. */
uint64_t n_mask_hit; /* Number of mega flow masks visited for
flow table matches. */
+ uint32_t n_masks; /* Number of mega flow masks. */
};
int dpif_get_dp_stats(const struct dpif *, struct dpif_dp_stats *);
diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c
index bd9983475..09db084c4 100644
--- a/utilities/ovs-dpctl.c
+++ b/utilities/ovs-dpctl.c
@@ -561,11 +561,11 @@ show_dpif(struct dpif *dpif)
printf("\tlookups: hit:%"PRIu64" missed:%"PRIu64" lost:%"PRIu64"\n"
"\tflows: %"PRIu64"\n",
stats.n_hit, stats.n_missed, stats.n_lost, stats.n_flows);
- if (stats.n_masks != UINT64_MAX) {
+ if (stats.n_masks != UINT32_MAX) {
uint64_t n_pkts = stats.n_hit + stats.n_missed;
double avg = n_pkts ? (double) stats.n_mask_hit / n_pkts : 0.0;
- printf("\tmasks: hit:%"PRIu64" total:%"PRIu64" hit/pkt:%.2f\n",
+ printf("\tmasks: hit:%"PRIu64" total:%"PRIu32" hit/pkt:%.2f\n",
stats.n_mask_hit, stats.n_masks, avg);
}
}