X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fipv4_multicast%2Fmain.c;h=1fb28513b02b46c0c070000afbad86ab95c96a7d;hb=5ec3eb3b839ded5f0f04754721475433bf5d69df;hp=464b54689148101e1ef3d781ab708edf6b145425;hpb=70febdcfd60f278be598ec9bcf1ff5bb5c5a59a8;p=dpdk.git diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index 464b546891..1fb28513b0 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -155,10 +155,6 @@ static struct mcast_group_params mcast_group_table[] = { {RTE_IPV4(224,0,0,115), 0xF}, }; -#define N_MCAST_GROUPS \ - (sizeof (mcast_group_table) / sizeof (mcast_group_table[0])) - - /* Send burst of packets on an output interface */ static void send_burst(struct lcore_queue_conf *qconf, uint16_t port) @@ -555,7 +551,7 @@ init_mcast_hash(void) return -1; } - for (i = 0; i < N_MCAST_GROUPS; i ++){ + for (i = 0; i < RTE_DIM(mcast_group_table); i++) { if (rte_fbk_hash_add_key(mcast_hash, mcast_group_table[i].ip, mcast_group_table[i].port_mask) < 0) { @@ -783,7 +779,11 @@ main(int argc, char **argv) qconf->tx_queue_id[portid] = queueid; queueid++; } - rte_eth_allmulticast_enable(portid); + ret = rte_eth_allmulticast_enable(portid); + if (ret < 0) + rte_exit(EXIT_FAILURE, + "rte_eth_allmulticast_enable: err=%d, port=%d\n", + ret, portid); /* Start device */ ret = rte_eth_dev_start(portid); if (ret < 0)