update copyright date to 2013
[dpdk.git] / examples / l3fwd-vf / main.c
index 9e2d9ab..6e8726e 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -193,10 +193,11 @@ static struct rte_eth_conf port_conf = {
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
-                       .rss_hf = ETH_RSS_IPV4,
+                       .rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6,
                },
        },
        .txmode = {
+               .mq_mode = ETH_DCB_NONE,
        },
 };
 
@@ -478,9 +479,9 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, lookup_struct_t * l3fwd
        if (dst_port >= MAX_PORTS || (enabled_port_mask & 1 << dst_port) == 0)
                dst_port = portid;
 
-       /* 00:09:c0:00:00:xx */
+       /* 02:00:00:00:00:xx */
        tmp = &eth_hdr->d_addr.addr_bytes[0];
-       *((uint64_t *)tmp) = 0x000000c00900 + (dst_port << 24);
+       *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40);
 
 #ifdef DO_RFC_1812_CHECKS
        /* Update time to live and header checksum */
@@ -967,17 +968,8 @@ MAIN(int argc, char **argv)
                rte_exit(EXIT_FAILURE, "init_mem failed\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");
-
-       if (rte_ixgbevf_pmd_init() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init ixgbevf 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");