ethdev: init all builtin drivers
[dpdk.git] / examples / ipv4_multicast / main.c
index 91625a4..0ae8c3c 100644 (file)
@@ -341,9 +341,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
 
        /* copy metadata from source packet*/
        hdr->pkt.in_port = pkt->pkt.in_port;
-       hdr->pkt.vlan_tci = pkt->pkt.vlan_tci;
-       hdr->pkt.l2_len = pkt->pkt.l2_len;
-       hdr->pkt.l3_len = pkt->pkt.l3_len;
+       hdr->pkt.vlan_macip = pkt->pkt.vlan_macip;
        hdr->pkt.hash = pkt->pkt.hash;
 
        hdr->ol_flags = pkt->ol_flags;
@@ -703,14 +701,8 @@ MAIN(int argc, char **argv)
                rte_exit(EXIT_FAILURE, "Cannot init clone mbuf pool\n");
 
        /* init driver */
-#ifdef RTE_LIBRTE_IGB_PMD
-       if (rte_igb_pmd_init() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init igb pmd\n");
-#endif
-#ifdef RTE_LIBRTE_IXGBE_PMD
-       if (rte_ixgbe_pmd_init() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init ixgbe pmd\n");
-#endif
+       if (rte_pmd_init_all() < 0)
+               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
 
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");