From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95C5EC432C0 for ; Wed, 27 Nov 2019 21:30:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 671BD206F0 for ; Wed, 27 Nov 2019 21:30:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574890257; bh=++ufQvgnwa0RLQFr/tm5QXSA/TA2OxsMUekOA1cGmQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rg7cqzbGp3c/NsqTPe3xnQcQu5gIWLyMfxMbPZ2EwmrSF8PunJ2gjt2yPQzWPM0Ps Ry4bQs6l1EJhZDpabH5Lapp03GPHUEz3jQBwrJBSCV2GrdQ2257TKM/VANzduvYcuD Ce0iwapTqhwUzz5AyCb7EY+p5grroe+n9pZ2TdTI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729893AbfK0UzO (ORCPT ); Wed, 27 Nov 2019 15:55:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:45672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730933AbfK0UzO (ORCPT ); Wed, 27 Nov 2019 15:55:14 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E387C2084D; Wed, 27 Nov 2019 20:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888113; bh=++ufQvgnwa0RLQFr/tm5QXSA/TA2OxsMUekOA1cGmQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OAMNbwEvH2J4dqH6RE4K/zeVaMqqv9xhTyRYrKd3TzVmNM+e448/7QE50dp4tUT3L 61zIVujwIYWP+DuUZ+hNJyZin+mJnr1y5mZJZzJg4vgv0BtSXEXNh/w1iYI8pWYsQt QtqHGxyF8NTj8NQ0cHDL6vIjtY7XHJZp632FYS9Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luigi Rizzo , Tariq Toukan Subject: [PATCH 4.19 002/306] net/mlx4_en: fix mlx4 ethtool -N insertion Date: Wed, 27 Nov 2019 21:27:32 +0100 Message-Id: <20191127203114.942272445@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Luigi Rizzo [ Upstream commit 34e59836565e36fade1464e054a3551c1a0364be ] ethtool expects ETHTOOL_GRXCLSRLALL to set ethtool_rxnfc->data with the total number of entries in the rx classifier table. Surprisingly, mlx4 is missing this part (in principle ethtool could still move forward and try the insert). Tested: compiled and run command: phh13:~# ethtool -N eth1 flow-type udp4 queue 4 Added rule with ID 255 Signed-off-by: Luigi Rizzo Reviewed-by: Tariq Toukan Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -1745,6 +1745,7 @@ static int mlx4_en_get_rxnfc(struct net_ err = mlx4_en_get_flow(dev, cmd, cmd->fs.location); break; case ETHTOOL_GRXCLSRLALL: + cmd->data = MAX_NUM_OF_FS_RULES; while ((!err || err == -ENOENT) && priority < cmd->rule_cnt) { err = mlx4_en_get_flow(dev, cmd, i); if (!err)