From patchwork Wed Mar 11 22:32:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222667 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 2F009C2BB1D for ; Wed, 11 Mar 2020 22:33:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 072AE2074B for ; Wed, 11 Mar 2020 22:33:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583966008; bh=HZNkoQMRhkW1C3Eelne01SBthQtgg3PK0B8b8/mY/tY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cPRaR5mpcG1vVrtw4ne4DmLZOaxZimtfDSR/nMpCByyAlgmXG7JcewWHi0uDVQ+Zq AeiWXYnN//0HZ9gQ0svDYP3V5bG/pdjmP9EyoSIFtgvfyMI8aBxGOJIIKam28p4vVs 4OlhNZ/UkwIX1jawpW57M4mzyJl1j8d1mbuFX3S4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387458AbgCKWdT (ORCPT ); Wed, 11 Mar 2020 18:33:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:38014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731382AbgCKWdS (ORCPT ); Wed, 11 Mar 2020 18:33:18 -0400 Received: from kicinski-fedora-PC1C0HJN.thefacebook.com (unknown [163.114.132.128]) (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 16E8C20753; Wed, 11 Mar 2020 22:33:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583965997; bh=HZNkoQMRhkW1C3Eelne01SBthQtgg3PK0B8b8/mY/tY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oN0SjkHH92Cs0vQ3etHruqjzLdTutwXaD4Fp+E9m62QS+S3LquxuSxyLiCePhxJCb dF+ODkBvMKQtpByzV9mcdpP1dM8wZmKD6sRaNzGCzW6PCou+N5VM1fOL38z1kPbAEO GII3BdcgeQQ+e5Ma5kvVlUtkMw6qJvCo6W1RmB24= From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, mkubecek@suse.cz, sathya.perla@broadcom.com, ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com, somnath.kotur@broadcom.com, madalin.bucur@nxp.com, fugang.duan@nxp.com, claudiu.manoil@nxp.com, yisen.zhuang@huawei.com, salil.mehta@huawei.com, jeffrey.t.kirsher@intel.com, jacob.e.keller@intel.com, alexander.h.duyck@linux.intel.com, Jakub Kicinski Subject: [PATCH net-next 09/15] net: i40e: reject unsupported coalescing params Date: Wed, 11 Mar 2020 15:32:56 -0700 Message-Id: <20200311223302.2171564-10-kuba@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200311223302.2171564-1-kuba@kernel.org> References: <20200311223302.2171564-1-kuba@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Set ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters. This driver did not previously reject unsupported parameters. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c index 317f3f1458db..aa8026b1eb81 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -5249,6 +5249,11 @@ static const struct ethtool_ops i40e_ethtool_recovery_mode_ops = { }; static const struct ethtool_ops i40e_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_MAX_FRAMES_IRQ | + ETHTOOL_COALESCE_USE_ADAPTIVE | + ETHTOOL_COALESCE_RX_USECS_HIGH | + ETHTOOL_COALESCE_TX_USECS_HIGH, .get_drvinfo = i40e_get_drvinfo, .get_regs_len = i40e_get_regs_len, .get_regs = i40e_get_regs,