ethdev: remove rte_pmd_init_all function
[dpdk.git] / examples / qos_meter / main.c
index b94d55d..e1698cc 100755 (executable)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
@@ -82,6 +82,7 @@ static struct rte_mempool *pool = NULL;
  ***/
 static struct rte_eth_conf port_conf = {
        .rxmode = {
+               .mq_mode        = ETH_MQ_RX_RSS,
                .max_rx_pkt_len = ETHER_MAX_LEN,
                .split_hdr_size = 0,
                .header_split   = 0,
@@ -150,7 +151,6 @@ struct rte_meter_trtcm_params app_trtcm_params[] = {
        {.cir = 1000000 * 46,  .pir = 1500000 * 46,  .cbs = 2048, .pbs = 2048},
 };
 
-#define DIM(a)   (sizeof (a) / sizeof ((a)[0]))
 #define APP_FLOWS_MAX  256
 
 FLOW_METER app_flows[APP_FLOWS_MAX];
@@ -160,7 +160,7 @@ app_configure_flow_table(void)
 {
        uint32_t i, j;
 
-       for (i = 0, j = 0; i < APP_FLOWS_MAX; i ++, j = (j + 1) % DIM(PARAMS)){
+       for (i = 0, j = 0; i < APP_FLOWS_MAX; i ++, j = (j + 1) % RTE_DIM(PARAMS)){
                FUNC_CONFIG(&app_flows[i], &PARAMS[j]);
        }
 }
@@ -386,10 +386,6 @@ MAIN(int argc, char **argv)
        if (pool == NULL)
                rte_exit(EXIT_FAILURE, "Buffer pool creation error\n");
 
-       /* PMD init */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "PMD init error\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "PCI probe error\n");