From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1796CA0547; Fri, 10 Sep 2021 11:18:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 574B54111D; Fri, 10 Sep 2021 11:17:52 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id E80D34113B for ; Fri, 10 Sep 2021 11:17:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631265470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=chWeJDuW6H/ezQXXLNN4cDnFI2b+htFvoJcsAVGkNJU=; b=GSxOZi/SIoeti/i3hB1aEl91D+VEfxbCHGoE2MKg6nEdA8l5AFbYipPOgdc1PBToP6fFuf 19JadtqWgRvMvagQ5lUHnakFN2Z9e6nT4gAlZEHdypywl6a57mUWpmVK9b9t+v9mdcoimA cIHKIcSoByvsO/2eO7rdx9x/5HYUU2A= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-257-xbj7i-TgPICsnTYxJdNzGQ-1; Fri, 10 Sep 2021 05:17:49 -0400 X-MC-Unique: xbj7i-TgPICsnTYxJdNzGQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 94E9419057B5; Fri, 10 Sep 2021 09:17:47 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C86E77BE7; Fri, 10 Sep 2021 09:17:45 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, chenbo.xia@intel.com, amorenoz@redhat.com, david.marchand@redhat.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@intel.com, michaelba@nvidia.com, viacheslavo@nvidia.com Cc: stable@dpdk.org, nelio.laranjeiro@6wind.com, Maxime Coquelin Date: Fri, 10 Sep 2021 11:17:34 +0200 Message-Id: <20210910091734.7023-4-maxime.coquelin@redhat.com> In-Reply-To: <20210910091734.7023-1-maxime.coquelin@redhat.com> References: <20210910091734.7023-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH 3/3] net/mlx5: Fix RSS RETA update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch fixes RETA updating for entries above 64. Without ithat, these entries are never updated as calculated mask value will always be 0. Fixes: 634efbc2c8c0 ("mlx5: support RETA query and update") Cc: stable@dpdk.org Cc: nelio.laranjeiro@6wind.com Signed-off-by: Maxime Coquelin --- drivers/net/mlx5/mlx5_rss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c index c32129cdc2..6dc52acee0 100644 --- a/drivers/net/mlx5/mlx5_rss.c +++ b/drivers/net/mlx5/mlx5_rss.c @@ -211,7 +211,7 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev, for (idx = 0, i = 0; (i != reta_size); ++i) { idx = i / RTE_RETA_GROUP_SIZE; pos = i % RTE_RETA_GROUP_SIZE; - if (((reta_conf[idx].mask >> i) & 0x1) == 0) + if (((reta_conf[idx].mask >> pos) & 0x1) == 0) continue; MLX5_ASSERT(reta_conf[idx].reta[pos] < priv->rxqs_n); (*priv->reta_idx)[i] = reta_conf[idx].reta[pos]; -- 2.31.1