From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 78A5D2C7A for ; Mon, 29 Aug 2016 16:45:24 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 29 Aug 2016 07:45:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,596,1464678000"; d="scan'208";a="872208953" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga003.jf.intel.com with ESMTP; 29 Aug 2016 07:45:21 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u7TEjK43015149 for ; Mon, 29 Aug 2016 15:45:20 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u7TEjKjm028123 for ; Mon, 29 Aug 2016 15:45:20 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u7TEjKYw028119 for spp@dpdk.org; Mon, 29 Aug 2016 15:45:20 +0100 X-Authentication-Warning: sivswdev02.ir.intel.com: fyigit set sender to ferruh.yigit@intel.com using -f From: Ferruh Yigit To: spp@dpdk.org Date: Mon, 29 Aug 2016 15:45:18 +0100 Message-Id: <1472481918-28086-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [spp] [PATCH] primary: remove ivshmem support X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 14:45:26 -0000 DPDK dropped ivshmem support: c711ccb30987 ("ivshmem: remove library and its EAL integration") This patch is to remove ivshmem support from spp to fix compilation. Signed-off-by: Ferruh Yigit --- src/primary/init.c | 76 ------------------------------------------------------ 1 file changed, 76 deletions(-) diff --git a/src/primary/init.c b/src/primary/init.c index d4675c6..5ea21f9 100644 --- a/src/primary/init.c +++ b/src/primary/init.c @@ -34,7 +34,6 @@ #include #include -#include #include #include @@ -44,9 +43,6 @@ #define CLIENT_QUEUE_RINGSIZE 128 -#define IVSHMEN_METADATA_NAME "pp_ivshmem" -#define QEMU_CMD_FMT "/tmp/ivshmem_qemu_cmdline_%s" - /* array of info/queues for clients */ struct client *clients; @@ -129,45 +125,6 @@ init_shm_rings(void) return 0; } -static int -print_to_file(const char *cmdline, const char *config_name) -{ - FILE *file; - char path[PATH_MAX]; - - snprintf(path, sizeof(path), QEMU_CMD_FMT, config_name); - file = fopen(path, "w"); - if (file == NULL) { - RTE_LOG(ERR, APP, "Could not open '%s'\n", path); - return -1; - } - - RTE_LOG(INFO, APP, "QEMU command line for config '%s': %s\n", - config_name, cmdline); - - fprintf(file, "%s\n", cmdline); - fclose(file); - - return 0; -} - -static int -generate_ivshmem_cmdline(const char *config_name) -{ - char cmdline[PATH_MAX]; - - if (rte_ivshmem_metadata_cmdline_generate(cmdline, sizeof(cmdline), - config_name) < 0) - return -1; - - if (print_to_file(cmdline, config_name) < 0) - return -1; - - rte_ivshmem_metadata_dump(stdout, config_name); - - return 0; -} - /** * Main init function for the multi-process server app, * calls subfunctions to do each stage of the initialisation. @@ -231,38 +188,5 @@ init(int argc, char *argv[]) /* initialise the client queues/rings for inter-eu comms */ init_shm_rings(); - if (rte_eal_process_type() == RTE_PROC_PRIMARY) { - int ret; - - /* create metadata, output cmdline */ - ret = rte_ivshmem_metadata_create(IVSHMEN_METADATA_NAME); - if (ret < 0) - rte_exit(EXIT_FAILURE, - "Cannot create IVSHMEM metadata\n"); - - ret = rte_ivshmem_metadata_add_memzone(mz, - IVSHMEN_METADATA_NAME); - if (ret) - rte_exit(EXIT_FAILURE, - "Cannot add memzone to IVSHMEM metadata\n"); - - ret = rte_ivshmem_metadata_add_mempool(pktmbuf_pool, - IVSHMEN_METADATA_NAME); - if (ret) - rte_exit(EXIT_FAILURE, - "Cannot add mbuf mempool to IVSHMEM metadata\n"); - - for (i = 0; i < num_clients; i++) { - ret = rte_ivshmem_metadata_add_ring(clients[i].rx_q, - IVSHMEN_METADATA_NAME); - if (ret < 0) - rte_exit(EXIT_FAILURE, - "Cannot add ring client %d to IVSHMEM metadata\n", - i); - } - - generate_ivshmem_cmdline(IVSHMEN_METADATA_NAME); - } - return 0; } -- 2.7.4