DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, santosh.shukla@caviumnetworks.com,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH] mempool/octeontx: fix build issue with old gcc
Date: Fri, 13 Oct 2017 17:01:35 +0530	[thread overview]
Message-ID: <20171013113135.6395-1-jerin.jacob@caviumnetworks.com> (raw)

Replaced _Static_assert compiler function with RTE_BUILD_BUG_ON()
to fix build issue with old gcc.

Fixes: 02fd6c744350 ("mempool/octeontx: support allocation")
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/mempool/octeontx/octeontx_fpavf.c | 3 +--
 drivers/mempool/octeontx/octeontx_fpavf.h | 2 --
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index eea934fa2..8d5c2a689 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -523,8 +523,7 @@ octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
 	int res;
 
 	RTE_SET_USED(node_id);
-	FPAVF_STATIC_ASSERTION(sizeof(struct rte_mbuf) <=
-				OCTEONTX_FPAVF_BUF_OFFSET);
+	RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) > OCTEONTX_FPAVF_BUF_OFFSET);
 
 	if (unlikely(*va_start == NULL))
 		goto error_end;
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.h b/drivers/mempool/octeontx/octeontx_fpavf.h
index 263f733d8..7a39cd22c 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.h
+++ b/drivers/mempool/octeontx/octeontx_fpavf.h
@@ -92,8 +92,6 @@
 #define FPA_MAX_OBJ_SIZE		(128 * 1024)
 #define OCTEONTX_FPAVF_BUF_OFFSET	128
 
-#define FPAVF_STATIC_ASSERTION(s) _Static_assert(s, #s)
-
 /*
  * In Cavium OcteonTX SoC, all accesses to the device registers are
  * implicitly strongly ordered. So, the relaxed version of IO operation is
-- 
2.14.2

             reply	other threads:[~2017-10-13 11:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 11:31 Jerin Jacob [this message]
2017-10-13 13:29 ` 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=20171013113135.6395-1-jerin.jacob@caviumnetworks.com \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=thomas@monjalon.net \
    /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).