netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
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 <kuba@kernel.org>
Subject: [PATCH net-next 02/15] net: aquantia: reject all unsupported coalescing params
Date: Mon,  9 Mar 2020 19:14:59 -0700	[thread overview]
Message-ID: <20200310021512.1861626-3-kuba@kernel.org> (raw)
In-Reply-To: <20200310021512.1861626-1-kuba@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 <kuba@kernel.org>
---
 .../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,
-- 
2.24.1


  parent reply	other threads:[~2020-03-10  2:15 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10  2:14 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 3 Jakub Kicinski
2020-03-10  2:14 ` [PATCH net-next 01/15] net: ena: reject unsupported coalescing params Jakub Kicinski
2020-03-10 14:16   ` Kiyanovski, Arthur
2020-03-10 18:31     ` Leon Romanovsky
2020-03-10 20:55       ` Kiyanovski, Arthur
2020-03-11  6:56         ` Leon Romanovsky
2020-03-11  7:09           ` Kiyanovski, Arthur
2020-03-10  2:14 ` Jakub Kicinski [this message]
2020-03-10  2:15 ` [PATCH net-next 03/15] net: systemport: " Jakub Kicinski
2020-03-10  3:58   ` Florian Fainelli
2020-03-10  3:58   ` Florian Fainelli
2020-03-10  2:15 ` [PATCH net-next 04/15] net: bnx2: " Jakub Kicinski
2020-03-10  6:21   ` Michael Chan
2020-03-10  2:15 ` [PATCH net-next 05/15] net: bnx2x: " Jakub Kicinski
2020-03-10  2:15 ` [PATCH net-next 06/15] net: bcmgenet: " Jakub Kicinski
2020-03-10  3:58   ` Florian Fainelli
2020-03-10  2:15 ` [PATCH net-next 07/15] net: tg3: " Jakub Kicinski
2020-03-10  6:16   ` Michael Chan
2020-03-10  2:15 ` [PATCH net-next 08/15] net: bna: " Jakub Kicinski
2020-03-10  2:15 ` [PATCH net-next 09/15] net: liquidio: " Jakub Kicinski
2020-03-10  2:15 ` [PATCH net-next 10/15] net: mlx4: " Jakub Kicinski
2020-03-10 14:11   ` Tariq Toukan
2020-03-10 17:37     ` Jakub Kicinski
2020-03-10  2:15 ` [PATCH net-next 11/15] net: cxgb2: " Jakub Kicinski
2020-03-10  2:15 ` [PATCH net-next 12/15] net: cxgb3: " Jakub Kicinski
2020-03-10  2:15 ` [PATCH net-next 13/15] net: cxgb4: " Jakub Kicinski
2020-03-10  2:15 ` [PATCH net-next 14/15] net: cxgb4vf: " Jakub Kicinski
2020-03-10  2:15 ` [PATCH net-next 15/15] net: gemini: " Jakub Kicinski
2020-03-10  2:43 ` [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 3 David Miller
2020-03-10  3:05   ` Jakub Kicinski
2020-03-10 23:29 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200310021512.1861626-3-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=GR-Linux-NIC-Dev@marvell.com \
    --cc=GR-everest-linux-l2@marvell.com \
    --cc=aelior@marvell.com \
    --cc=akiyano@amazon.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=dchickles@marvell.com \
    --cc=f.fainelli@gmail.com \
    --cc=fmanlunas@marvell.com \
    --cc=gtzalik@amazon.com \
    --cc=irusskikh@marvell.com \
    --cc=leedom@chelsio.com \
    --cc=linus.walleij@linaro.org \
    --cc=mchan@broadcom.com \
    --cc=netanel@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=opendmb@gmail.com \
    --cc=prashant@broadcom.com \
    --cc=rmody@marvell.com \
    --cc=sburla@marvell.com \
    --cc=siva.kallam@broadcom.com \
    --cc=skalluru@marvell.com \
    --cc=tariqt@mellanox.com \
    --cc=ulli.kroll@googlemail.com \
    --cc=vishal@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).