vppinfra: fixing compilation issues in 32-bit 60/24360/2
authorVijayabhaskar Katamreddy <vkatamre@cisco.com>
Wed, 15 Jan 2020 21:45:19 +0000 (13:45 -0800)
committerDave Barach <openvpp@barachs.net>
Thu, 16 Jan 2020 15:16:43 +0000 (15:16 +0000)
Fixing compilation issuues for 32-bit also setting init flag for shm based bihash

Type: fix
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: Ic2072c5ba7fc77d061ca9f1b844a71f6e22e58b2

src/vppinfra/bihash_template.c

index b090041..dda3596 100644 (file)
@@ -32,7 +32,7 @@ static inline void *BV (alloc_aligned) (BVT (clib_bihash) * h, uword nbytes)
   return (void *) (uword) (rv + alloc_arena (h));
 }
 
-void BV (clib_bihash_instantiate) (BVT (clib_bihash) * h)
+static void BV (clib_bihash_instantiate) (BVT (clib_bihash) * h)
 {
   uword bucket_size;
 
@@ -185,6 +185,7 @@ void BV (clib_bihash_master_init_svm)
   h->freelists = (void *) (freelist_vh->vector_data);
 
   h->fmt_fn = NULL;
+  h->instantiated = 1;
 }
 
 void BV (clib_bihash_slave_init_svm)
@@ -269,7 +270,7 @@ never_initialized:
        }
     }
   clib_warning ("Couldn't find hash table %llx on clib_all_bihashes...",
-               (u64) h);
+               (u64) (uword) h);
 }
 
 static