From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emea01-db3-obe.outbound.protection.outlook.com (mail-db3on0100.outbound.protection.outlook.com [157.55.234.100]) by dpdk.org (Postfix) with ESMTP id ACA0AC592 for ; Tue, 28 Jul 2015 10:48:35 +0200 (CEST) Received: from HE1PR02MB0811.eurprd02.prod.outlook.com (10.161.118.150) by HE1PR02MB0795.eurprd02.prod.outlook.com (10.161.118.147) with Microsoft SMTP Server (TLS) id 15.1.225.19; Tue, 28 Jul 2015 08:48:34 +0000 Received: from DB4PR02CA0041.eurprd02.prod.outlook.com (10.242.174.169) by HE1PR02MB0811.eurprd02.prod.outlook.com (10.161.118.150) with Microsoft SMTP Server (TLS) id 15.1.225.19; Tue, 28 Jul 2015 08:48:31 +0000 Received: from AM1FFO11FD035.protection.gbl (2a01:111:f400:7e00::122) by DB4PR02CA0041.outlook.office365.com (2a01:111:e400:983b::41) with Microsoft SMTP Server (TLS) id 15.1.225.19 via Frontend Transport; Tue, 28 Jul 2015 08:48:30 +0000 Authentication-Results: spf=fail (sender IP is 124.207.145.166) smtp.mailfrom=ezchip.com; ezchip.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of ezchip.com does not designate 124.207.145.166 as permitted sender) receiver=protection.outlook.com; client-ip=124.207.145.166; helo=bjgfarm-1.internal.tilera.com; Received: from bjgfarm-1.internal.tilera.com (124.207.145.166) by AM1FFO11FD035.mail.protection.outlook.com (10.174.64.224) with Microsoft SMTP Server (TLS) id 15.1.231.11 via Frontend Transport; Tue, 28 Jul 2015 08:48:28 +0000 Received: (from zlu@localhost) by bjgfarm-1.internal.tilera.com (8.14.4/8.14.4/Submit) id t6S8mKO5024722; Tue, 28 Jul 2015 16:48:20 +0800 From: Zhigang Lu To: Date: Tue, 28 Jul 2015 16:48:17 +0800 Message-ID: <1438073298-24683-1-git-send-email-zlu@ezchip.com> X-Mailer: git-send-email 2.1.2 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD035; 1:H+//iQ+YzQlCbV3knCIKTR4kAVcZyehk9KTP9tm8PquO3fpVdgu9dLu8l3qtgKyM8xxqtGsMdgukTp/zQI8IgNpb8PT90bAT1zadvi/jW1sTeV4zbk35vs7Wgzylwf7c2EdtELX8zABOhweV9CLfOHX2bxbpr3eF0jjbcHzjZojh49mj1Kur0IME1ZV6rj2ThkXa4bTr92JpYKXBhTfWKHivllkZjtqooq/l27xNn8EFdQH/9+1hRgqBjeGIJ7t/ZCLzJ1hot12TuHkvWxjY9L42TxgA4KHWvreH/01x0f/1ugeP8mm/oScRyR4vRgILittPXHggoxrEZdhX6Jdggw== X-Forefront-Antispam-Report: CIP:124.207.145.166; CTRY:CN; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(339900001)(199003)(189002)(5001960100002)(62966003)(229853001)(189998001)(2351001)(85426001)(19580395003)(107886002)(92566002)(86362001)(46102003)(77156002)(110136002)(104016003)(87936001)(42186005)(5820100001)(106466001)(50226001)(50466002)(105606002)(450100001)(47776003)(23676002)(33646002)(19580405001)(5001920100001)(36756003)(6806004)(50986999)(9376004)(4001430100001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR02MB0811; H:bjgfarm-1.internal.tilera.com; FPR:; SPF:Fail; MLV:nov; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB0811; 2:R58ATHjIeDtu91VUbbASBitzySw5CPfkRPnWw5o86azH8xG1naTRnrZp6NDwCUmEihl2NU+7d6FB1AqG5safWX+oTUYV46j9EPpOqzwimYr/kCMft7yr30t/lXXFcYH47B/koOb5PcA10htWkKeZuLwd3AbuP9UduvZIh2rOAYM=; 3:2Qpyov8crAFqaorHTBEAuvzUqvXkWIfSBVa2RVu+z+V776QUi2nvhld2RxmdYYNBAlXZNUGeokTo+B4bWYKh/s0zeZ1i+Jr/4qtud5nCqOIcnK3eyyHTImM10ZIBHsDo1Z0dAIF+p78BIrL4rdZOXYn4NGKutgt7pnN8glK+yJd1a9t7UZEDdKlKHrXerT/xTZBI5lXBDD1oPOQ32b9PCCdEmIDbpUw4GZNrFj8hsdkCNwRd+Gl1XTzukbobvUwi; 25:zhJGF9hHlsE1Utp4nkIk1nGXNRCyXPX6ynW3K9PM8M2HeD2Aod9vZPFUZiqLAyaIjpEvhXNW06Rvn/UHhSiAns0/yWamT8Ek7BTMWvNFJibFWcw5qbZn3u7tAL70GaLNp9pgREpm9CoeMjoa4BKxlGTPBIWAVdwewY1wn7zdYS/czdMnKW0OP+XWOAepPIOEj1urY7RX2zADZczeGps4+MkTfNfoQqiuPNOYe/tXvAgDGFtomgjoPTrKOI1HZIsFvbK9cyYE8Qo5kNyRmBbk+A==; 20:Lc1xj2litFr9IMn+H60TzjBcJhJyek8OtltIukKYvMv64Fa3y5TjBWcW/bIGI/XZv/nTXez2OnfQyFRVeZulgqEnFv/rR8IzBB9vNXwpBPhtHg/JdvJKvl8scQiMo3nh6EwtMDX9jttDfoX9fwqeEp1veLPwOuZNrZumb8MhNL0= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:HE1PR02MB0811; UriScan:; BCL:0; PCL:0; RULEID:; SRVR:HE1PR02MB0795; HE1PR02MB0811: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:HE1PR02MB0811; BCL:0; PCL:0; RULEID:; SRVR:HE1PR02MB0811; X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB0811; 4:OB+bYVxn46L/FtOrL14cKnKMRpN9dw39M7+3K0xD92nj4Dj3EV4ONOV1BIC5Pou1qjcldWvAObyu2ocki7lzBQ3lNspD343dS87coQ3n066jDF1LKa9G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KFhTBN7HYISMXQ9q/U6el6pl/Q=; 20:4TtFGWXT/eAdruD4iEPoekW7B4hmpnJt5854aY7qCXoBsFiMQDyjcT60ifvD50bstJAYybfqJPVXAk4f/AUuLg== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2015 08:48:28.9308 (UTC) X-MS-Exchange-CrossTenant-Id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0fc16e0a-3cd3-4092-8b2f-0a42cff122c3; Ip=[124.207.145.166]; Helo=[bjgfarm-1.internal.tilera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR02MB0811 X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB0795; 2:Yu55VrOmaKWaH9aBi7idHrQtN4DubmL9/0io5cLiuQWGwLuOf/u7HLceJw0DW6h3SVd1fZK+9oVeiD0et6KUym8ILvByW3AR8o4GMGwg0bFcyMYC45Cg1CxWFqHipe0KDYqHWxljCZNDqhxHBG+0zB1buYnAx5eSPUobm214JDg=; 3:HmC+x7ME2OkVgxXJ0yhcQk6x5FMBN0pE4S5bhg3uoS6i+QzWEQ/pD4olJ0dhEqIz42CBbnHLh1IY0BUkH6xJ8YnDwedCFi10VVlmJnLZtSLE6H3IhySQTNFIGFzXxVxjiaW5pDk4uscEyo61zy4P1XJd3rCOIup2zy/nZnrXsBSay0+ru5kEehwQzEKuY7qBLyC0oX2MbMCzPIzlLnvnt9MifZ0hoXbWvLBuGcXQ7nIKu80HJ4VJSganwWb3NcIy; 25:Wetq1zinx+XZcqd4aK9HqW2KYqJDLTIUAo+E8018Ks3mwfHCwMfwJE1JnAnxANSxAYKTKMc0aqdNWh/cDf5ncZoKGoJo0+cBQ21JMTIjIoZI+RLdqXIfVBUbU9NJ9MYBp7Z6zNDgZPyVhe7XjIAUGOAcMbvxsvtYmPYdhuhRyCnFzJVZZlZB2unMI5R41viNwc+EdKB1t+vATxSKT78hV7gJSN3ozI2U74yDZHvVdgdmrOryLwHpNfWoLtg9UoEq4ua7Fz5MhNNfibGP2bMNvA==; 20:dk3sQbb/9tAGmS7vqUATuapwTqZBSGrAKtX6tvpCv9iMO5Id+nIHh/ds7R+GmyTumLQPe2LU1STvj7AotwWj5A== HE1PR02MB0795: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB0795; 23:YHdidc8XuthA4ctrjfHEBqlfGk+MAhsG24yYtN2SexD9aZQeurfyR5FsVm3uHlqmdP6bnJTwOHF17CBO0H5EhJp098+bayOfDhF4Q1RjMEOYPCSOJugTHz1PKxDPqVF0tANeFENGPhwhwzitkSTbzVrIrTNyG4gj8K8TNqraj8mg2ReYmLEe3HnCwZqeqkfoKN9xIIzwNN+q9W3IyB/ys6Vc2ERTKxspTqhkNKcU/q4bYguxwkNvgkprZ+9q13NN X-OriginatorOrg: ezchip.com Subject: [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 08:48:36 -0000 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") == Build drivers/net/bnx2x CC bnx2x.o /u/zlu.bjg/git/dpdk.org/drivers/net/bnx2x/bnx2x.c: In function ‘bnx2x_set_fp_rx_buf_size’: /u/zlu.bjg/git/dpdk.org/drivers/net/bnx2x/bnx2x.c:2331: error: ‘PAGE_SIZE’ undeclared (first use in this function) /u/zlu.bjg/git/dpdk.org/drivers/net/bnx2x/bnx2x.c:2331: error: (Each undeclared identifier is reported only once /u/zlu.bjg/git/dpdk.org/drivers/net/bnx2x/bnx2x.c:2331: error: for each function it appears in.) /u/zlu.bjg/git/dpdk.org/drivers/net/bnx2x/bnx2x.c: In function ‘ecore_gunzip’: /u/zlu.bjg/git/dpdk.org/drivers/net/bnx2x/bnx2x.c:11579: warning: assignment discards qualifiers from pointer target type Signed-off-by: Zhigang Lu --- drivers/net/bnx2x/bnx2x.h | 2 ++ drivers/net/bnx2x/bnx2x_ethdev.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index b1e36e5..84b4a29 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h @@ -144,6 +144,8 @@ struct bnx2x_device_type { #define RTE_MBUF_DATA_DMA_ADDR(mb) \ ((uint64_t)((mb)->buf_physaddr + (mb)->data_off)) +#define PAGE_SIZE (sysconf(_SC_PAGESIZE)) + #define BNX2X_PAGE_SHIFT 12 #define BNX2X_PAGE_SIZE (1 << BNX2X_PAGE_SHIFT) #define BNX2X_PAGE_MASK (~(BNX2X_PAGE_SIZE - 1)) diff --git a/drivers/net/bnx2x/bnx2x_ethdev.h b/drivers/net/bnx2x/bnx2x_ethdev.h index 569bfdf..4f96ef7 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.h +++ b/drivers/net/bnx2x/bnx2x_ethdev.h @@ -9,7 +9,6 @@ #include #include -#include #include #include -- 2.1.2