From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by dpdk.org (Postfix) with ESMTP id 5F30AB3B1 for ; Tue, 26 Aug 2014 16:07:07 +0200 (CEST) Received: by mail-wi0-f182.google.com with SMTP id d1so4229020wiv.15 for ; Tue, 26 Aug 2014 07:11:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=Qcs/Z3nuHKYy3ncMNhKTepjRrO4gbulO5xBgkU6enT4=; b=TnvQKry5I03uwG+5eNVvsIMYVv7Nu/+xOCh0inLsUhLCD5Gh2S6D82FgOtKb1qQ9c2 YjFw3OKWLaConMYIDH4Xucd4PlwzeTker2BNugUsPpZkYy2L01QAVN+lQxywB6Cu9bv0 ce22WxC9/sxM/4BpngUJHTgXQ9znb58uSKHN4WMqXtLcj9RMkYakQ3O/jm9z+X05N4iQ uOhH8Sx0CeHy0d4HWfYWa5q/8bfYoLH5qD6pkDSUcB83Haq6VDSrUD+iw2uAUtb0VuY3 scCZTgNF1oQWRlhfzjNLx/r6VPB6Uj1H/jeB/kGDVWreaK5+Mzk//lpXjDOtT8ZUw+EJ XeAA== X-Gm-Message-State: ALoCoQkOoV2VZxWiPoGUsGJRGe2uKrNGxhwBi2N65Qez3lXrphKjbK5bjwSLP8rTS0u8IcOyJca4 X-Received: by 10.181.12.7 with SMTP id em7mr9980012wid.57.1409062267430; Tue, 26 Aug 2014 07:11:07 -0700 (PDT) Received: from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id ys5sm8612163wjc.25.2014.08.26.07.11.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Aug 2014 07:11:06 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Tue, 26 Aug 2014 16:11:02 +0200 Message-Id: <1409062262-8998-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 Subject: [dpdk-dev] [PATCH] eal: remove unused macros X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2014 14:07:07 -0000 Clean both linux and bsd implementations from unused macros. Signed-off-by: David Marchand --- lib/librte_eal/bsdapp/eal/eal.c | 18 ------------------ lib/librte_eal/bsdapp/eal/eal_pci.c | 7 ------- lib/librte_eal/bsdapp/eal/eal_timer.c | 2 -- lib/librte_eal/linuxapp/eal/eal.c | 2 -- lib/librte_eal/linuxapp/eal/eal_ivshmem.c | 1 - lib/librte_eal/linuxapp/eal/eal_timer.c | 2 -- 6 files changed, 32 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 96b54e3..a296da5 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -96,28 +96,10 @@ #define OPT_SYSLOG "syslog" #define OPT_LOG_LEVEL "log-level" -#define RTE_EAL_BLACKLIST_SIZE 0x100 - #define MEMSIZE_IF_NO_HUGE_PAGE (64ULL * 1024ULL * 1024ULL) -#define SOCKET_MEM_STRLEN (RTE_MAX_NUMA_NODES * 10) - -#define HIGHEST_RPL 3 - #define BITS_PER_HEX 4 -#define GET_BLACKLIST_FIELD(in, fd, lim, dlm) \ -{ \ - unsigned long val; \ - char *end; \ - errno = 0; \ - val = strtoul((in), &end, 16); \ - if (errno != 0 || end[0] != (dlm) || val > (lim)) \ - return (-EINVAL); \ - (fd) = (typeof (fd))val; \ - (in) = end + 1; \ -} - /* Allow the application to print its usage message too if set */ static rte_usage_hook_t rte_application_usage_hook = NULL; /* early configuration structure, when memory config is not mmapped */ diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 2bbbeb0..54fcaf0 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -156,10 +156,6 @@ fail: return NULL; } -#ifndef OFF_MAX -#define OFF_MAX ((uint64_t)(off_t)-1) -#endif - static int pci_uio_map_secondary(struct rte_pci_device *dev) { @@ -274,9 +270,6 @@ pci_uio_map_resource(struct rte_pci_device *dev) return (0); } -/* parse the "resource" sysfs file */ -#define IORESOURCE_MEM 0x00000200 - /* Compare two PCI device addresses. */ static int pci_addr_comparison(struct rte_pci_addr *addr, struct rte_pci_addr *addr2) diff --git a/lib/librte_eal/bsdapp/eal/eal_timer.c b/lib/librte_eal/bsdapp/eal/eal_timer.c index 9ac3f2e..fd800b9 100644 --- a/lib/librte_eal/bsdapp/eal/eal_timer.c +++ b/lib/librte_eal/bsdapp/eal/eal_timer.c @@ -70,8 +70,6 @@ static uint64_t eal_tsc_resolution_hz = 0; /* General capabilities register */ #define CLK_PERIOD_SHIFT 32 /* Clock period shift. */ #define CLK_PERIOD_MASK 0xffffffff00000000ULL /* Clock period mask. */ -#define COUNT_SIZE_CAP_SHIFT 13 /* Count size capa. shift. */ -#define COUNT_SIZE_CAP_MASK 0x0000000000002000ULL /* Count size capa. mask. */ /** * HPET timer registers. From the Intel IA-PC HPET (High Precision Event diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 874209b..2940e69 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -103,8 +103,6 @@ #define OPT_CREATE_UIO_DEV "create-uio-dev" #define OPT_VFIO_INTR "vfio-intr" -#define RTE_EAL_BLACKLIST_SIZE 0x100 - #define MEMSIZE_IF_NO_HUGE_PAGE (64ULL * 1024ULL * 1024ULL) #define SOCKET_MEM_STRLEN (RTE_MAX_NUMA_NODES * 10) diff --git a/lib/librte_eal/linuxapp/eal/eal_ivshmem.c b/lib/librte_eal/linuxapp/eal/eal_ivshmem.c index 16d407e..413a9ba 100644 --- a/lib/librte_eal/linuxapp/eal/eal_ivshmem.c +++ b/lib/librte_eal/linuxapp/eal/eal_ivshmem.c @@ -62,7 +62,6 @@ #define PCI_DEVICE_ID_IVSHMEM 0x1110 #define IVSHMEM_MAGIC 0x0BADC0DE -#define IVSHMEM_METADATA_SIZE 0x1000 #define IVSHMEM_RESOURCE_PATH "/sys/bus/pci/devices/%04x:%02x:%02x.%x/resource2" #define IVSHMEM_CONFIG_PATH "/var/run/.%s_ivshmem_config" diff --git a/lib/librte_eal/linuxapp/eal/eal_timer.c b/lib/librte_eal/linuxapp/eal/eal_timer.c index 7f7589f..ca57916 100644 --- a/lib/librte_eal/linuxapp/eal/eal_timer.c +++ b/lib/librte_eal/linuxapp/eal/eal_timer.c @@ -71,8 +71,6 @@ static uint64_t eal_tsc_resolution_hz = 0; /* General capabilities register */ #define CLK_PERIOD_SHIFT 32 /* Clock period shift. */ #define CLK_PERIOD_MASK 0xffffffff00000000ULL /* Clock period mask. */ -#define COUNT_SIZE_CAP_SHIFT 13 /* Count size capa. shift. */ -#define COUNT_SIZE_CAP_MASK 0x0000000000002000ULL /* Count size capa. mask. */ /** * HPET timer registers. From the Intel IA-PC HPET (High Precision Event -- 1.7.10.4