X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Flb%2Flbhash.h;h=585b377b8aa8f00c2f445afcdd935152685bbda2;hb=d9818dd68c162079f3ddb5443a78d0d91d55d0fe;hp=5d2ff24f044e5d64d0fd32166a0bb9ce376514fc;hpb=d6897c1597c4f0904d5956f7d794e3f001d52f72;p=vpp.git diff --git a/src/plugins/lb/lbhash.h b/src/plugins/lb/lbhash.h index 5d2ff24f044..585b377b8aa 100644 --- a/src/plugins/lb/lbhash.h +++ b/src/plugins/lb/lbhash.h @@ -84,7 +84,7 @@ lb_hash_t *lb_hash_alloc(u32 buckets, u32 timeout) return NULL; // Allocate 1 more bucket for prefetch - u32 size = ((u64)&((lb_hash_t *)(0))->buckets[0]) + + u32 size = ((uword)&((lb_hash_t *)(0))->buckets[0]) + sizeof(lb_hash_bucket_t) * (buckets + 1); u8 *mem = 0; lb_hash_t *h;