Without this patch "ovs-appctl dpctl/ct-bkts" produces the following output:
Total Buckets: 1 Current Connections: 10246 +-----------+-----------------------------------------+ | Buckets | Connections per Buckets | +-----------+-----------------------------------------+ 0.. 7 | 10246 with this patch applied, the output becomes: Total Buckets: 1024 Current Connections: 95956 +-----------+-----------------------------------------+ | Buckets | Connections per Buckets | +-----------+-----------------------------------------+ 0.. 7 | 87 100 90 91 92 92 101 83 8.. 15 | 98 86 80 91 92 93 92 84 16.. 23 | 82 114 103 90 94 80 95 96 ... 1000..1007 | 98 88 106 100 91 99 89 81 1008..1015 | 97 99 93 67 102 97 89 86 1016..1023 | 113 79 97 86 106 93 80 90 Signed-off-by: Paolo Valerio <pvale...@redhat.com> --- lib/conntrack.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/conntrack.c b/lib/conntrack.c index 1ad29325c..00c183c48 100644 --- a/lib/conntrack.c +++ b/lib/conntrack.c @@ -2694,7 +2694,7 @@ tuple_to_conn_key(const struct ct_dpif_tuple *tuple, uint16_t zone, static void conn_to_ct_dpif_entry(const struct conn *conn, struct ct_dpif_entry *entry, - long long now) + long long now, unsigned int bkt) { const struct conn_key *key = &conn->key_node[CT_DIR_FWD].key, *rev_key = &conn->key_node[CT_DIR_REV].key; @@ -2718,6 +2718,7 @@ conn_to_ct_dpif_entry(const struct conn *conn, struct ct_dpif_entry *entry, ovs_mutex_unlock(&conn->lock); entry->timeout = (expiration > 0) ? expiration / 1000 : 0; + entry->bkt = bkt; if (conn->alg) { /* Caller is responsible for freeing. */ @@ -2743,7 +2744,7 @@ conntrack_dump_start(struct conntrack *ct, struct conntrack_dump *dump, } dump->ct = ct; - *ptot_bkts = 1; /* Need to clean up the callers. */ + *ptot_bkts = CONNTRACK_BUCKETS; return 0; } @@ -2775,7 +2776,7 @@ conntrack_dump_next(struct conntrack_dump *dump, struct ct_dpif_entry *entry) if ((!dump->filter_zone || keyn->key.zone == dump->zone) && (keyn->dir == CT_DIR_FWD)) { - conn_to_ct_dpif_entry(conn, entry, now); + conn_to_ct_dpif_entry(conn, entry, now, dump->bucket); break; } } _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev