From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Subject: Re: [PATCH] net/mlx5: change start pointer of compressed completion Date: Thu, 13 Jul 2017 09:04:40 +0200 Message-ID: <20170713070439.bcie7ar5wvh752iy@shalom> References: <20170712220954.35375-1-yskoh@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: ferruh.yigit@intel.com, dev@dpdk.org, adrien.mazarguil@6wind.com To: Yongseok Koh Return-path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 0917F2BAA for ; Thu, 13 Jul 2017 09:05:06 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id 62so14178921wmw.1 for ; Thu, 13 Jul 2017 00:05:05 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20170712220954.35375-1-yskoh@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jul 12, 2017 at 03:09:54PM -0700, Yongseok Koh wrote: > 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 > --- > drivers/net/mlx5/mlx5_rxtx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c > index ab6df19eb..29ce91b05 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); > -- > 2.11.0 > Acked-by: Nelio Laranjeiro -- Nélio Laranjeiro 6WIND