From patchwork Tue Mar 10 02:14: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: 222793 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 EC218C10F25 for ; Tue, 10 Mar 2020 02:15:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C4E2024673 for ; Tue, 10 Mar 2020 02:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806520; bh=6wq17jL7F5R2BpngskcvUwbg8cdLgnNKd/Lp7H5blDQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=zUt3xIf53ynZvl2ojbQI8XvSx9R/JAW07lJqaKMsFHaGO9J1OF2rTLy1xMUWv6NJg iYzqeS6w8ox47ew37Qi3kZTm0aofeg3p2LVjXu19W1BtcDu/C1salamARkcxeCHRja 30WvPvdjsb/PosUl66QrZE0xWR0BHmGOIDPTJPhs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbgCJCPT (ORCPT ); Mon, 9 Mar 2020 22:15:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:35514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbgCJCPS (ORCPT ); Mon, 9 Mar 2020 22:15: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 E0B3E24673; Tue, 10 Mar 2020 02:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806518; bh=6wq17jL7F5R2BpngskcvUwbg8cdLgnNKd/Lp7H5blDQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lbps7qdjUb0+gJTbt4tRUgG9Up3N1AbZDrc1xYxra4cVkW5wRpef4PjuNrygBE3dP dDTeM2dDAMSTP3JMqVKbuYF4XsHLpA8YOZwT2tOJf+o2EM8H1b9dzXqdfsVa6mWNLy X3sgg6L5t8qHRQelVNEAsNSCCx5d1/wDjhTVw/50= 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 02/15] net: aquantia: reject all unsupported coalescing params Date: Mon, 9 Mar 2020 19:14:59 -0700 Message-Id: <20200310021512.1861626-3-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 only rejected some of the unsupported parameters. Signed-off-by: Jakub Kicinski --- .../net/ethernet/aquantia/atlantic/aq_ethtool.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c b/drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c index 0bdaa0d785b7..6781256a318a 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c @@ -386,21 +386,10 @@ static int aq_ethtool_set_coalesce(struct net_device *ndev, cfg = aq_nic_get_cfg(aq_nic); - /* This is not yet supported - */ - if (coal->use_adaptive_rx_coalesce || coal->use_adaptive_tx_coalesce) - return -EOPNOTSUPP; - /* Atlantic only supports timing based coalescing */ if (coal->rx_max_coalesced_frames > 1 || - coal->rx_coalesce_usecs_irq || - coal->rx_max_coalesced_frames_irq) - return -EOPNOTSUPP; - - if (coal->tx_max_coalesced_frames > 1 || - coal->tx_coalesce_usecs_irq || - coal->tx_max_coalesced_frames_irq) + coal->tx_max_coalesced_frames > 1) return -EOPNOTSUPP; /* We do not support frame counting. Check this @@ -742,6 +731,8 @@ static int aq_ethtool_set_priv_flags(struct net_device *ndev, u32 flags) } const struct ethtool_ops aq_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_MAX_FRAMES, .get_link = aq_ethtool_get_link, .get_regs_len = aq_ethtool_get_regs_len, .get_regs = aq_ethtool_get_regs, From patchwork Tue Mar 10 02:15:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222792 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 5B9E3C10F29 for ; Tue, 10 Mar 2020 02:15:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E57424676 for ; Tue, 10 Mar 2020 02:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806526; bh=VS9z+1WowANmnzlwoFN9Z2FW4fw2YfajZjGrbcSyN3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=XbR0VKxt2X9iNvTPKMhdrIPFBsV2ZoqvStifT0JwrAOBw2Eim3J83JoC14/YRzRPC t/dnObkylUMRNgmxsMDJlbYwYe+znnXWM9ezTTJ82US1tI3l8/A936pLlvEffm3Oq6 U0dHwNkISDGFM7qnsB23gIG8l+xx8f62uTQWgwgE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726757AbgCJCPZ (ORCPT ); Mon, 9 Mar 2020 22:15:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:35632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbgCJCPW (ORCPT ); Mon, 9 Mar 2020 22:15: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 B83172465A; Tue, 10 Mar 2020 02:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806521; bh=VS9z+1WowANmnzlwoFN9Z2FW4fw2YfajZjGrbcSyN3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XF89I0dLJSqzOk5iIdAq6tAnZ2M1FfaFaBcvFTJbKqZMN+gGlmS6LoXaSn7mt15XA IJocRk2wB97MzbzEEe+TyIzSqAL16kwlf8TsG0yUfwpI9wyyF0V17CNoYyOgvbk0E+ Vtb6hf+zW4tpljQuNlEfPKdqDEAZeufj7uRqutNc= 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 05/15] net: bnx2x: reject unsupported coalescing params Date: Mon, 9 Mar 2020 19:15:02 -0700 Message-Id: <20200310021512.1861626-6-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/broadcom/bnx2x/bnx2x_ethtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index 5ccab7bb9686..7cea33803f7f 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c @@ -3656,6 +3656,7 @@ static int bnx2x_get_ts_info(struct net_device *dev, } static const struct ethtool_ops bnx2x_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS, .get_drvinfo = bnx2x_get_drvinfo, .get_regs_len = bnx2x_get_regs_len, .get_regs = bnx2x_get_regs, From patchwork Tue Mar 10 02:15:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222791 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 708DCC10F27 for ; Tue, 10 Mar 2020 02:15:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 417ED24676 for ; Tue, 10 Mar 2020 02:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806529; bh=G6vvPWKbYx9e8RUVzw5sRQCo1554TGd8JMnHv1JkSTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0woJOn3as9RePaLNp+jL80l0Lojl9bgLdQSiiXE+ltFXe97iRNQ/0De6j88QrHoXC aiJqRP2EB6meCXX5Kyx1O3WhecvDeJj3qsjMyZtc8AAO+a1vaoDbQV/DN2xKMHkjI7 panbP0UYxchpDj8CMAWS+yrdBxurWhJjBg2s1FdQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726788AbgCJCP2 (ORCPT ); Mon, 9 Mar 2020 22:15:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:35660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbgCJCPY (ORCPT ); Mon, 9 Mar 2020 22:15:24 -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 5F45D24679; Tue, 10 Mar 2020 02:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806524; bh=G6vvPWKbYx9e8RUVzw5sRQCo1554TGd8JMnHv1JkSTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zjf+77aZ81R9jGlhpARsClt3U1MjZanHLyBetWhEEH9xrUpDSOV+epFrwVppyFRuP /AqXMM+s3vaiWN2c76yuIxcwXITzfP9xWbZvhRl9u/7gE3oPOI7XpH1oVhBmtJZzyk 0Bx37A6yRJFuW+E+rj3RSF29eO0hvo08cOlmN7Jg= 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 07/15] net: tg3: reject unsupported coalescing params Date: Mon, 9 Mar 2020 19:15:04 -0700 Message-Id: <20200310021512.1861626-8-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/broadcom/tg3.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 16c1c9f150f1..ff98a82b7bc4 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -14153,6 +14153,11 @@ static int tg3_get_eee(struct net_device *dev, struct ethtool_eee *edata) } static const struct ethtool_ops tg3_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_MAX_FRAMES | + ETHTOOL_COALESCE_USECS_IRQ | + ETHTOOL_COALESCE_MAX_FRAMES_IRQ | + ETHTOOL_COALESCE_STATS_BLOCK_USECS, .get_drvinfo = tg3_get_drvinfo, .get_regs_len = tg3_get_regs_len, .get_regs = tg3_get_regs, From patchwork Tue Mar 10 02:15:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222787 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 EAFE6C10F25 for ; Tue, 10 Mar 2020 02:15:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B49482146E for ; Tue, 10 Mar 2020 02:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806549; bh=yM975sCXfhKdsrwOu9EN7k4m+pjnXh80jfuWr3lwQ2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OzEF2GLOuqzr20XHC4Kwz+VJyp3iwcj7w3RjSwRLQakdV8UoTTSLGl8vxpEdUCT4p eKVSA4YXUH7NvdjzjfFIFMdNSUMYnaCd1vHCc9s7WH8/IyHiGBdTgGJy8I1m+PwLCK s28HciI0KViwzFlgU8JeTk00EOCiNKj3L2iMxqkc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726982AbgCJCPs (ORCPT ); Mon, 9 Mar 2020 22:15:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:35696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726766AbgCJCP0 (ORCPT ); Mon, 9 Mar 2020 22:15:26 -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 A48F524671; Tue, 10 Mar 2020 02:15:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806525; bh=yM975sCXfhKdsrwOu9EN7k4m+pjnXh80jfuWr3lwQ2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KmaHVq86KnkNET+lKOiKvwlW3fXagd7gTo9Mbkq/r6yzFep7zs5Tr6bzK4iwawqdX c0eFgVLGbiiiXn7hdJT9J4Ywk0uhl3AJqDDt1ghKOFNyT2ES1mRGP3ZvNu1GXqv7sN VSqfim/QauKbzN5XWYRk/cmSazGz/eml09JAX5iA= 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 08/15] net: bna: reject unsupported coalescing params Date: Mon, 9 Mar 2020 19:15:05 -0700 Message-Id: <20200310021512.1861626-9-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/brocade/bna/bnad_ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c index 505e9c6d74a6..588c4804d10a 100644 --- a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c +++ b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c @@ -1115,6 +1115,9 @@ bnad_flash_device(struct net_device *netdev, struct ethtool_flash *eflash) } static const struct ethtool_ops bnad_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_TX_MAX_FRAMES | + ETHTOOL_COALESCE_USE_ADAPTIVE_RX, .get_drvinfo = bnad_get_drvinfo, .get_wol = bnad_get_wol, .get_link = ethtool_op_get_link, From patchwork Tue Mar 10 02:15:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222790 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 61F7EC10F27 for ; Tue, 10 Mar 2020 02:15:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C6602146E for ; Tue, 10 Mar 2020 02:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806532; bh=6bRE9PkgYVxymzD8kC9xhQkhNEMxK8hdIufntyLFnTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=PUTEu5ftdbHtgMZoW5L09dgM0SjC2y0St9y8JFjFhALSNexEFuQ0jS1gnoh9fQZx1 gt409Gkp+FS/027CLopPrtc8YucR5kN78kv+HMFTLSpghEYTn7blmVVLhSjGbDmf32 QgoKh978roLkZlpguoie4EGsmpA7E8iTNSj6Od5k= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726875AbgCJCPb (ORCPT ); Mon, 9 Mar 2020 22:15:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:35726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726779AbgCJCP1 (ORCPT ); Mon, 9 Mar 2020 22:15:27 -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 EAB7624654; Tue, 10 Mar 2020 02:15:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806527; bh=6bRE9PkgYVxymzD8kC9xhQkhNEMxK8hdIufntyLFnTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HvU3OyaThMhb1tgSm+TSKmGi4o7QcpigUqitrnIRNO6Lv854xGJE80ua4wIZAh9tu LzBR1w3zd7EXQKRwQ3GDTvFgOXSRoP07VwT0nhJ6bkdaWvuTNTJallW1XxF5AbAwy/ S/RncS0+SuzK7BXel08ONZu910sG6wY/+6D8maHU= 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 09/15] net: liquidio: reject unsupported coalescing params Date: Mon, 9 Mar 2020 19:15:06 -0700 Message-Id: <20200310021512.1861626-10-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/cavium/liquidio/lio_ethtool.c | 11 +++++++++++ include/linux/ethtool.h | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c index 2b27e3aad9db..16eebfc52109 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c @@ -3097,7 +3097,17 @@ static int lio_set_fecparam(struct net_device *netdev, return 0; } +#define LIO_ETHTOOL_COALESCE (ETHTOOL_COALESCE_RX_USECS | \ + ETHTOOL_COALESCE_MAX_FRAMES | \ + ETHTOOL_COALESCE_USE_ADAPTIVE | \ + ETHTOOL_COALESCE_RX_MAX_FRAMES_LOW | \ + ETHTOOL_COALESCE_TX_MAX_FRAMES_LOW | \ + ETHTOOL_COALESCE_RX_MAX_FRAMES_HIGH | \ + ETHTOOL_COALESCE_TX_MAX_FRAMES_HIGH | \ + ETHTOOL_COALESCE_PKT_RATE_RX_USECS) + static const struct ethtool_ops lio_ethtool_ops = { + .supported_coalesce_params = LIO_ETHTOOL_COALESCE, .get_link_ksettings = lio_get_link_ksettings, .set_link_ksettings = lio_set_link_ksettings, .get_fecparam = lio_get_fecparam, @@ -3128,6 +3138,7 @@ static const struct ethtool_ops lio_ethtool_ops = { }; static const struct ethtool_ops lio_vf_ethtool_ops = { + .supported_coalesce_params = LIO_ETHTOOL_COALESCE, .get_link_ksettings = lio_get_link_ksettings, .get_link = ethtool_op_get_link, .get_drvinfo = lio_get_vf_drvinfo, diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index e464c946bca4..9efeebde3514 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -211,6 +211,11 @@ 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_PKT_RATE_RX_USECS \ + (ETHTOOL_COALESCE_USE_ADAPTIVE_RX | \ + ETHTOOL_COALESCE_RX_USECS_LOW | ETHTOOL_COALESCE_RX_USECS_HIGH | \ + ETHTOOL_COALESCE_PKT_RATE_LOW | ETHTOOL_COALESCE_PKT_RATE_HIGH | \ + ETHTOOL_COALESCE_RATE_SAMPLE_INTERVAL) /** * struct ethtool_ops - optional netdev operations 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, From patchwork Tue Mar 10 02:15:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222788 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 1B7B9C10F27 for ; Tue, 10 Mar 2020 02:15:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DFA972146E for ; Tue, 10 Mar 2020 02:15:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806540; bh=YpMxp2+vJQBfB/NnxZ4O+fzgbPHp13L/rxc5Cwd1Y9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cpiEmAVR9bKPZEfQL7aDw/NMx1mIpVYJ/5P/tY4F8vNZn1/hB82DOWZTOEpI4VwzD ABEXJmStIHN6Ar12P0X25gmr057CMfrXqCSbMaRs9++u0Zypn1kNf4DI5l421ziMmF fiBs6A+oQ6BEuFDMTn9YYwrPK9ZFlbkTA9AzXvY0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726949AbgCJCPh (ORCPT ); Mon, 9 Mar 2020 22:15:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:35924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726893AbgCJCPf (ORCPT ); Mon, 9 Mar 2020 22:15:35 -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 B3FB924673; Tue, 10 Mar 2020 02:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806534; bh=YpMxp2+vJQBfB/NnxZ4O+fzgbPHp13L/rxc5Cwd1Y9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IExm13F1N6MVuJDD5rVGMJCm7WM5DJi/+Z0tG2lft4M6UISr2BjaWhgZjThHA1SCr pawuGyNc7YFuefXF35FCxPe5C3kjcCSvuNQovFjJAlEKDyJIZ0i3XeGx+ka7/UL60j CYS+TLaZ9EFXrvgjFGo4xGU6O/hsRif8szcs0zuI= 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 15/15] net: gemini: reject unsupported coalescing params Date: Mon, 9 Mar 2020 19:15:12 -0700 Message-Id: <20200310021512.1861626-16-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/cortina/gemini.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index dc2a4adab793..5bff5c2be88b 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -2222,6 +2222,8 @@ static const struct net_device_ops gmac_351x_ops = { }; static const struct ethtool_ops gmac_351x_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS | + ETHTOOL_COALESCE_MAX_FRAMES, .get_sset_count = gmac_get_sset_count, .get_strings = gmac_get_strings, .get_ethtool_stats = gmac_get_ethtool_stats,