From patchwork Tue Mar 10 02:15:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222789 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 B749EC10F25 for ; Tue, 10 Mar 2020 02:15:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9184424649 for ; Tue, 10 Mar 2020 02:15:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806535; bh=6fY7/skNccQh2XI4zTdmSTKvXT1NyPSOTOUz9M85des=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Yubkwtfca097uqJoiiKE8wQJ0Y7Od2np1dabrY6W+xiqOybmFiDzT3LAUVLhQtkxg GsZKIxhkM5a1T0iHlYxDFzVs2sQxsyeCXTFPSMXf1kLh3dSxAx2TwriN6o/t0KDUC7 Nslz9pdqM17ep7TiFsxd2RBOv7IlTzBpJS5a0qho= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726918AbgCJCPe (ORCPT ); Mon, 9 Mar 2020 22:15:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:35842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726893AbgCJCPd (ORCPT ); Mon, 9 Mar 2020 22:15:33 -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 2AA4024677; Tue, 10 Mar 2020 02:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806532; bh=6fY7/skNccQh2XI4zTdmSTKvXT1NyPSOTOUz9M85des=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RI3/t0Oed8C++RRfx3WDhZWZmE0A/PaDj6InR1t4qrhjVgg19sjm1HNN1No2D+tx9 YYfqGfBu1dWr+4pCW7za0XuvTpAdx7DdOGeIFwPE0y4L9rNIxDSN9eUBvzvluflBoq 8blScPYHIU9IwsrXjyw8mYqR1ASjw2OQjJGB5Djg= From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, akiyano@amazon.com, netanel@amazon.com, gtzalik@amazon.com, irusskikh@marvell.com, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, rmody@marvell.com, GR-Linux-NIC-Dev@marvell.com, aelior@marvell.com, skalluru@marvell.com, GR-everest-linux-l2@marvell.com, opendmb@gmail.com, siva.kallam@broadcom.com, prashant@broadcom.com, mchan@broadcom.com, dchickles@marvell.com, sburla@marvell.com, fmanlunas@marvell.com, tariqt@mellanox.com, vishal@chelsio.com, leedom@chelsio.com, ulli.kroll@googlemail.com, linus.walleij@linaro.org, Jakub Kicinski Subject: [PATCH net-next 13/15] net: cxgb4: reject unsupported coalescing params Date: Mon, 9 Mar 2020 19:15:10 -0700 Message-Id: <20200310021512.1861626-14-kuba@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200310021512.1861626-1-kuba@kernel.org> References: <20200310021512.1861626-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/chelsio/cxgb4/cxgb4_ethtool.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c index 2cf35696b1c4..398ade42476c 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c @@ -1576,6 +1576,10 @@ static int cxgb4_set_priv_flags(struct net_device *netdev, u32 flags) } static const struct ethtool_ops cxgb_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_RX_MAX_FRAMES | + ETHTOOL_COALESCE_TX_USECS_IRQ | + ETHTOOL_COALESCE_USE_ADAPTIVE_RX, .get_link_ksettings = get_link_ksettings, .set_link_ksettings = set_link_ksettings, .get_fecparam = get_fecparam,