netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5
@ 2020-03-13  4:07 Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 01/15] net: jme: reject unsupported coalescing params Jakub Kicinski
                   ` (15 more replies)
  0 siblings, 16 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

Hi!

Convert more drivers following the groundwork laid in a recent
patch set [1] and continued in [2], [3], [4]. The aim of the effort
is to consolidate irq coalescing parameter validation in the core.

This set converts further 15 drivers in drivers/net/ethernet.
One more conversion sets to come.

[1] https://lore.kernel.org/netdev/20200305051542.991898-1-kuba@kernel.org/
[2] https://lore.kernel.org/netdev/20200306010602.1620354-1-kuba@kernel.org/
[3] https://lore.kernel.org/netdev/20200310021512.1861626-1-kuba@kernel.org/
[4] https://lore.kernel.org/netdev/20200311223302.2171564-1-kuba@kernel.org/

Jakub Kicinski (15):
  net: jme: reject unsupported coalescing params
  net: mv643xx_eth: reject unsupported coalescing params
  net: mvneta: reject unsupported coalescing params
  net: mvpp2: reject unsupported coalescing params
  net: octeontx2-pf: let core reject the unsupported coalescing
    parameters
  net: skge: reject unsupported coalescing params
  net: sky2: reject unsupported coalescing params
  net: myri10ge: reject unsupported coalescing params
  net: nixge: let core reject the unsupported coalescing parameters
  net: netxen: let core reject the unsupported coalescing parameters
  net: qede: reject unsupported coalescing params
  net: qlnic: let core reject the unsupported coalescing parameters
  net: r8169: reject unsupported coalescing params
  net: sxgbe: reject unsupported coalescing params
  net: via: reject unsupported coalescing params

 drivers/net/ethernet/jme.c                    |  3 +++
 drivers/net/ethernet/marvell/mv643xx_eth.c    |  1 +
 drivers/net/ethernet/marvell/mvneta.c         |  2 ++
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |  2 ++
 .../marvell/octeontx2/nic/otx2_ethtool.c      | 13 ++---------
 drivers/net/ethernet/marvell/skge.c           |  1 +
 drivers/net/ethernet/marvell/sky2.c           |  4 ++++
 .../net/ethernet/myricom/myri10ge/myri10ge.c  |  1 +
 drivers/net/ethernet/ni/nixge.c               | 22 +-----------------
 .../qlogic/netxen/netxen_nic_ethtool.c        | 21 +++--------------
 .../net/ethernet/qlogic/qede/qede_ethtool.c   |  2 ++
 .../ethernet/qlogic/qlcnic/qlcnic_ethtool.c   | 23 ++++---------------
 drivers/net/ethernet/realtek/r8169_main.c     |  2 ++
 .../ethernet/samsung/sxgbe/sxgbe_ethtool.c    |  1 +
 drivers/net/ethernet/via/via-velocity.c       |  2 ++
 15 files changed, 32 insertions(+), 68 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH net-next 01/15] net: jme: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 02/15] net: mv643xx_eth: " Jakub Kicinski
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/jme.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index de3c7ce9353c..c97c74164c73 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -2839,6 +2839,9 @@ jme_set_eeprom(struct net_device *netdev,
 }
 
 static const struct ethtool_ops jme_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+				     ETHTOOL_COALESCE_MAX_FRAMES |
+				     ETHTOOL_COALESCE_USE_ADAPTIVE_RX,
 	.get_drvinfo            = jme_get_drvinfo,
 	.get_regs_len		= jme_get_regs_len,
 	.get_regs		= jme_get_regs,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 02/15] net: mv643xx_eth: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 01/15] net: jme: reject unsupported coalescing params Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 03/15] net: mvneta: " Jakub Kicinski
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/marvell/mv643xx_eth.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 3c8125cbc84d..81d24481b22c 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -1737,6 +1737,7 @@ static int mv643xx_eth_get_sset_count(struct net_device *dev, int sset)
 }
 
 static const struct ethtool_ops mv643xx_eth_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS,
 	.get_drvinfo		= mv643xx_eth_get_drvinfo,
 	.nway_reset		= phy_ethtool_nway_reset,
 	.get_link		= ethtool_op_get_link,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 03/15] net: mvneta: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 01/15] net: jme: reject unsupported coalescing params Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 02/15] net: mv643xx_eth: " Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 04/15] net: mvpp2: " Jakub Kicinski
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/marvell/mvneta.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index bc488e8b8e45..16f8b1f7b04f 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -4838,6 +4838,8 @@ static const struct net_device_ops mvneta_netdev_ops = {
 };
 
 static const struct ethtool_ops mvneta_eth_tool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS |
+				     ETHTOOL_COALESCE_MAX_FRAMES,
 	.nway_reset	= mvneta_ethtool_nway_reset,
 	.get_link       = ethtool_op_get_link,
 	.set_coalesce   = mvneta_ethtool_set_coalesce,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 04/15] net: mvpp2: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (2 preceding siblings ...)
  2020-03-13  4:07 ` [PATCH net-next 03/15] net: mvneta: " Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13 11:05   ` Matteo Croce
  2020-03-13  4:07 ` [PATCH net-next 05/15] net: octeontx2-pf: let core reject the unsupported coalescing parameters Jakub Kicinski
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 6b9c7ed2547e..1fa60e985b43 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -4384,6 +4384,8 @@ static const struct net_device_ops mvpp2_netdev_ops = {
 };
 
 static const struct ethtool_ops mvpp2_eth_tool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+				     ETHTOOL_COALESCE_MAX_FRAMES,
 	.nway_reset		= mvpp2_ethtool_nway_reset,
 	.get_link		= ethtool_op_get_link,
 	.set_coalesce		= mvpp2_ethtool_set_coalesce,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 05/15] net: octeontx2-pf: let core reject the unsupported coalescing parameters
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (3 preceding siblings ...)
  2020-03-13  4:07 ` [PATCH net-next 04/15] net: mvpp2: " Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 06/15] net: skge: reject unsupported coalescing params Jakub Kicinski
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

This driver correctly rejects all unsupported
parameters, no functional changes.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c   | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
index f450111423a8..017a295f568f 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
@@ -368,17 +368,6 @@ static int otx2_set_coalesce(struct net_device *netdev,
 	struct otx2_hw *hw = &pfvf->hw;
 	int qidx;
 
-	if (ec->use_adaptive_rx_coalesce || ec->use_adaptive_tx_coalesce ||
-	    ec->rx_coalesce_usecs_irq || ec->rx_max_coalesced_frames_irq ||
-	    ec->tx_coalesce_usecs_irq || ec->tx_max_coalesced_frames_irq ||
-	    ec->stats_block_coalesce_usecs || ec->pkt_rate_low ||
-	    ec->rx_coalesce_usecs_low || ec->rx_max_coalesced_frames_low ||
-	    ec->tx_coalesce_usecs_low || ec->tx_max_coalesced_frames_low ||
-	    ec->pkt_rate_high || ec->rx_coalesce_usecs_high ||
-	    ec->rx_max_coalesced_frames_high || ec->tx_coalesce_usecs_high ||
-	    ec->tx_max_coalesced_frames_high || ec->rate_sample_interval)
-		return -EOPNOTSUPP;
-
 	if (!ec->rx_max_coalesced_frames || !ec->tx_max_coalesced_frames)
 		return 0;
 
@@ -674,6 +663,8 @@ static u32 otx2_get_link(struct net_device *netdev)
 }
 
 static const struct ethtool_ops otx2_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+				     ETHTOOL_COALESCE_MAX_FRAMES,
 	.get_link		= otx2_get_link,
 	.get_drvinfo		= otx2_get_drvinfo,
 	.get_strings		= otx2_get_strings,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 06/15] net: skge: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (4 preceding siblings ...)
  2020-03-13  4:07 ` [PATCH net-next 05/15] net: octeontx2-pf: let core reject the unsupported coalescing parameters Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 07/15] net: sky2: " Jakub Kicinski
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/marvell/skge.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
index 97f270d30cce..3c89206f18a7 100644
--- a/drivers/net/ethernet/marvell/skge.c
+++ b/drivers/net/ethernet/marvell/skge.c
@@ -876,6 +876,7 @@ static int skge_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom
 }
 
 static const struct ethtool_ops skge_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS,
 	.get_drvinfo	= skge_get_drvinfo,
 	.get_regs_len	= skge_get_regs_len,
 	.get_regs	= skge_get_regs,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 07/15] net: sky2: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (5 preceding siblings ...)
  2020-03-13  4:07 ` [PATCH net-next 06/15] net: skge: reject unsupported coalescing params Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 08/15] net: myri10ge: " Jakub Kicinski
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/marvell/sky2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index ebfd0ceac884..241f00716979 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -4400,6 +4400,10 @@ static int sky2_set_features(struct net_device *dev, netdev_features_t features)
 }
 
 static const struct ethtool_ops sky2_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+				     ETHTOOL_COALESCE_MAX_FRAMES |
+				     ETHTOOL_COALESCE_RX_USECS_IRQ |
+				     ETHTOOL_COALESCE_RX_MAX_FRAMES_IRQ,
 	.get_drvinfo	= sky2_get_drvinfo,
 	.get_wol	= sky2_get_wol,
 	.set_wol	= sky2_set_wol,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 08/15] net: myri10ge: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (6 preceding siblings ...)
  2020-03-13  4:07 ` [PATCH net-next 07/15] net: sky2: " Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 09/15] net: nixge: let core reject the unsupported coalescing parameters Jakub Kicinski
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 2ee0d0be113a..2616fd735aab 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -1920,6 +1920,7 @@ myri10ge_phys_id(struct net_device *netdev, enum ethtool_phys_id_state state)
 }
 
 static const struct ethtool_ops myri10ge_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS,
 	.get_drvinfo = myri10ge_get_drvinfo,
 	.get_coalesce = myri10ge_get_coalesce,
 	.set_coalesce = myri10ge_set_coalesce,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 09/15] net: nixge: let core reject the unsupported coalescing parameters
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (7 preceding siblings ...)
  2020-03-13  4:07 ` [PATCH net-next 08/15] net: myri10ge: " Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 10/15] net: netxen: " Jakub Kicinski
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

This driver correctly rejects all unsupported
parameters, no functional changes.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/ethernet/ni/nixge.c | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/drivers/net/ethernet/ni/nixge.c b/drivers/net/ethernet/ni/nixge.c
index 49c7987c2abd..2fdd0753b3af 100644
--- a/drivers/net/ethernet/ni/nixge.c
+++ b/drivers/net/ethernet/ni/nixge.c
@@ -1019,27 +1019,6 @@ static int nixge_ethtools_set_coalesce(struct net_device *ndev,
 		return -EBUSY;
 	}
 
-	if (ecoalesce->rx_coalesce_usecs ||
-	    ecoalesce->rx_coalesce_usecs_irq ||
-	    ecoalesce->rx_max_coalesced_frames_irq ||
-	    ecoalesce->tx_coalesce_usecs ||
-	    ecoalesce->tx_coalesce_usecs_irq ||
-	    ecoalesce->tx_max_coalesced_frames_irq ||
-	    ecoalesce->stats_block_coalesce_usecs ||
-	    ecoalesce->use_adaptive_rx_coalesce ||
-	    ecoalesce->use_adaptive_tx_coalesce ||
-	    ecoalesce->pkt_rate_low ||
-	    ecoalesce->rx_coalesce_usecs_low ||
-	    ecoalesce->rx_max_coalesced_frames_low ||
-	    ecoalesce->tx_coalesce_usecs_low ||
-	    ecoalesce->tx_max_coalesced_frames_low ||
-	    ecoalesce->pkt_rate_high ||
-	    ecoalesce->rx_coalesce_usecs_high ||
-	    ecoalesce->rx_max_coalesced_frames_high ||
-	    ecoalesce->tx_coalesce_usecs_high ||
-	    ecoalesce->tx_max_coalesced_frames_high ||
-	    ecoalesce->rate_sample_interval)
-		return -EOPNOTSUPP;
 	if (ecoalesce->rx_max_coalesced_frames)
 		priv->coalesce_count_rx = ecoalesce->rx_max_coalesced_frames;
 	if (ecoalesce->tx_max_coalesced_frames)
@@ -1083,6 +1062,7 @@ static int nixge_ethtools_set_phys_id(struct net_device *ndev,
 }
 
 static const struct ethtool_ops nixge_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_MAX_FRAMES,
 	.get_drvinfo    = nixge_ethtools_get_drvinfo,
 	.get_coalesce   = nixge_ethtools_get_coalesce,
 	.set_coalesce   = nixge_ethtools_set_coalesce,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 10/15] net: netxen: let core reject the unsupported coalescing parameters
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (8 preceding siblings ...)
  2020-03-13  4:07 ` [PATCH net-next 09/15] net: nixge: let core reject the unsupported coalescing parameters Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13  4:07 ` [PATCH net-next 11/15] net: qede: reject unsupported coalescing params Jakub Kicinski
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

As a side effect of these changes the error code for
unsupported params changes from EINVAL to EOPNOTSUPP.

The driver was missing a check for rate_sample_interval.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 .../qlogic/netxen/netxen_nic_ethtool.c        | 21 +++----------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
index 6a2d91d58968..66f45fce90fa 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
@@ -748,24 +748,7 @@ static int netxen_set_intr_coalesce(struct net_device *netdev,
 	if (ethcoal->rx_coalesce_usecs > 0xffff ||
 		ethcoal->rx_max_coalesced_frames > 0xffff ||
 		ethcoal->tx_coalesce_usecs > 0xffff ||
-		ethcoal->tx_max_coalesced_frames > 0xffff ||
-		ethcoal->rx_coalesce_usecs_irq ||
-		ethcoal->rx_max_coalesced_frames_irq ||
-		ethcoal->tx_coalesce_usecs_irq ||
-		ethcoal->tx_max_coalesced_frames_irq ||
-		ethcoal->stats_block_coalesce_usecs ||
-		ethcoal->use_adaptive_rx_coalesce ||
-		ethcoal->use_adaptive_tx_coalesce ||
-		ethcoal->pkt_rate_low ||
-		ethcoal->rx_coalesce_usecs_low ||
-		ethcoal->rx_max_coalesced_frames_low ||
-		ethcoal->tx_coalesce_usecs_low ||
-		ethcoal->tx_max_coalesced_frames_low ||
-		ethcoal->pkt_rate_high ||
-		ethcoal->rx_coalesce_usecs_high ||
-		ethcoal->rx_max_coalesced_frames_high ||
-		ethcoal->tx_coalesce_usecs_high ||
-		ethcoal->tx_max_coalesced_frames_high)
+		ethcoal->tx_max_coalesced_frames > 0xffff)
 		return -EINVAL;
 
 	if (!ethcoal->rx_coalesce_usecs ||
@@ -923,6 +906,8 @@ netxen_get_dump_data(struct net_device *netdev, struct ethtool_dump *dump,
 }
 
 const struct ethtool_ops netxen_nic_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+				     ETHTOOL_COALESCE_MAX_FRAMES,
 	.get_drvinfo = netxen_nic_get_drvinfo,
 	.get_regs_len = netxen_nic_get_regs_len,
 	.get_regs = netxen_nic_get_regs,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 11/15] net: qede: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (9 preceding siblings ...)
  2020-03-13  4:07 ` [PATCH net-next 10/15] net: netxen: " Jakub Kicinski
@ 2020-03-13  4:07 ` Jakub Kicinski
  2020-03-13  4:08 ` [PATCH net-next 12/15] net: qlnic: let core reject the unsupported coalescing parameters Jakub Kicinski
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index 8a426afb6a55..4f7676f4e624 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -2087,6 +2087,7 @@ static int qede_get_dump_data(struct net_device *dev,
 }
 
 static const struct ethtool_ops qede_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS,
 	.get_link_ksettings = qede_get_link_ksettings,
 	.set_link_ksettings = qede_set_link_ksettings,
 	.get_drvinfo = qede_get_drvinfo,
@@ -2133,6 +2134,7 @@ static const struct ethtool_ops qede_ethtool_ops = {
 };
 
 static const struct ethtool_ops qede_vf_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS,
 	.get_link_ksettings = qede_get_link_ksettings,
 	.get_drvinfo = qede_get_drvinfo,
 	.get_msglevel = qede_get_msglevel,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 12/15] net: qlnic: let core reject the unsupported coalescing parameters
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (10 preceding siblings ...)
  2020-03-13  4:07 ` [PATCH net-next 11/15] net: qede: reject unsupported coalescing params Jakub Kicinski
@ 2020-03-13  4:08 ` Jakub Kicinski
  2020-03-13  4:08 ` [PATCH net-next 13/15] net: r8169: reject unsupported coalescing params Jakub Kicinski
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:08 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

This driver already correctly rejected almost all
unsupported parameters (missing sample_rate_interval).

As a side effect of these changes the error code for
unsupported params changes from EINVAL to EOPNOTSUPP.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 .../ethernet/qlogic/qlcnic/qlcnic_ethtool.c   | 23 ++++---------------
 1 file changed, 5 insertions(+), 18 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 75d83c3cbf27..5c2a3acf1e89 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -1542,24 +1542,7 @@ static int qlcnic_set_intr_coalesce(struct net_device *netdev,
 	if (ethcoal->rx_coalesce_usecs > 0xffff ||
 	    ethcoal->rx_max_coalesced_frames > 0xffff ||
 	    ethcoal->tx_coalesce_usecs > 0xffff ||
-	    ethcoal->tx_max_coalesced_frames > 0xffff ||
-	    ethcoal->rx_coalesce_usecs_irq ||
-	    ethcoal->rx_max_coalesced_frames_irq ||
-	    ethcoal->tx_coalesce_usecs_irq ||
-	    ethcoal->tx_max_coalesced_frames_irq ||
-	    ethcoal->stats_block_coalesce_usecs ||
-	    ethcoal->use_adaptive_rx_coalesce ||
-	    ethcoal->use_adaptive_tx_coalesce ||
-	    ethcoal->pkt_rate_low ||
-	    ethcoal->rx_coalesce_usecs_low ||
-	    ethcoal->rx_max_coalesced_frames_low ||
-	    ethcoal->tx_coalesce_usecs_low ||
-	    ethcoal->tx_max_coalesced_frames_low ||
-	    ethcoal->pkt_rate_high ||
-	    ethcoal->rx_coalesce_usecs_high ||
-	    ethcoal->rx_max_coalesced_frames_high ||
-	    ethcoal->tx_coalesce_usecs_high ||
-	    ethcoal->tx_max_coalesced_frames_high)
+	    ethcoal->tx_max_coalesced_frames > 0xffff)
 		return -EINVAL;
 
 	err = qlcnic_config_intr_coalesce(adapter, ethcoal);
@@ -1834,6 +1817,8 @@ qlcnic_set_dump(struct net_device *netdev, struct ethtool_dump *val)
 }
 
 const struct ethtool_ops qlcnic_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+				     ETHTOOL_COALESCE_MAX_FRAMES,
 	.get_drvinfo = qlcnic_get_drvinfo,
 	.get_regs_len = qlcnic_get_regs_len,
 	.get_regs = qlcnic_get_regs,
@@ -1865,6 +1850,8 @@ const struct ethtool_ops qlcnic_ethtool_ops = {
 };
 
 const struct ethtool_ops qlcnic_sriov_vf_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+				     ETHTOOL_COALESCE_MAX_FRAMES,
 	.get_drvinfo		= qlcnic_get_drvinfo,
 	.get_regs_len		= qlcnic_get_regs_len,
 	.get_regs		= qlcnic_get_regs,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 13/15] net: r8169: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (11 preceding siblings ...)
  2020-03-13  4:08 ` [PATCH net-next 12/15] net: qlnic: let core reject the unsupported coalescing parameters Jakub Kicinski
@ 2020-03-13  4:08 ` Jakub Kicinski
  2020-03-13  6:13   ` Heiner Kallweit
  2020-03-13  4:08 ` [PATCH net-next 14/15] net: sxgbe: " Jakub Kicinski
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:08 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/realtek/r8169_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index ce030e093485..d2eef3754b33 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2006,6 +2006,8 @@ static int rtl8169_set_eee(struct net_device *dev, struct ethtool_eee *data)
 }
 
 static const struct ethtool_ops rtl8169_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+				     ETHTOOL_COALESCE_MAX_FRAMES,
 	.get_drvinfo		= rtl8169_get_drvinfo,
 	.get_regs_len		= rtl8169_get_regs_len,
 	.get_link		= ethtool_op_get_link,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 14/15] net: sxgbe: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (12 preceding siblings ...)
  2020-03-13  4:08 ` [PATCH net-next 13/15] net: r8169: reject unsupported coalescing params Jakub Kicinski
@ 2020-03-13  4:08 ` Jakub Kicinski
  2020-03-13  4:08 ` [PATCH net-next 15/15] net: via: " Jakub Kicinski
  2020-03-15  4:14 ` [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 David Miller
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:08 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
index 466483c4ac67..21465cb3d60a 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
@@ -476,6 +476,7 @@ static int sxgbe_get_regs_len(struct net_device *dev)
 }
 
 static const struct ethtool_ops sxgbe_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS,
 	.get_drvinfo = sxgbe_getdrvinfo,
 	.get_msglevel = sxgbe_getmsglevel,
 	.set_msglevel = sxgbe_setmsglevel,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next 15/15] net: via: reject unsupported coalescing params
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (13 preceding siblings ...)
  2020-03-13  4:08 ` [PATCH net-next 14/15] net: sxgbe: " Jakub Kicinski
@ 2020-03-13  4:08 ` Jakub Kicinski
  2020-03-15  4:14 ` [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 David Miller
  15 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-13  4:08 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

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 <kuba@kernel.org>
---
 drivers/net/ethernet/via/via-velocity.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
index 4b556b74541a..713dbc04b25b 100644
--- a/drivers/net/ethernet/via/via-velocity.c
+++ b/drivers/net/ethernet/via/via-velocity.c
@@ -3648,6 +3648,8 @@ static void velocity_get_ethtool_stats(struct net_device *dev,
 }
 
 static const struct ethtool_ops velocity_ethtool_ops = {
+	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+				     ETHTOOL_COALESCE_MAX_FRAMES,
 	.get_drvinfo		= velocity_get_drvinfo,
 	.get_wol		= velocity_ethtool_get_wol,
 	.set_wol		= velocity_ethtool_set_wol,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH net-next 13/15] net: r8169: reject unsupported coalescing params
  2020-03-13  4:08 ` [PATCH net-next 13/15] net: r8169: reject unsupported coalescing params Jakub Kicinski
@ 2020-03-13  6:13   ` Heiner Kallweit
  0 siblings, 0 replies; 19+ messages in thread
From: Heiner Kallweit @ 2020-03-13  6:13 UTC (permalink / raw)
  To: Jakub Kicinski, davem
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, bh74.an, romieu

On 13.03.2020 05:08, Jakub Kicinski wrote:
> 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 <kuba@kernel.org>
> ---
>  drivers/net/ethernet/realtek/r8169_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Heiner Kallweit <hkallweit1@gmail.com>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH net-next 04/15] net: mvpp2: reject unsupported coalescing params
  2020-03-13  4:07 ` [PATCH net-next 04/15] net: mvpp2: " Jakub Kicinski
@ 2020-03-13 11:05   ` Matteo Croce
  0 siblings, 0 replies; 19+ messages in thread
From: Matteo Croce @ 2020-03-13 11:05 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: David S . Miller, netdev, kernel-team, cooldavid,
	sebastian.hesselbarth, Thomas Petazzoni, Maxime Chevallier,
	Russell King, sgoutham, gakula, sbhatta, hkelam, mlindner,
	Stephen Hemminger, christopher.lee, manishc, rahulv,
	GR-Linux-NIC-Dev, aelior, GR-everest-linux-l2, shshaikh,
	nic_swsd, hkallweit1, bh74.an, romieu

On Fri, Mar 13, 2020 at 5:08 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> 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 <kuba@kernel.org>
> ---
>  drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> index 6b9c7ed2547e..1fa60e985b43 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> @@ -4384,6 +4384,8 @@ static const struct net_device_ops mvpp2_netdev_ops = {
>  };
>
>  static const struct ethtool_ops mvpp2_eth_tool_ops = {
> +       .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
> +                                    ETHTOOL_COALESCE_MAX_FRAMES,
>         .nway_reset             = mvpp2_ethtool_nway_reset,
>         .get_link               = ethtool_op_get_link,
>         .set_coalesce           = mvpp2_ethtool_set_coalesce,
> --
> 2.24.1
>

Acked-by: Matteo Croce <mcroce@redhat.com>

-- 
Matteo Croce
per aspera ad upstream


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5
  2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
                   ` (14 preceding siblings ...)
  2020-03-13  4:08 ` [PATCH net-next 15/15] net: via: " Jakub Kicinski
@ 2020-03-15  4:14 ` David Miller
  15 siblings, 0 replies; 19+ messages in thread
From: David Miller @ 2020-03-15  4:14 UTC (permalink / raw)
  To: kuba
  Cc: netdev, kernel-team, cooldavid, sebastian.hesselbarth,
	thomas.petazzoni, maxime.chevallier, rmk+kernel, mcroce,
	sgoutham, gakula, sbhatta, hkelam, mlindner, stephen,
	christopher.lee, manishc, rahulv, GR-Linux-NIC-Dev, aelior,
	GR-everest-linux-l2, shshaikh, nic_swsd, hkallweit1, bh74.an,
	romieu

From: Jakub Kicinski <kuba@kernel.org>
Date: Thu, 12 Mar 2020 21:07:48 -0700

> Convert more drivers following the groundwork laid in a recent
> patch set [1] and continued in [2], [3], [4]. The aim of the effort
> is to consolidate irq coalescing parameter validation in the core.
> 
> This set converts further 15 drivers in drivers/net/ethernet.
> One more conversion sets to come.
> 
> [1] https://lore.kernel.org/netdev/20200305051542.991898-1-kuba@kernel.org/
> [2] https://lore.kernel.org/netdev/20200306010602.1620354-1-kuba@kernel.org/
> [3] https://lore.kernel.org/netdev/20200310021512.1861626-1-kuba@kernel.org/
> [4] https://lore.kernel.org/netdev/20200311223302.2171564-1-kuba@kernel.org/

Series applied, thanks Jakub.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-03-15  4:14 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-13  4:07 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 Jakub Kicinski
2020-03-13  4:07 ` [PATCH net-next 01/15] net: jme: reject unsupported coalescing params Jakub Kicinski
2020-03-13  4:07 ` [PATCH net-next 02/15] net: mv643xx_eth: " Jakub Kicinski
2020-03-13  4:07 ` [PATCH net-next 03/15] net: mvneta: " Jakub Kicinski
2020-03-13  4:07 ` [PATCH net-next 04/15] net: mvpp2: " Jakub Kicinski
2020-03-13 11:05   ` Matteo Croce
2020-03-13  4:07 ` [PATCH net-next 05/15] net: octeontx2-pf: let core reject the unsupported coalescing parameters Jakub Kicinski
2020-03-13  4:07 ` [PATCH net-next 06/15] net: skge: reject unsupported coalescing params Jakub Kicinski
2020-03-13  4:07 ` [PATCH net-next 07/15] net: sky2: " Jakub Kicinski
2020-03-13  4:07 ` [PATCH net-next 08/15] net: myri10ge: " Jakub Kicinski
2020-03-13  4:07 ` [PATCH net-next 09/15] net: nixge: let core reject the unsupported coalescing parameters Jakub Kicinski
2020-03-13  4:07 ` [PATCH net-next 10/15] net: netxen: " Jakub Kicinski
2020-03-13  4:07 ` [PATCH net-next 11/15] net: qede: reject unsupported coalescing params Jakub Kicinski
2020-03-13  4:08 ` [PATCH net-next 12/15] net: qlnic: let core reject the unsupported coalescing parameters Jakub Kicinski
2020-03-13  4:08 ` [PATCH net-next 13/15] net: r8169: reject unsupported coalescing params Jakub Kicinski
2020-03-13  6:13   ` Heiner Kallweit
2020-03-13  4:08 ` [PATCH net-next 14/15] net: sxgbe: " Jakub Kicinski
2020-03-13  4:08 ` [PATCH net-next 15/15] net: via: " Jakub Kicinski
2020-03-15  4:14 ` [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 5 David Miller

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).