From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id A49FDC130 for ; Tue, 16 Feb 2016 08:16:09 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id g62so91048148wme.1 for ; Mon, 15 Feb 2016 23:16:09 -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=R6DVE5bRqF5vhCeUd1pdmUIUt0OQAjhrKr/BnXZZ6fI=; b=Ct8g5O4bDOTBSBfgfE7up15cdXo/VELTg4c+EtXy4OLNgLgvYXMc9aaArncBJNqxX5 bdQeg0t67fNJz70PJBMThsaui7zBVguRjQzNnjBjIzlRphKT8kqYswTNynbxOv26RhPc wIc2nEvEIclf4ddDgbkw9D38zEJF/yFtr42I++sq9fM6tIvQV3trH6Mgjg+sMOARHpFW y4UBamSb2hCXNY5V/My22AWSOIys0X3Rhmq+YrGf/X7CHgJHXvbQxVDktSxfRnm6Drqp d3j4oR6R/nngP6cjbCBi9gEPHC5AD4K0eTLusLfdQMcrF1oTC3RzoFk+cMxj9yYXO4d4 tvSQ== 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=R6DVE5bRqF5vhCeUd1pdmUIUt0OQAjhrKr/BnXZZ6fI=; b=NTkur52Xe6w7QA1MXfU0zH+BKHEpdum/4shRlyPZ/kbUYn5alB/Ml8JeHW29xn7uEN 6cFPhEha2mGp62z6S5Er50Z2ebnGp0vreLkE2mEm4VGX24Oqx7OaXoIDkp5Ba3FPd9Bu qjJlGIkdB0mBiZ/0Wf61zvWshl4uVRz+ALcnrufW6jvuBolv6Ih5y1EciRo+KA5+VcKh fz/TR7Gs+4Cvva+y5yQ4bDLJAp4O+kNav7kPgHo0yNh1jzhntoKpX1cVhzlWefEhnCDw Qi/+qE1PQVZ6suG9M/6RRDHRT2cW1PcLEXvl18MQggIpom23z8diUyOqb3nrXmkUytjv adRQ== X-Gm-Message-State: AG10YOR6N2VPF/wurMnmPecrcSc/vAzjpYDd+BL+jLR8HQOsVlboeMvbp0fUHdSHaf1tOEm3 X-Received: by 10.194.184.171 with SMTP id ev11mr19775510wjc.44.1455606969552; Mon, 15 Feb 2016 23:16:09 -0800 (PST) Received: from XPS13.localdomain (165.20.90.92.rev.sfr.net. [92.90.20.165]) by smtp.gmail.com with ESMTPSA id b5sm19032574wmh.15.2016.02.15.23.16.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Feb 2016 23:16:08 -0800 (PST) From: Thomas Monjalon To: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, remy.horton@intel.com Date: Tue, 16 Feb 2016 08:14:25 +0100 Message-Id: <1455606865-22680-4-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455606865-22680-1-git-send-email-thomas.monjalon@6wind.com> References: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> <1455606865-22680-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 v2 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: Tue, 16 Feb 2016 07:16:09 -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); ^ The cast must be explicit for C++. rte_mbuf_offload.h:304:1: error: expected declaration before ‘}’ token There was a closing brace for __cplusplus but not an opening one. 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(-) v2: - add struct keyword diff --git a/lib/librte_mbuf_offload/rte_mbuf_offload.h b/lib/librte_mbuf_offload/rte_mbuf_offload.h index 4345f06..77993b6 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); + (struct rte_pktmbuf_offload_pool_private *)rte_mempool_get_priv(mpool); return priv->offload_priv_size; } -- 2.7.0