From patchwork Wed Jan 28 06:59:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cunming Liang X-Patchwork-Id: 2612 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 810085A7C; Wed, 28 Jan 2015 08:00:24 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9BCCF5920 for ; Wed, 28 Jan 2015 08:00:09 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 27 Jan 2015 22:55:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,479,1418112000"; d="scan'208";a="657757780" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 27 Jan 2015 23:00:07 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t0S7043Y023818; Wed, 28 Jan 2015 15:00:04 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t0S7016O005993; Wed, 28 Jan 2015 15:00:03 +0800 Received: (from cliang18@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0S701cY005982; Wed, 28 Jan 2015 15:00:01 +0800 From: Cunming Liang To: dev@dpdk.org Date: Wed, 28 Jan 2015 14:59:18 +0800 Message-Id: <1422428365-5875-9-git-send-email-cunming.liang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1422428365-5875-1-git-send-email-cunming.liang@intel.com> References: <1421914598-2747-1-git-send-email-cunming.liang@intel.com> <1422428365-5875-1-git-send-email-cunming.liang@intel.com> Subject: [dpdk-dev] [PATCH v2 08/15] enic: fix re-define freebsd compile complain 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Some macro already been defined by freebsd 'sys/param.h'. Signed-off-by: Cunming Liang --- lib/librte_pmd_enic/enic.h | 1 + lib/librte_pmd_enic/enic_compat.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/librte_pmd_enic/enic.h b/lib/librte_pmd_enic/enic.h index c43417c..189c3b9 100644 --- a/lib/librte_pmd_enic/enic.h +++ b/lib/librte_pmd_enic/enic.h @@ -66,6 +66,7 @@ #define ENIC_CALC_IP_CKSUM 1 #define ENIC_CALC_TCP_UDP_CKSUM 2 #define ENIC_MAX_MTU 9000 +#undef PAGE_SIZE #define PAGE_SIZE 4096 #define PAGE_ROUND_UP(x) \ ((((unsigned long)(x)) + PAGE_SIZE-1) & (~(PAGE_SIZE-1))) diff --git a/lib/librte_pmd_enic/enic_compat.h b/lib/librte_pmd_enic/enic_compat.h index b1af838..b84c766 100644 --- a/lib/librte_pmd_enic/enic_compat.h +++ b/lib/librte_pmd_enic/enic_compat.h @@ -67,6 +67,7 @@ #define pr_warn(y, args...) dev_warning(0, y, ##args) #define BUG() pr_err("BUG at %s:%d", __func__, __LINE__) +#undef ALIGN #define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a)-1) #define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask)) #define udelay usleep