From: Yongseok Koh Date: Wed, 12 Jul 2017 22:09:54 +0000 (-0700) Subject: net/mlx5: change start pointer of compressed completion X-Git-Tag: spdx-start~2451 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4aff4bcbbdea0236ead3b228341b71dddb612509;p=dpdk.git net/mlx5: change start pointer of compressed completion On a host having 128B cacheline size, some devices insert 64B padding in each completion entry to avoid partial cacheline write by HW. But, as the padding is ahead of completion data, casting a completion entry to compressed mini-completions must start from the middle of the completion. Signed-off-by: Yongseok Koh Acked-by: Shahaf Shuler Acked-by: Nelio Laranjeiro --- diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index ab6df19eb0..29ce91b054 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -1556,7 +1556,7 @@ mlx5_rx_poll_len(struct rxq *rxq, volatile struct mlx5_cqe *cqe, if (zip->ai) { volatile struct mlx5_mini_cqe8 (*mc)[8] = (volatile struct mlx5_mini_cqe8 (*)[8]) - (uintptr_t)(&(*rxq->cqes)[zip->ca & cqe_cnt]); + (uintptr_t)(&(*rxq->cqes)[zip->ca & cqe_cnt].pkt_info); len = ntohl((*mc)[zip->ai & 7].byte_cnt); *rss_hash = ntohl((*mc)[zip->ai & 7].rx_hash_result); @@ -1604,7 +1604,7 @@ mlx5_rx_poll_len(struct rxq *rxq, volatile struct mlx5_cqe *cqe, volatile struct mlx5_mini_cqe8 (*mc)[8] = (volatile struct mlx5_mini_cqe8 (*)[8]) (uintptr_t)(&(*rxq->cqes)[rxq->cq_ci & - cqe_cnt]); + cqe_cnt].pkt_info); /* Fix endianness. */ zip->cqe_cnt = ntohl(cqe->byte_cnt);