summaryrefslogtreecommitdiff
path: root/examples/multi_process/client_server_mp
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2014-09-26 13:42:51 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-09-29 13:08:53 +0200
commit68fa37e021a1c44c6b2a947cefc20eb61c729947 (patch)
tree1c78336e4b2e5793e4b2e4d64a10f82532b09aac /examples/multi_process/client_server_mp
parent6bc2415c3387ae72f2ce3677f0e3540e734583d5 (diff)
downloaddpdk-68fa37e021a1c44c6b2a947cefc20eb61c729947.zip
dpdk-68fa37e021a1c44c6b2a947cefc20eb61c729947.tar.gz
dpdk-68fa37e021a1c44c6b2a947cefc20eb61c729947.tar.xz
examples: do not probe pci twice
Since commit a155d430119 ("support link bonding device initialization"), rte_eal_pci_probe() is called in rte_eal_init(). So it doesn't have to be called by application anymore. It has been fixed for testpmd in commit 2950a769315, and this patch remove it from other applications. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: David Marchand <david.marchand@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Diffstat (limited to 'examples/multi_process/client_server_mp')
-rw-r--r--examples/multi_process/client_server_mp/mp_client/client.c3
-rw-r--r--examples/multi_process/client_server_mp/mp_server/init.c6
-rw-r--r--examples/multi_process/client_server_mp/shared/init_drivers.h49
3 files changed, 0 insertions, 58 deletions
diff --git a/examples/multi_process/client_server_mp/mp_client/client.c b/examples/multi_process/client_server_mp/mp_client/client.c
index ee2338c..af8f819 100644
--- a/examples/multi_process/client_server_mp/mp_client/client.c
+++ b/examples/multi_process/client_server_mp/mp_client/client.c
@@ -65,7 +65,6 @@
#include <rte_string_fns.h>
#include "common.h"
-#include "init_drivers.h"
/* Number of packets to attempt to read from queue */
#define PKT_READ_SIZE ((uint16_t)32)
@@ -240,8 +239,6 @@ main(int argc, char *argv[])
if (parse_app_args(argc, argv) < 0)
rte_exit(EXIT_FAILURE, "Invalid command-line arguments\n");
- if (init_drivers() < 0)
- rte_exit(EXIT_FAILURE, "Cannot get NIC ports\n");
if (rte_eth_dev_count() == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c
index a84d1ee..30518c0 100644
--- a/examples/multi_process/client_server_mp/mp_server/init.c
+++ b/examples/multi_process/client_server_mp/mp_server/init.c
@@ -66,7 +66,6 @@
#include <rte_cycles.h>
#include "common.h"
-#include "init_drivers.h"
#include "args.h"
#include "init.h"
#include "main.h"
@@ -308,11 +307,6 @@ init(int argc, char *argv[])
argc -= retval;
argv += retval;
- /* initialise the nic drivers */
- retval = init_drivers();
- if (retval != 0)
- rte_exit(EXIT_FAILURE, "Cannot initialise drivers\n");
-
/* get total number of ports */
total_ports = rte_eth_dev_count();
diff --git a/examples/multi_process/client_server_mp/shared/init_drivers.h b/examples/multi_process/client_server_mp/shared/init_drivers.h
deleted file mode 100644
index 3c9881f..0000000
--- a/examples/multi_process/client_server_mp/shared/init_drivers.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * BSD LICENSE
- *
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Intel Corporation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _INIT_DRIVERS_H_
-#define _INIT_DRIVERS_H_
-
-/**
- * Initialise all 1G and 10G NICs available
- */
-static inline int
-init_drivers(void)
-{
- if (rte_eal_pci_probe() < 0)
- return -1;
-
- return 0;
-}
-
-#endif