Hi, I am having trouble in identifying the code which is responsible for creating the threads..
So basically i compared /vnet/ip/ip4_forward.c ip4_lookup_inline and /vnet/ip/ip4_forward.c ip6 ip6_lookup_inline functions to understand where our filter has to be plugged in for ip6 lookup. But as we discussed we need to create 2 threads for our filter, one for filling up the filter from fib and other to filter the ips for lookup. The "ip6_lookup_inline" performs the lookup part, what i really want to know is, which part of the code is used to create the thread for filling the filter So i took a deeper look into the ip4_lookup_inline and ip4_mtrie, the [ ply_create ] <-- [ ip4_mtrie_init ] <-- [ ip4_create_fib_with_table_id ] Code : static ip4_fib_mtrie_leaf_t <https://docs.fd.io/vpp/16.12/d1/d88/ip4__mtrie_8h.html#a9403a0965f788d1806c6c78011789a47> 91 <https://docs.fd.io/vpp/16.12/df/d21/ip4__mtrie_8c.html#a66f2991da9e4aa0a5e6137c8342e0306> ply_create <https://docs.fd.io/vpp/16.12/df/d21/ip4__mtrie_8c.html#a66f2991da9e4aa0a5e6137c8342e0306> (ip4_fib_mtrie_t <https://docs.fd.io/vpp/16.12/dd/d4b/structip4__fib__mtrie__t.html> * m, ip4_fib_mtrie_leaf_t <https://docs.fd.io/vpp/16.12/d1/d88/ip4__mtrie_8h.html#a9403a0965f788d1806c6c78011789a47> init_leaf, uword <https://docs.fd.io/vpp/16.12/d9/d49/types_8h.html#a5e075c110dd9125d1a56d211f60f788c> prefix_len) 92 { 93 ip4_fib_mtrie_ply_t <https://docs.fd.io/vpp/16.12/d7/dda/structip4__fib__mtrie__ply__t.html> * p; 94 95 /* Get cache aligned ply. */ 96 pool_get_aligned <https://docs.fd.io/vpp/16.12/db/db7/pool_8h.html#aa046d24c36bc67690ab4ea2f819db598> (m->ply_pool <https://docs.fd.io/vpp/16.12/dd/d4b/structip4__fib__mtrie__t.html#a48d8ee171a480a983178c5e193414df8>, p, sizeof (p[0])); 97 98 ply_init <https://docs.fd.io/vpp/16.12/df/d21/ip4__mtrie_8c.html#a53d4b06f2a0c9ca0f6f50999b9501663> (p, init_leaf, prefix_len); 99 return ip4_fib_mtrie_leaf_set_next_ply_index <https://docs.fd.io/vpp/16.12/d1/d88/ip4__mtrie_8h.html#a34174646d1821083326bb968e715dc7c> (p - m->ply_pool <https://docs.fd.io/vpp/16.12/dd/d4b/structip4__fib__mtrie__t.html#a48d8ee171a480a983178c5e193414df8> ); 100 } functions are used to create the trie, but there is no threads involved in this is what i am seeing, please correct me if my understanding is wrong. Does the fib itself run on a multi threaded way so that, we dont have to explicitly create new threads for all functions which are utilized/called by the fib, or is there the plugin module which takes care of creating threads whenever new features are plugged in, say for example we create our "cuckoo_filter_create" function in "cuckoo.c" and we just call those functions with the prefix entries from the fib table and create the filter and return a pointer to our filter ? will this suffice in terms of threading. Hope i am clear and sorry for a long mail. Thanks, Pragash Vijayaragavan (pxv3...@rit.edu) ph : 585 764 4662
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev