From patchwork Mon Aug 28 12:53:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 28029 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 5D54E1E20; Mon, 28 Aug 2017 14:54:31 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 48A1E137C; Mon, 28 Aug 2017 14:54:30 +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 A4E3F80077; Mon, 28 Aug 2017 12:54:29 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx2-us4.ppe-hosted.com (unknown [10.110.49.251]) by pure.maildistiller.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 16B8D8004F; Mon, 28 Aug 2017 12:54:29 +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 mx2-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id DA0732006C; Mon, 28 Aug 2017 12:54:28 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Mon, 28 Aug 2017 05:54:02 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25 via Frontend Transport; Mon, 28 Aug 2017 05:54:02 -0700 Received: from uklogin.uk.solarflarecom.com (uklogin.uk.solarflarecom.com [10.17.10.10]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id v7SCs0Dm027857; Mon, 28 Aug 2017 13:54:00 +0100 Received: from uklogin.uk.solarflarecom.com (localhost.localdomain [127.0.0.1]) by uklogin.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id v7SCs0i8027361; Mon, 28 Aug 2017 13:54:00 +0100 From: Andrew Rybchenko To: CC: Ivan Malov , Date: Mon, 28 Aug 2017 13:53:46 +0100 Message-ID: <1503924826-27311-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.2.3 MIME-Version: 1.0 X-MDID: 1503924869-Yd1ONJxuWHwD Subject: [dpdk-dev] [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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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; rc = efx_rx_scale_tbl_set(sa->nic, sa->rss_tbl, - sizeof(sa->rss_tbl)); + RTE_DIM(sa->rss_tbl)); } finish: