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=-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 795FAC3F2D7 for ; Wed, 4 Mar 2020 03:56:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 50C892146E for ; Wed, 4 Mar 2020 03:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583294165; bh=A2nLRdbpx5zpOxHK5my7qpjZdjz9Rc+1Y5V02visWvk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=XV5km7EO1hD97LOf7kV5EcN1EtUbjFtotfaP4wVSGbyV8vajtq+Oq95FlhevTmAO4 UULFsbW83QkR3h4Y5W2B8MF+UnKrDGHnnwUhiiWflJx8Ex1w1mZznsbnSDAx56b11x hkn2CI+73r+37Q7Uo+zCFXirhz/N70EylpxmswHg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727508AbgCDD4E (ORCPT ); Tue, 3 Mar 2020 22:56:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:49560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727367AbgCDD4C (ORCPT ); Tue, 3 Mar 2020 22:56:02 -0500 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 C336721556; Wed, 4 Mar 2020 03:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583294162; bh=A2nLRdbpx5zpOxHK5my7qpjZdjz9Rc+1Y5V02visWvk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nTdia89/iq4atNrzaSVzgaaHwdYml6R8lSFqEef+DkyCuzkxRHKnwLGtZW0mrbhF7 ePJhb1VSNj4hVV3Xyf+am7avVxg9wm/IVIu3g/AJsJ/kRXgUvcHvx7HP/3TwwIm+aU mD5mHGqIyGeErcaZo9b6BCmwXAqNytFrTus7q248= From: Jakub Kicinski To: davem@davemloft.net Cc: mkubecek@suse.cz, thomas.lendacky@amd.com, benve@cisco.com, _govind@gmx.com, pkaustub@cisco.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com, snelson@pensando.io, yisen.zhuang@huawei.com, salil.mehta@huawei.com, jeffrey.t.kirsher@intel.com, jacob.e.keller@intel.com, alexander.h.duyck@linux.intel.com, michael.chan@broadcom.com, saeedm@mellanox.com, leon@kernel.org, netdev@vger.kernel.org, Jakub Kicinski Subject: [PATCH net-next 06/12] ionic: let core reject the unsupported coalescing parameters Date: Tue, 3 Mar 2020 19:54:55 -0800 Message-Id: <20200304035501.628139-7-kuba@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200304035501.628139-1-kuba@kernel.org> References: <20200304035501.628139-1-kuba@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Set ethtool_ops->coalesce_types to let the core reject unsupported coalescing parameters. This driver correctly rejects all unsupported parameters. No functional changes. Signed-off-by: Jakub Kicinski --- .../ethernet/pensando/ionic/ionic_ethtool.c | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c index f778fff034f5..83ea35715533 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c @@ -412,28 +412,6 @@ static int ionic_set_coalesce(struct net_device *netdev, unsigned int i; u32 coal; - if (coalesce->rx_max_coalesced_frames || - coalesce->rx_coalesce_usecs_irq || - coalesce->rx_max_coalesced_frames_irq || - coalesce->tx_max_coalesced_frames || - coalesce->tx_coalesce_usecs_irq || - coalesce->tx_max_coalesced_frames_irq || - coalesce->stats_block_coalesce_usecs || - coalesce->use_adaptive_rx_coalesce || - coalesce->use_adaptive_tx_coalesce || - coalesce->pkt_rate_low || - coalesce->rx_coalesce_usecs_low || - coalesce->rx_max_coalesced_frames_low || - coalesce->tx_coalesce_usecs_low || - coalesce->tx_max_coalesced_frames_low || - coalesce->pkt_rate_high || - coalesce->rx_coalesce_usecs_high || - coalesce->rx_max_coalesced_frames_high || - coalesce->tx_coalesce_usecs_high || - coalesce->tx_max_coalesced_frames_high || - coalesce->rate_sample_interval) - return -EINVAL; - ident = &lif->ionic->ident; if (ident->dev.intr_coal_div == 0) { netdev_warn(netdev, "bad HW value in dev.intr_coal_div = %d\n", @@ -784,6 +762,7 @@ static int ionic_nway_reset(struct net_device *netdev) } static const struct ethtool_ops ionic_ethtool_ops = { + .coalesce_types = ETHTOOL_COALESCE_USECS, .get_drvinfo = ionic_get_drvinfo, .get_regs_len = ionic_get_regs_len, .get_regs = ionic_get_regs, -- 2.24.1