From patchwork Wed Mar 11 22:32:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222671 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 3C3AFC2BAEE for ; Wed, 11 Mar 2020 22:33:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F5B12074B for ; Wed, 11 Mar 2020 22:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583965993; bh=Ued7EGKHT81xnPQ6g15WMPl0Y7k+whns0tHker0BHKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=B8jww7UtAun3kxzCNNEXFuNOB7nbXjlwN0Pw/zJBy4cSRQyqSWCfVQDn/bXvi8V76 vawqamTxDT9LVljia7+1eNuERy2owoBJA1HB7WzSvi9hM6WxzfQvEPuLMywr3HAeYc tDH5RXBGTqLpTvLjRVyVmfKaocEEEOmSlfekSstA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731329AbgCKWdM (ORCPT ); Wed, 11 Mar 2020 18:33:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:37664 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729799AbgCKWdL (ORCPT ); Wed, 11 Mar 2020 18:33:11 -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 735BA20749; Wed, 11 Mar 2020 22:33:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583965991; bh=Ued7EGKHT81xnPQ6g15WMPl0Y7k+whns0tHker0BHKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XC+bBuJLOw4Xbvr2aI+JwdIFSmlwEi6JLKO0KVKOg255kTWWLSwb4bJH6RO9XlAPw w2f4MPXYeK0DkIKyhFYD7862gmfz8XniDBl+ftNNwnKqaHaUyD3aLsF6M0lZJxiGP5 U+OlsnTYLp/14unauy7b90T7u8wn1Um9HQE6/teE= 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 01/15] net: be2net: reject unsupported coalescing params Date: Wed, 11 Mar 2020 15:32:48 -0700 Message-Id: <20200311223302.2171564-2-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/emulex/benet/be_ethtool.c | 3 +++ include/linux/ethtool.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c index 9d9f0545fbfe..d6ed1d943762 100644 --- a/drivers/net/ethernet/emulex/benet/be_ethtool.c +++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c @@ -1408,6 +1408,9 @@ static int be_set_priv_flags(struct net_device *netdev, u32 flags) } const struct ethtool_ops be_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_USE_ADAPTIVE | + ETHTOOL_COALESCE_USECS_LOW_HIGH, .get_drvinfo = be_get_drvinfo, .get_wol = be_get_wol, .set_wol = be_set_wol, diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 9efeebde3514..acfce915a02b 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -211,6 +211,9 @@ bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32, ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQ) #define ETHTOOL_COALESCE_USE_ADAPTIVE \ (ETHTOOL_COALESCE_USE_ADAPTIVE_RX | ETHTOOL_COALESCE_USE_ADAPTIVE_TX) +#define ETHTOOL_COALESCE_USECS_LOW_HIGH \ + (ETHTOOL_COALESCE_RX_USECS_LOW | ETHTOOL_COALESCE_TX_USECS_LOW | \ + ETHTOOL_COALESCE_RX_USECS_HIGH | ETHTOOL_COALESCE_TX_USECS_HIGH) #define ETHTOOL_COALESCE_PKT_RATE_RX_USECS \ (ETHTOOL_COALESCE_USE_ADAPTIVE_RX | \ ETHTOOL_COALESCE_RX_USECS_LOW | ETHTOOL_COALESCE_RX_USECS_HIGH | \ From patchwork Wed Mar 11 22:32:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222664 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 A0AA3C2BAEE for ; Wed, 11 Mar 2020 22:33:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F1A320746 for ; Wed, 11 Mar 2020 22:33:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583966020; bh=IoBZ+maS4nexZK8c5eWbXLy/jh2CjB2l9DEus+/uqfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=RA/uGCdFWvJfmRb24970V1/K7enfnWnDMVrqHYIWOpR4cP2xvGdsYfBs7u6fmOqLD Kl/ZUGx8BdRebR2+VqQ2Lt4Elj/hlFqXvcVVDqvYoFIvneTCduwSWXHqqEytalCv2V Ot0/kRtNy28ole4Q4J426ffEm98tsI7Qf5nOPWG4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387547AbgCKWdj (ORCPT ); Wed, 11 Mar 2020 18:33:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:37768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731330AbgCKWdN (ORCPT ); Wed, 11 Mar 2020 18:33:13 -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 227892074F; Wed, 11 Mar 2020 22:33:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583965992; bh=IoBZ+maS4nexZK8c5eWbXLy/jh2CjB2l9DEus+/uqfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BPbTGmBXjnWvFHkYZb+9FbGlGB0VUQouThc0vvKmdQRbjw9Se1VbEObnNdkQnJ37O 7EWeTyjOgXSa9x5qxW7R2zqsy+QdFrazrKjzGv5LasuupgdX/wb0+T6w+XCUXOXTDE /yBuBw7r32pz+7lDi6hruWqnOYDHFdmMGqHivneU= 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 03/15] net: fec: reject unsupported coalescing params Date: Wed, 11 Mar 2020 15:32:50 -0700 Message-Id: <20200311223302.2171564-4-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/freescale/fec_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index af7653e341f2..ce154695f67c 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -2641,6 +2641,8 @@ fec_enet_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol) } static const struct ethtool_ops fec_enet_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_MAX_FRAMES, .get_drvinfo = fec_enet_get_drvinfo, .get_regs_len = fec_enet_get_regs_len, .get_regs = fec_enet_get_regs, From patchwork Wed Mar 11 22:32:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222670 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 C87DCC2BAEE for ; Wed, 11 Mar 2020 22:33:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB3742074B for ; Wed, 11 Mar 2020 22:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583965995; bh=zd3VNACH1b5TEwQUvLU2e4G56pBnpG1+6DWLkdG8lcQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=a2oVZEhOg19nZE4XdZwaEz8FCeWOIzJ3sBYxiL8pV5VWMGvVUZmE0ubd7eOO1guhF shC5T4zssWC4ijlzT1GcXhzxBHYL45b7t/oEnYZq4vPdUY8kQjDbhcIzLnMtT+YTyG OpUFG1khuCCAOBvu2eqUpx5D3Qaz5+ZvGWy0oU/s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731357AbgCKWdO (ORCPT ); Wed, 11 Mar 2020 18:33:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:37822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731249AbgCKWdN (ORCPT ); Wed, 11 Mar 2020 18:33:13 -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 ED10920751; Wed, 11 Mar 2020 22:33:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583965993; bh=zd3VNACH1b5TEwQUvLU2e4G56pBnpG1+6DWLkdG8lcQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mkyvnMl/vqhvc/a8Tb6mrFc1GN6z5O2ktJDxh6dRNx7kCCoIYfCRgB/k/iDDNcXzS GBBD1TSYikpIp2bu2nlPWI2q3T2+5iQ3FpRUYrpA9Tgtypdq5p1d1oRV+B9Yg2ybGw s26XHYLM0+pjuw/edgqrC65vf2PKeDrO//sphACA= 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 04/15] net: gianfar: reject unsupported coalescing params Date: Wed, 11 Mar 2020 15:32:51 -0700 Message-Id: <20200311223302.2171564-5-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/freescale/gianfar_ethtool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c index f82e0be4d309..cc7d4f93da54 100644 --- a/drivers/net/ethernet/freescale/gianfar_ethtool.c +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c @@ -1474,6 +1474,8 @@ static int gfar_get_ts_info(struct net_device *dev, } const struct ethtool_ops gfar_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_MAX_FRAMES, .get_drvinfo = gfar_gdrvinfo, .get_regs_len = gfar_reglen, .get_regs = gfar_get_regs, From patchwork Wed Mar 11 22:32:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222665 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 EEC46C0044D for ; Wed, 11 Mar 2020 22:33:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B55A920746 for ; Wed, 11 Mar 2020 22:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583966014; bh=Xh5fNeLwNDTlCuNr2PLHmA9tTgD4KBPsrK+Ba8jqZrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=adel3kj+yHgP3RCjdC0Awpp8H6DgVotMuggv/baCTaFc+Lm8OtdQynq45n7EulpIs g3JW3emMn8EKaDOgHyEVkR2FxtMQHVD4hAvgdesE9z3l0y6bQQ/6rGVxHC7OvG9OQU +iIJsQx+2duc83yUPJ+jdta5olbVN/JizvhjRpxE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387518AbgCKWdd (ORCPT ); Wed, 11 Mar 2020 18:33:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:37954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730304AbgCKWdQ (ORCPT ); Wed, 11 Mar 2020 18:33:16 -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 6F54620750; Wed, 11 Mar 2020 22:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583965996; bh=Xh5fNeLwNDTlCuNr2PLHmA9tTgD4KBPsrK+Ba8jqZrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VoYb8zNoQbOTkLQCqV1RK4WuAJrj7zSu74zlAaUUW/Xw18sba6CgYekmwy1185nJS UJEmhB04oELeAJnAQqwXd7fcbAMmXX3QRmycPewpge9HxjHhDR0MZn/VpUgggh96W4 qn/4izaHDbj3qiytycMvJqhpCSiBVxUwIkWB9hCg= 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 07/15] net: e1000: reject unsupported coalescing params Date: Wed, 11 Mar 2020 15:32:54 -0700 Message-Id: <20200311223302.2171564-8-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/e1000/e1000_ethtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c index be56e631d693..6f45df5690d4 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c +++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c @@ -1852,6 +1852,7 @@ static void e1000_get_strings(struct net_device *netdev, u32 stringset, } static const struct ethtool_ops e1000_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS, .get_drvinfo = e1000_get_drvinfo, .get_regs_len = e1000_get_regs_len, .get_regs = e1000_get_regs, From patchwork Wed Mar 11 22:32:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222666 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 69D7AC2BB1D for ; Wed, 11 Mar 2020 22:33:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C34D20746 for ; Wed, 11 Mar 2020 22:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583966011; bh=DrOJj7FblmzHCyeU8OeiFNaGZbNA6NVAq1m6hU7iBH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=b1mrxaJB8nDyMm6FRLDCSyGuuCOZaQtJmGa2ckH0YBf8So5DsPkLJpa7I9o84JCus E7aH4MXiS/4diD7EyBTV+HFW/2W/vY/Lsoulvsl31zsAN/w5IKEgkIQSK17anPZjk7 4Z8DrLyWGFPnxy1RsGRwe6Z0aBC58myb19GakMUY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387409AbgCKWdS (ORCPT ); Wed, 11 Mar 2020 18:33:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:37976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731349AbgCKWdR (ORCPT ); Wed, 11 Mar 2020 18:33:17 -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 43A0A20752; Wed, 11 Mar 2020 22:33:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583965996; bh=DrOJj7FblmzHCyeU8OeiFNaGZbNA6NVAq1m6hU7iBH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HeGu7rj4YUUJGZCL+bsE/oyRqQiCDKJD4fCsjbixVXoeYf3etnsIdviP6Z1FIXd22 VzdqV/ZhV7CfhZDmG/zX8JNeT6P+3F79OhsihfD40Oh65XlR/HoMsjsggckBkwvXko x/3RxU5acAgXb/L9kNyDyt2ve90AYR83TUKXOA0g= 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 08/15] net: fm10k: reject unsupported coalescing params Date: Wed, 11 Mar 2020 15:32:55 -0700 Message-Id: <20200311223302.2171564-9-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/fm10k/fm10k_ethtool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c index 68edf55ac906..37fbc646deb9 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c @@ -1151,6 +1151,8 @@ static int fm10k_set_channels(struct net_device *dev, } static const struct ethtool_ops fm10k_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_USE_ADAPTIVE, .get_strings = fm10k_get_strings, .get_sset_count = fm10k_get_sset_count, .get_ethtool_stats = fm10k_get_ethtool_stats, 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, From patchwork Wed Mar 11 22:32:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222669 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 69432C2BB1D for ; Wed, 11 Mar 2020 22:33:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 49E642074B for ; Wed, 11 Mar 2020 22:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583966002; bh=IZjE32cNPfrCsA261hM6rUQzaWjmB0wOkaX8g0K06oY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=A4Dl12i5Q8xkIKVdDXlTF7iSLpTUBTx7TWqhw2/oygMey9/yGqHu+6M/+Z6VskgZH dVqNGrDGBSA7JTCc2+Aq5qKPnfnCLnmtX/uiY9ZbU/oTiUfZO2GRQt959nima8kwHP Au5cV5X34ZJpPruQIzNA6WeJlqY8e/af3HxY7G8Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387484AbgCKWdV (ORCPT ); Wed, 11 Mar 2020 18:33:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:38158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387476AbgCKWdU (ORCPT ); Wed, 11 Mar 2020 18:33:20 -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 875CC20754; Wed, 11 Mar 2020 22:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583966000; bh=IZjE32cNPfrCsA261hM6rUQzaWjmB0wOkaX8g0K06oY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vo5LMHFP85w8yvrwET0DAxYkrYVnHBviG0JORjGBR0MzN4BEFsxizK0azZ4FI9sGk j9P5s0VWI4/1+r09PojPZJl+wjpV3KO1otf6nMNVcYqGv78j52FgUIF4dE7rAoHtcB fdxDgFRKToXxiW5e/zeSeSqYeU47AADBkD1qU99Q= 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 12/15] net: igbvf: reject unsupported coalescing params Date: Wed, 11 Mar 2020 15:32:59 -0700 Message-Id: <20200311223302.2171564-13-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/igbvf/ethtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/igbvf/ethtool.c b/drivers/net/ethernet/intel/igbvf/ethtool.c index 3ae358b35227..9217d150e286 100644 --- a/drivers/net/ethernet/intel/igbvf/ethtool.c +++ b/drivers/net/ethernet/intel/igbvf/ethtool.c @@ -424,6 +424,7 @@ static void igbvf_get_strings(struct net_device *netdev, u32 stringset, } static const struct ethtool_ops igbvf_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS, .get_drvinfo = igbvf_get_drvinfo, .get_regs_len = igbvf_get_regs_len, .get_regs = igbvf_get_regs, From patchwork Wed Mar 11 22:33:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222668 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 E7FBDC2BB1D for ; Wed, 11 Mar 2020 22:33:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAB732074B for ; Wed, 11 Mar 2020 22:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583966005; bh=DCA9Vqez8sEHk63Rk3h6Ni55LoHVCMrL/2cPBxgJLsM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=d75R/Lvl98V0izoplQhi4pcriNp/fqlET+XBjXIJG9GCiMd/h1IGf1NlSBtOPTFxF IDmwSvAtUIBzPQo4JwtFhYNvSPCA8xFL8pDujwIitMvqMN8fmSqobrPAxEVDlSvaGh moviD63qswgp/Mlx9B9q1exGn/VavSzf+NgFdHlo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387500AbgCKWdX (ORCPT ); Wed, 11 Mar 2020 18:33:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:38246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387485AbgCKWdW (ORCPT ); Wed, 11 Mar 2020 18:33:22 -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 3166E20755; Wed, 11 Mar 2020 22:33:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583966001; bh=DCA9Vqez8sEHk63Rk3h6Ni55LoHVCMrL/2cPBxgJLsM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ca0+BnOlMYjglgivSn6PxQ/oiSz18sXZbXPdXqEPk5DBtE//SZowHW1Vbb8DkNLld LS6t2U/3xfaaPIDaItrC3w3J288j4TsAWgVQZu9p+a05JM8WNwnbvNPS58WQfaSCnT 7NYbndao7OwOpA/HYYIJSxdP11xZY9OWTmlHj2AM= 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 14/15] net: ixgbe: reject unsupported coalescing params Date: Wed, 11 Mar 2020 15:33:01 -0700 Message-Id: <20200311223302.2171564-15-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/ixgbe/ixgbe_ethtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 7c52ae8ac005..c6bf0a50ee63 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -3444,6 +3444,7 @@ static int ixgbe_set_priv_flags(struct net_device *netdev, u32 priv_flags) } static const struct ethtool_ops ixgbe_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS, .get_drvinfo = ixgbe_get_drvinfo, .get_regs_len = ixgbe_get_regs_len, .get_regs = ixgbe_get_regs,