MCPcopy Create free account
hub / github.com/F-Stack/f-stack / init_mcast_hash

Function init_mcast_hash

dpdk/examples/ipv4_multicast/main.c:560–580  ·  view source on GitHub ↗

Hash object is created and loaded. 8< */

Source from the content-addressed store, hash-verified

558
559/* Hash object is created and loaded. 8< */
560static int
561init_mcast_hash(void)
562{
563 uint32_t i;
564
565 mcast_hash_params.socket_id = rte_socket_id();
566 mcast_hash = rte_fbk_hash_create(&mcast_hash_params);
567 if (mcast_hash == NULL){
568 return -1;
569 }
570
571 for (i = 0; i < RTE_DIM(mcast_group_table); i++) {
572 if (rte_fbk_hash_add_key(mcast_hash,
573 mcast_group_table[i].ip,
574 mcast_group_table[i].port_mask) < 0) {
575 return -1;
576 }
577 }
578
579 return 0;
580}
581/* >8 End of hash object is created and loaded. */
582
583/* Check the link status of all ports in up to 9s, and print them finally */

Callers 1

mainFunction · 0.85

Calls 3

rte_socket_idFunction · 0.85
rte_fbk_hash_createFunction · 0.85
rte_fbk_hash_add_keyFunction · 0.85

Tested by

no test coverage detected