Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3492450pxf; Mon, 29 Mar 2021 03:54:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsHYZx98f+TJ0cO+25bK84Bqtu0bppHIGXQ7CEbsOcqsZWTmYMrTxplCROsdtbpOqmPpmp X-Received: by 2002:a17:906:dbd0:: with SMTP id yc16mr27862517ejb.71.1617015296829; Mon, 29 Mar 2021 03:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617015296; cv=none; d=google.com; s=arc-20160816; b=BEtzFDOhDoxP317hiJboXiT/QKOb57tw5dlXBHeNbpxcOsjt/pCZ/0Q24s5zXI6lum UjgPToZNoggkl94p2U4c/iEnDew0JQlvYcSKHMfMSvv9HQByBWC/oQ2WHB7oDU3S3Fhe hdMYuA4e1mY0ZSunHjss7i7NW3rFILNuG65FJBCF4RfIimFXOO66qIQetfYR9e5BwpbU NRs9Q3dV7y08VUoYedCC4cF9dmxQYCM3xA+zWIt68yqh1ICjyfrlg+7gmYOTSpXRqtwd hmuLS8z3c8HIBL/yqNoyXbSYS/acpsPS8EyF+LGneIASXh05BPHKPQ8fvEMCE2jmE3FQ 7JtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BNWAvUWtdeclT76CV9+JEEKzgxYqdLmbkGTTHegmLGc=; b=Dxoc/Fj8SWCGymOQB+fGnfIyA+R43sarm0hhlotzwSXJyM5WbmNEO202Ew/KAJqxcq WB7WRoAwMD8tHYJ4ImTBauYI77zoXEt2xHw2jXKIisZ6YvY144788iLtDQbCvD2viVp3 zTARJatamjti5bz9aFFKIOGn5KTH/iLLcxoPfbjvaQUbPbywYg10DrFmwTB6zGWOlvap 1pjovZcmByA4tfdFLSzpJNJGiNi7zApcfFQ3kuG7X7eWZe56XXOL+RO2qv9IjTTVJNF5 LHL5FH84ke4/0/etfjvbINMsoxn9c3ILhaW66muWuGZIa+8//Qy0nWrKaSaBcuPjVwp5 nuVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0vtjj2U7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq17si13710598ejb.391.2021.03.29.03.54.34; Mon, 29 Mar 2021 03:54:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0vtjj2U7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235310AbhC2Imk (ORCPT + 99 others); Mon, 29 Mar 2021 04:42:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:41084 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232726AbhC2IYX (ORCPT ); Mon, 29 Mar 2021 04:24:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 701A66195B; Mon, 29 Mar 2021 08:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006255; bh=xyP2UB9BdRoWwoaWobPKiomwwDNHLHWEVcDBrD8BMwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0vtjj2U74Xn+FOLsjUYX+Pr9wz/+bkWfZPgiEsreQfYzEFzBYNFHko/nWhHjiE4+7 uuqNp5aaqTHxvofaRtfCSR1w2aeL84KtfPtOCgtf3AN/mFxizdxvNjyGsLm9hIP5oD y85/tMTZlGs6IxDqYq+Q8h7sjGKdL9hLzVrIiWQs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aya Levin , Tariq Toukan , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.10 173/221] net/mlx5e: Fix error path for ethtool set-priv-flag Date: Mon, 29 Mar 2021 09:58:24 +0200 Message-Id: <20210329075634.924069516@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aya Levin [ Upstream commit 4eacfe72e3e037e3fc019113df32c39a705148c2 ] Expose error value when failing to comply to command: $ ethtool --set-priv-flags eth2 rx_cqe_compress [on/off] Fixes: be7e87f92b58 ("net/mlx5e: Fail safe cqe compressing/moderation mode setting") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c index b8622440243b..bcd05457647e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c @@ -1873,6 +1873,7 @@ static int set_pflag_rx_cqe_compress(struct net_device *netdev, { struct mlx5e_priv *priv = netdev_priv(netdev); struct mlx5_core_dev *mdev = priv->mdev; + int err; if (!MLX5_CAP_GEN(mdev, cqe_compression)) return -EOPNOTSUPP; @@ -1882,7 +1883,10 @@ static int set_pflag_rx_cqe_compress(struct net_device *netdev, return -EINVAL; } - mlx5e_modify_rx_cqe_compression_locked(priv, enable); + err = mlx5e_modify_rx_cqe_compression_locked(priv, enable); + if (err) + return err; + priv->channels.params.rx_cqe_compress_def = enable; return 0; -- 2.30.1