DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] sched: fix build with debug enabled
@ 2021-11-07 16:30 Ali Alnubani
  2021-11-07 17:50 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Ali Alnubani @ 2021-11-07 16:30 UTC (permalink / raw)
  To: dev; +Cc: wojciechx.liguzinski

Compare pkt_len to 0 instead of NULL to avoid the following build
failure with debug mode enabled:
../lib/sched/rte_pie.h: In function 'rte_pie_enqueue_empty':
../lib/sched/rte_pie.h:125:21: error: comparison between pointer
    and integer [-Werror]
  RTE_ASSERT(pkt_len != NULL);

Bugzilla ID: 878
Fixes: 44c730b0e379 ("sched: add PIE based congestion management")
Cc: wojciechx.liguzinski@intel.com

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
---
 lib/sched/rte_pie.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/sched/rte_pie.h b/lib/sched/rte_pie.h
index a3441ffe51..dfdf572311 100644
--- a/lib/sched/rte_pie.h
+++ b/lib/sched/rte_pie.h
@@ -122,7 +122,7 @@ rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg,
 	struct rte_pie *pie,
 	uint32_t pkt_len)
 {
-	RTE_ASSERT(pkt_len != NULL);
+	RTE_ASSERT(pkt_len != 0);
 
 	/* Update the PIE qlen parameter */
 	pie->qlen++;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] sched: fix build with debug enabled
  2021-11-07 16:30 [dpdk-dev] [PATCH] sched: fix build with debug enabled Ali Alnubani
@ 2021-11-07 17:50 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2021-11-07 17:50 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: dev, wojciechx.liguzinski

07/11/2021 17:30, Ali Alnubani:
> Compare pkt_len to 0 instead of NULL to avoid the following build
> failure with debug mode enabled:
> ../lib/sched/rte_pie.h: In function 'rte_pie_enqueue_empty':
> ../lib/sched/rte_pie.h:125:21: error: comparison between pointer
>     and integer [-Werror]
>   RTE_ASSERT(pkt_len != NULL);
> 
> Bugzilla ID: 878
> Fixes: 44c730b0e379 ("sched: add PIE based congestion management")
> Cc: wojciechx.liguzinski@intel.com
> 
> Signed-off-by: Ali Alnubani <alialnu@nvidia.com>

Applied, thanks Ali.
I expect a lot more fixes in this lib, given the poor review.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-07 17:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-07 16:30 [dpdk-dev] [PATCH] sched: fix build with debug enabled Ali Alnubani
2021-11-07 17:50 ` Thomas Monjalon

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).