[dpdk-dev,v4,3/8] net/mlx4: fix ring wraparound compiler hint

Message ID 1509474093-31388-4-git-send-email-matan@mellanox.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Matan Azrad Oct. 31, 2017, 6:21 p.m. UTC
  Remove unlikely hint from WQ wraparound check because it is
expected case.

Fixes: c3c977bbecbd ("net/mlx4: add Tx bypassing Verbs")

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx4/mlx4_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Adrien Mazarguil Nov. 2, 2017, 1:42 p.m. UTC | #1
On Tue, Oct 31, 2017 at 06:21:28PM +0000, Matan Azrad wrote:
> Remove unlikely hint from WQ wraparound check because it is
> expected case.
> 
> Fixes: c3c977bbecbd ("net/mlx4: add Tx bypassing Verbs")
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
  

Patch

diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c
index 3b5faa1..eddce82 100644
--- a/drivers/net/mlx4/mlx4_rxtx.c
+++ b/drivers/net/mlx4/mlx4_rxtx.c
@@ -292,7 +292,7 @@  struct pv {
 		addr = rte_pktmbuf_mtod(buf, uintptr_t);
 		rte_prefetch0((volatile void *)addr);
 		/* Handle WQE wraparound. */
-		if (unlikely(dseg >= (struct mlx4_wqe_data_seg *)sq->eob))
+		if (dseg >= (struct mlx4_wqe_data_seg *)sq->eob)
 			dseg = (struct mlx4_wqe_data_seg *)sq->buf;
 		dseg->addr = rte_cpu_to_be_64(addr);
 		/* Memory region key for this memory pool. */