From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id E13EAC342 for ; Fri, 5 Feb 2016 18:08:17 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id g62so36266570wme.0 for ; Fri, 05 Feb 2016 09:08:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=rWSwKZ3+Oh2YzD5c7QupXCFsxhwBXyU0WcdiQUl5peg=; b=r9ruz7CY0Au0uwQrBVZfo1nqZlS9J59ALg9BgDMerGh4g18VfqWsuuUJ0LMZtgf+wL ylkFKsnYyhXomY5/Xo2m07c3kYUG0XYfun5TExz4NM+4SQut+MNkXH/rYyya8EzuciSP felbDHv+XUJXakJXguPDuVKHQXDZWlSoxqUa2a8PrBr42eONuCuo2RBDtPMMpyB/tRNP 8BrJIuXZMOSilrmswj4OsYshQy5zdoGT0tZmefhLJW136UiIQ0vCPrMWxiWqA3SL2pU6 ZCiCaT/pLdTCVXxU/Q58cWntNJejfo+A15wMXmUPiT8lbZvemSPFihMAVIhYhWtHS/cB 7M1A== 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:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=rWSwKZ3+Oh2YzD5c7QupXCFsxhwBXyU0WcdiQUl5peg=; b=ETQYPpnc1i66gkBS0FAZQ1tnz7if8WMr4/IlaTM+JVAfvys6oJElUqhjhh4UspWrMV gSqa2Y4/SoWYdadnYBQ+fm8jocrLM26zAmNoVfkbvq1URpWWXImxxUwU47c+jEUwkAFp ZAx3wH+1VUj/fLrZK6C5m20NcK+DlhCyxSHAmwGkt0W1IGZAvRoGzM40d5TTui8DVNya pCPiqEmIDpfoXBmMdxqQreDZADr6Inw4SMPbbWdY4SNjzAwzLO0QHLlCV1q5a4sP0tkg g56g8IFXbP3K8JjTxOfK0ZEuEpFEHbPb3lpwQjkxu31wBBOq0SMal9x8tbES7CaWpgek 26pw== X-Gm-Message-State: AG10YOTxlV4FUUkihP38h4Dl0DJpIEci/Dh8T8ZuPXlhy9P8c/kpF9gZ7eSPvra30c/XhABy X-Received: by 10.28.17.8 with SMTP id 8mr16262483wmr.65.1454692097802; Fri, 05 Feb 2016 09:08:17 -0800 (PST) Received: from localhost.localdomain (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id u191sm31712660wmd.4.2016.02.05.09.08.16 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Feb 2016 09:08:17 -0800 (PST) From: Thomas Monjalon To: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, remy.horton@intel.com Date: Fri, 5 Feb 2016 18:06:09 +0100 Message-Id: <1454691969-25734-4-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> References: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH 3/3] mbuf_offload: fix header for C++ 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: Fri, 05 Feb 2016 17:08:18 -0000 When built in a C++ application, the include fails for 2 reasons: rte_mbuf_offload.h:128:24: error: invalid conversion from ‘void*’ to ‘rte_pktmbuf_offload_pool_private*’ [-fpermissive] rte_mempool_get_priv(mpool); ^ rte_mbuf_offload.h:304:1: error: expected declaration before ‘}’ token Fixes: 78c8709b5ddb ("mbuf_offload: introduce library to attach offloads to mbuf") Signed-off-by: Thomas Monjalon --- lib/librte_mbuf_offload/rte_mbuf_offload.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/librte_mbuf_offload/rte_mbuf_offload.h b/lib/librte_mbuf_offload/rte_mbuf_offload.h index 4345f06..a0e990d 100644 --- a/lib/librte_mbuf_offload/rte_mbuf_offload.h +++ b/lib/librte_mbuf_offload/rte_mbuf_offload.h @@ -59,6 +59,9 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif /** packet mbuf offload operation types */ enum rte_mbuf_ol_op_type { @@ -125,7 +128,7 @@ static inline uint16_t __rte_pktmbuf_offload_priv_size(struct rte_mempool *mpool) { struct rte_pktmbuf_offload_pool_private *priv = - rte_mempool_get_priv(mpool); + (rte_pktmbuf_offload_pool_private *)rte_mempool_get_priv(mpool); return priv->offload_priv_size; } -- 2.7.0