summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@broadcom.com>2019-06-14 09:50:57 +0530
committerThomas Monjalon <thomas@monjalon.net>2019-06-14 15:55:38 +0900
commit07517400c4740397477153910edee38268294031 (patch)
treede96aa8bf69b63ef79dfebefdf6ecf2549288e77
parente28111ac9864af09e826241a915dfff87a9c00ad (diff)
downloaddpdk-07517400c4740397477153910edee38268294031.zip
dpdk-07517400c4740397477153910edee38268294031.tar.gz
dpdk-07517400c4740397477153910edee38268294031.tar.xz
net/bnxt: fix build with some compilers
The driver was defining its own version of roundup which was conflicting with another version defined elsewhere. Change the local definition of roundup to avoid compilation errors. Fixes: f8168ca0e690 ("net/bnxt: support thor controller") Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
-rw-r--r--drivers/net/bnxt/bnxt_ethdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 5f9c096..8fc5103 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3545,7 +3545,7 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
bp->ctx = NULL;
}
-#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
+#define bnxt_roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
#define min_t(type, x, y) ({ \
type __min1 = (x); \
@@ -3612,7 +3612,7 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
return rc;
entries = ctx->qp_max_l2_entries;
- entries = roundup(entries, ctx->tqm_entries_multiple);
+ entries = bnxt_roundup(entries, ctx->tqm_entries_multiple);
entries = clamp_t(uint32_t, entries, ctx->tqm_min_entries_per_ring,
ctx->tqm_max_entries_per_ring);
for (i = 0, ena = 0; i < BNXT_MAX_Q; i++) {