DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com,
	remy.horton@intel.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/3] mbuf_offload: fix header for C++
Date: Fri,  5 Feb 2016 18:06:09 +0100	[thread overview]
Message-ID: <1454691969-25734-4-git-send-email-thomas.monjalon@6wind.com> (raw)
In-Reply-To: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com>

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 <thomas.monjalon@6wind.com>
---
 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 <rte_mbuf.h>
 #include <rte_crypto.h>
 
+#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

  parent reply	other threads:[~2016-02-05 17:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05 17:06 [dpdk-dev] [PATCH 0/3] fix C++ includes Thomas Monjalon
2016-02-05 17:06 ` [dpdk-dev] [PATCH 1/3] eal: fix keep alive header for C++ Thomas Monjalon
2016-02-15 11:16   ` Remy Horton
2016-02-05 17:06 ` [dpdk-dev] [PATCH 2/3] hash: fix " Thomas Monjalon
2016-02-08 13:42   ` De Lara Guarch, Pablo
2016-02-05 17:06 ` Thomas Monjalon [this message]
2016-02-05 21:33   ` [dpdk-dev] [PATCH 3/3] mbuf_offload: " Thomas Monjalon
2016-02-16  7:14 ` [dpdk-dev] [PATCH v2 0/3] fix C++ includes Thomas Monjalon
2016-02-16  7:14   ` [dpdk-dev] [PATCH v2 1/3] eal: fix keep alive header for C++ Thomas Monjalon
2016-02-16 10:16     ` Remy Horton
2016-02-16  7:14   ` [dpdk-dev] [PATCH v2 2/3] hash: fix " Thomas Monjalon
2016-02-16  7:14   ` [dpdk-dev] [PATCH v2 3/3] mbuf_offload: " Thomas Monjalon
2016-02-16 16:21   ` [dpdk-dev] [PATCH v2 0/3] fix C++ includes Ferruh Yigit
2016-02-16 16:26     ` Thomas Monjalon
2016-02-16 18:33       ` Marc
2016-02-21 10:49   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454691969-25734-4-git-send-email-thomas.monjalon@6wind.com \
    --to=thomas.monjalon@6wind.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=remy.horton@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).