From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id BD756FFA; Wed, 30 Aug 2017 11:16:25 +0200 (CEST) Received: from pure.maildistiller.com (unknown [10.110.50.29]) by dispatch1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTP id 5369A60065; Wed, 30 Aug 2017 09:16:25 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx4-us4.ppe-hosted.com (unknown [10.110.49.251]) by pure.maildistiller.com (Proofpoint Essentials ESMTP Server) with ESMTPS id CA3C16004F; Wed, 30 Aug 2017 09:16:24 +0000 (UTC) Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx4-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 6A27F6005F; Wed, 30 Aug 2017 09:16:24 +0000 (UTC) Received: from [192.168.38.17] (84.52.114.114) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 30 Aug 2017 02:16:20 -0700 To: Ferruh Yigit , CC: Ivan Malov , References: <1503924826-27311-1-git-send-email-arybchenko@solarflare.com> From: Andrew Rybchenko Message-ID: <83cf65ea-7e81-d683-0c56-eec635cf8c95@solarflare.com> Date: Wed, 30 Aug 2017 12:16:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Originating-IP: [84.52.114.114] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ocex03.SolarFlarecom.com (10.20.40.36) X-MDID: 1504084585-xCw-jkOpUKJJ Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/sfc: specify correct scale table size on Rx start 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: Wed, 30 Aug 2017 09:16:26 -0000 On 08/29/2017 08:03 PM, Ferruh Yigit wrote: > On 8/28/2017 1:53 PM, Andrew Rybchenko wrote: >> From: Ivan Malov >> >> efx_rx_scale_tbl_set() takes the number of entries in the scale table >> to be set, not the size of the table in bytes; currently this bug does >> not make any damage since the size argument is used to wrap the loop >> on the input table when filling in an MCDI request in case if the table >> size in the MCDI request is larger then one provided by the user, >> and MCDI scale table size is the same as the size of the table provided >> by the driver; this patch brings a fix for the bug >> >> Fixes: 4ec1fc3ba881 ("net/sfc: add basic stubs for RSS support on driver attach") >> Cc: stable@dpdk.org >> >> Signed-off-by: Ivan Malov >> Signed-off-by: Andrew Rybchenko >> --- >> drivers/net/sfc/sfc_rx.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c >> index 1bf8644..364f718 100644 >> --- a/drivers/net/sfc/sfc_rx.c >> +++ b/drivers/net/sfc/sfc_rx.c >> @@ -1068,7 +1068,7 @@ struct sfc_dp_rx sfc_efx_rx = { >> goto finish; >> > It is not shown in this patch, but there is "sizeof(sa->rss_key)" usage > here, since its type is uint8_t, it is not wrong, but it can be good to > change that one too to RTE_DIM() both to show the intent and to be safe > if in the future type updated... But this is your call to update or not. In theory API annotation in efx.h says __in_ecount(n), so it should be element count and RTE_DIM() should be used. However, the RSS hash key semantics is just a byte string and I think it would be more correct to annotate it as __in_bcount(n) regardless element size. I'll discuss it internally, but right now I would prefer to keep it as is just to avoid code shuffling. Thanks, Andrew.