From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id C65B2C536 for ; Tue, 28 Jul 2015 11:19:09 +0200 (CEST) Received: by wibxm9 with SMTP id xm9so147753040wib.0 for ; Tue, 28 Jul 2015 02:19:09 -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:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=ljauf4hAiELRqNLlbFCkDIRYNlYs+aBhebsbyoW81QA=; b=Sel6vW7WQDgmHnlqt6tI/QI0YUZ6ZgfOmn3MtSb9LSASXivvBzlMtsE+HCFkoflW6y cWAKPPeu4gFsnIQbiS1A+R6+bKqNfJ7RV50untGgztIkAhgIHJ3ka0oTj4Fhrk+NCocx ZPfqUDCNMZGXfxCDW0p3NnAVpGkQfDMJv1hEJMvzqsgntsYa9SfXM4ibmzh7HEE7KY2P XpiuS177yxObmSQrcrstfghuuyD21JGIbvj+bnBfXOmTz15yqAXoquQFqJHivpuIaja8 f3uil9ORhZaSvYpO40usQyMAzJAPkUMBX+kxnxu2TbY0D86ej+KkvNj0y2LBDDKbpwTw /v9Q== X-Gm-Message-State: ALoCoQkZw1knkhg+spt4lWfwX/56Lz8yvMTUH5qJ//ap33MgM7CZBL6bkS2l4gbFSsuCFYJaDKGZ X-Received: by 10.180.74.162 with SMTP id u2mr33243678wiv.0.1438075149655; Tue, 28 Jul 2015 02:19:09 -0700 (PDT) Received: from xps13.localnet (148.20.90.92.rev.sfr.net. [92.90.20.148]) by smtp.gmail.com with ESMTPSA id u7sm18032029wif.3.2015.07.28.02.19.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jul 2015 02:19:08 -0700 (PDT) From: Thomas Monjalon To: Zhigang Lu Date: Tue, 28 Jul 2015 11:17:45 +0200 Message-ID: <1777834.Cdb59hv0LG@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <1438073298-24683-1-git-send-email-zlu@ezchip.com> References: <1438073298-24683-1-git-send-email-zlu@ezchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] bnx2x: fix undeclared PAGE_SIZE build error 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, 28 Jul 2015 09:19:10 -0000 2015-07-28 16:48, Zhigang Lu: > This patch fixes a build error caused by undeclared PAGE_SIZE when > compiling for non-X86 arches. On some arches, PAGE_SIZE is not fixed > so that header files do not define it. A better way to get it is > via sysconf(3) or getpagesize(2). > > Fixes: 540a211084a7 ("bnx2x: driver core") Thanks for fixing it. > +#define PAGE_SIZE (sysconf(_SC_PAGESIZE)) To avoid conflict with system headers, it would be better to prefix the constant. Ideally, we should add RTE_PAGESIZE in EAL and cleanup every usage of sysconf(_SC_PAGESIZE) and getpagesize.