From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 9D6561BB14; Tue, 5 Jun 2018 18:41:46 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EA38A40201B2; Tue, 5 Jun 2018 16:41:45 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-116-89.ams2.redhat.com [10.36.116.89]) by smtp.corp.redhat.com (Postfix) with ESMTP id 77FA5201E820; Tue, 5 Jun 2018 16:41:44 +0000 (UTC) To: "Mody, Rasesh" , "dev@dpdk.org" Cc: "ferruh.yigit@intel.com" , Dept-Eng DPDK Dev , "stable@dpdk.org" References: <1527873381-23910-1-git-send-email-rasesh.mody@cavium.com> <390d6b59-0986-a12a-00b7-4deebaf22323@redhat.com> From: Kevin Traynor Organization: Red Hat Message-ID: <5abb59fb-5d42-2e91-3004-bf462695958c@redhat.com> Date: Tue, 5 Jun 2018 17:41:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 05 Jun 2018 16:41:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 05 Jun 2018 16:41:45 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ktraynor@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH] net/qede: fix L2-handles used for RSS hash update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 16:41:46 -0000 On 06/05/2018 05:16 PM, Mody, Rasesh wrote: >> From: Kevin Traynor [mailto:ktraynor@redhat.com] >> Sent: Tuesday, June 05, 2018 6:40 AM >> >> On 06/01/2018 06:16 PM, Rasesh Mody wrote: >>> Fix fast path array index which is used for passing L2 handles to RSS >>> indirection table. Currently, it is using the local copy of >>> indirection table. When the RX queue configuration changes the local >>> copy becomes invalid. >>> >>> Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS >>> configuration") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Rasesh Mody >>> --- >>> drivers/net/qede/qede_ethdev.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/net/qede/qede_ethdev.c >>> b/drivers/net/qede/qede_ethdev.c index 3206cc6..6e9e76d 100644 >>> --- a/drivers/net/qede/qede_ethdev.c >>> +++ b/drivers/net/qede/qede_ethdev.c >>> @@ -2210,7 +2210,7 @@ int qede_rss_hash_update(struct rte_eth_dev >> *eth_dev, >>> vport_update_params.vport_id = 0; >>> /* pass the L2 handles instead of qids */ >>> for (i = 0 ; i < ECORE_RSS_IND_TABLE_SIZE ; i++) { >>> - idx = qdev->rss_ind_table[i]; >>> + idx = ECORE_RSS_IND_TABLE_SIZE % >> QEDE_RSS_COUNT(qdev); >>> rss_params.rss_ind_table[i] = qdev->fp_array[idx].rxq- >>> handle; >> >> hi, idx never changes in the loop, so the same rxq handle is in every >> rss_ind_table entry - is it right? > > The idx depends on number of RXQs. If a single RXQ is configured then idx does not change in the loop, in which case same RXQ handle is in every entry. The value depends on number of Rxqs, but that value will not change for each of 128 iterations *regardless* of the number of Rxq's configured (assuming that will be static during the loop). Perhaps that's what you want, but it looks odd to be calculating the idx in each loop iteration when it won't change. idx = ECORE_RSS_IND_TABLE_SIZE % QEDE_RSS_COUNT(qdev) => idx = 128 % qdev->num_rx_queues > > Thanks! > -Rasesh >> >>> } >>> vport_update_params.rss_params = &rss_params; >>> >