diff mbox series

[ovs-dev,RFC,ovn,01/10] ovn-northd.c: Fix datapath tunnel key allocation.

Message ID 1569623665-77390-2-git-send-email-hzhou8@ebay.com
State RFC
Headers show
Series OVN Interconnection | expand

Commit Message

Han Zhou Sept. 27, 2019, 10:34 p.m. UTC
From: Han Zhou <hzhou8@ebay.com>

The max tunnel key for datapath is defined as (1u << 24) - 1, but
we are using uint16_t variable to hold the value, which will result
in duplicated key when there are enough number of datapath key
allocation and deletions.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
---
 northd/ovn-northd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 2df95c1..1bb60ce 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -1006,7 +1006,7 @@  build_datapaths(struct northd_context *ctx, struct hmap *datapaths,
 
         /* Add southbound record for each unmatched northbound record. */
         LIST_FOR_EACH (od, list, &nb_only) {
-            uint16_t tunnel_key = ovn_datapath_allocate_key(&dp_tnlids);
+            uint32_t tunnel_key = ovn_datapath_allocate_key(&dp_tnlids);
             if (!tunnel_key) {
                 break;
             }