Hi Dave, Could you please let me know what params do you use for testing the “test_bihash_template” executable?
vec64 options is passing, but other than that I am struggling to use without segmentation faults. For this test, I don’t have any changes in the test_bihash_template or bihash_template.[hc] files.. # test_bihash_template nitems 1234 nbuckets 16384 ncycles 10 Segmentation fault Thanks Vijay From: <vpp-dev@lists.fd.io> on behalf of "Vijayabhaskar Katamreddy via Lists.Fd.Io" <vkatamre=cisco....@lists.fd.io> Reply-To: "Vijay Katamreddy (vkatamre)" <vkata...@cisco.com> Date: Wednesday, August 8, 2018 at 9:53 PM To: "Dave Barach (dbarach)" <dbar...@cisco.com> Cc: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] format_bihash not printing all the elements Thank you Dave or your email ! “The test replaces many, many keys on purpose.” I did not pay attention to the above, rather I was counting the number of times inserted and display wise. Once I made keys unique all the time, its working as expected! Thanks Vijay From: "Dave Barach (dbarach)" <dbar...@cisco.com> Date: Wednesday, August 8, 2018 at 5:14 PM To: "Vijay Katamreddy (vkatamre)" <vkata...@cisco.com> Cc: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> Subject: RE: format_bihash not printing all the elements What is the maximum value of j at the start of the inner loop? Note that kv.key = i. The test replaces many, many keys on purpose. Set TESTS += test_bihash_template in vppinfra.am From: Vijay Katamreddy (vkatamre) Sent: Wednesday, August 8, 2018 3:47 PM To: Dave Barach (dbarach) <dbar...@cisco.com> Cc: vpp-dev@lists.fd.io Subject: Re: format_bihash not printing all the elements Hi Dave, I took code from the below routine in test_bihash_template.c test_bihash_vec64 (test_main_t * tm) { … } for (j = 0; j < 3; j++) { for (i = 1; i <= j * 1000 + 1; i++) { kv.key = i; kv.value = 1; BV (clib_bihash_add_del) (h, &kv, 1 /* is_add */ ); } } And changed 10 to 3.. that inserts 3003 elements. And calling clib_format_bihash to print it, and I am seeing 2001 elements. Could you please let me know how to build and run test_bihash_template.c .. so that I can add a print routine there it self and try and can share the diffs thanks Vijay From: "Dave Barach (dbarach)" <dbar...@cisco.com<mailto:dbar...@cisco.com>> Date: Wednesday, August 8, 2018 at 3:41 PM To: "Vijay Katamreddy (vkatamre)" <vkata...@cisco.com<mailto:vkata...@cisco.com>> Cc: "vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>" <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Subject: RE: format_bihash not printing all the elements No known issues at that level. Since this sounds like a test code, can you share it? Thanks... Dave From: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> On Behalf Of Vijayabhaskar Katamreddy via Lists.Fd.Io Sent: Wednesday, August 8, 2018 3:14 PM To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Subject: [vpp-dev] format_bihash not printing all the elements Hi, I am add/search and experimenting with bihash, and when I use format_bihash to print the keys/values.. active_elements count is printing incorrectly as well not printing all the values. I am inserting 3003 elements in 16_8 bihash, but only 2001 elements are printed, any known issues? I know that all the 3003 elements are in the list, as I am doing search, and able to find the same in the same hash table Thanks Vijay
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10102): https://lists.fd.io/g/vpp-dev/message/10102 Mute This Topic: https://lists.fd.io/mt/24232911/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-