ethtool: consolidate irq coalescing - part 3
Subsystems (18)
Jakub Kicinski
maintainercover ethtool: consolidate irq coalescing - part 3
Hi!
Convert more drivers following the groundwork laid in a recent patch set [1] and continued in [2]. The aim of the effort is to consolidate irq coalescing parameter validation in the core.
This set converts 15 drivers in drivers/net/ethernet. 3 more conversion sets to come.
None of the drivers here checked all unsupported parameters.
[1] https://lore.kernel.org/netdev/[email protected]/
[2] https://lore.kernel.org/netdev/[email protected]/
Jakub Kicinski (15):
net: ena: reject unsupported coalescing params
net: aquantia: reject all unsupported coalescing params
net: systemport: reject unsupported coalescing params
net: bnx2: reject unsupported coalescing params
net: bnx2x: reject unsupported coalescing params
net: bcmgenet: reject unsupported coalescing params
net: tg3: reject unsupported coalescing params
net: bna: reject unsupported coalescing params
net: liquidio: reject unsupported coalescing params
net: mlx4: reject unsupported coalescing params
net: cxgb2: reject unsupported coalescing params
net: cxgb3: reject unsupported coalescing params
net: cxgb4: reject unsupported coalescing params
net: cxgb4vf: reject unsupported coalescing params
net: gemini: reject unsupported coalescing params
drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 ++ .../net/ethernet/aquantia/atlantic/aq_ethtool.c | 15 +++------------ drivers/net/ethernet/broadcom/bcmsysport.c | 6 ++++-- drivers/net/ethernet/broadcom/bnx2.c | 5 +++++ .../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 1 + drivers/net/ethernet/broadcom/genet/bcmgenet.c | 7 +++---- drivers/net/ethernet/broadcom/tg3.c | 5 +++++ drivers/net/ethernet/brocade/bna/bnad_ethtool.c | 3 +++ .../net/ethernet/cavium/liquidio/lio_ethtool.c | 11 +++++++++++ drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 3 +++ drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 1 + .../net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 4 ++++ .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2 ++ drivers/net/ethernet/cortina/gemini.c | 2 ++ drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++++ include/linux/ethtool.h | 5 +++++ 16 files changed, 58 insertions(+), 18 deletions(-)
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 1/15 net: ena: reject unsupported coalescing params
Set ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/amazon/ena/ena_ethtool.c +2 -0
@@ -826,6 +826,8 @@ static int ena_set_tunable(struct net_device *netdev, }static const struct ethtool_ops ena_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_USECS | +ETHTOOL_COALESCE_USE_ADAPTIVE_RX , .get_link_ksettings = ena_get_link_ksettings, .get_drvinfo = ena_get_drvinfo, .get_msglevel = ena_get_msglevel,
Signature · 1 line
2.24.1
RE: [PATCH net-next 01/15] net: ena: reject unsupported coalescing params
Quoted 45 lines
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Tuesday, March 10, 2020 4:15 AM
To: [email protected]
Cc: [email protected]; Kiyanovski, Arthur <[email protected]>; Belgazal, Netanel <[email protected]>; Tzalik, Guy <[email protected]>; [email protected]; [email protected]; bcm-kernel-feedback- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jakub Kicinski <[email protected]>
Subject: [EXTERNAL][PATCH net-next 01/15] net: ena: reject unsupported coalescing paramsCAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.Signed-off-by Jakub Kicinski <[email protected]>--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/amazon/ena/ena_ethtool.c +2
-1@@ -826,6 +826,8 @@ static int ena_set_tunable(struct net_device *netdev, }static const struct ethtool_ops ena_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_USECS | +ETHTOOL_COALESCE_USE_ADAPTIVE_RX , .get_link_ksettings = ena_get_link_ksettings, .get_drvinfo = ena_get_drvinfo, .get_msglevel = ena_get_msglevel, --
Quoted 1 line
2.24.1
Re: [PATCH net-next 01/15] net: ena: reject unsupported coalescing params
Quoted 38 lines · Arthur
Quoted 38 lines
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Tuesday, March 10, 2020 4:15 AM
To: [email protected]
Cc: [email protected]; Kiyanovski, Arthur <[email protected]>; Belgazal, Netanel <[email protected]>; Tzalik, Guy <[email protected]>; [email protected]; [email protected]; bcm-kernel-feedback- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jakub Kicinski <[email protected]>
Subject: [EXTERNAL][PATCH net-next 01/15] net: ena: reject unsupported coalescing paramsCAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.Signed-off-by Jakub Kicinski <[email protected]>--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/amazon/ena/ena_ethtool.c +0
-0@@ -826,6 +826,8 @@ static int ena_set_tunable(struct net_device *netdev, }
Quoted 11 lines
Quoted 8 lines
drivers/net/ethernet/amazon/ena/ena_ethtool.c +2
-1static const struct ethtool_ops ena_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_USECS | +ETHTOOL_COALESCE_USE_ADAPTIVE_RX , .get_link_ksettings = ena_get_link_ksettings, .get_drvinfo = ena_get_drvinfo, .get_msglevel = ena_get_msglevel, --2.24.1
Acked-by Sameeh Jubran <[email protected]>
FROM author of this reply and Acked-by doesn't look the same. Which one is correct?
Thanks
RE: [PATCH net-next 01/15] net: ena: reject unsupported coalescing params
Quoted 80 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Tuesday, March 10, 2020 8:32 PM
To: Kiyanovski, Arthur <[email protected]>
Cc: Jakub Kicinski <[email protected]>; [email protected]; [email protected]; Belgazal, Netanel <[email protected]>; Tzalik, Guy <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; GR-Linux-NIC- [email protected]; [email protected]; [email protected]; GR-everest- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [EXTERNAL][PATCH net-next 01/15] net: ena: reject unsupported coalescing paramsCAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 11 lines · Arthur
Quoted 11 lines
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Tuesday, March 10, 2020 4:15 AM
To: [email protected]
Cc: [email protected]; Kiyanovski, Arthur <[email protected]>; Belgazal, Netanel <[email protected]>; Tzalik, Guy <[email protected]>; [email protected]; [email protected]; bcm-kernel-feedback- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];Quoted 29 lines
Quoted 29 lines
[email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jakub Kicinski <[email protected]>
Subject: [EXTERNAL][PATCH net-next 01/15] net: ena: reject unsupported coalescing paramsCAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.Signed-off-by Jakub Kicinski <[email protected]>--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/amazon/ena/ena_ethtool.c +0
-0@@ -826,6 +826,8 @@ static int ena_set_tunable(struct net_device *netdev, }Quoted 12 lines
Quoted 9 lines
drivers/net/ethernet/amazon/ena/ena_ethtool.c +3
-1static const struct ethtool_ops ena_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_USECS | + +ETHTOOL_COALESCE_USE_ADAPTIVE_RX , .get_link_ksettings = ena_get_link_ksettings, .get_drvinfo = ena_get_drvinfo, .get_msglevel = ena_get_msglevel, --2.24.1
Acked-by Sameeh Jubran <[email protected]>
Quoted 4 lines
FROM author of this reply and Acked-by doesn't look the same. Which one is correct?
Thanks
Sameeh did the check, I sent the email.
So the correct one is the one written in the email:
Sorry for the confusion.
Re: [PATCH net-next 01/15] net: ena: reject unsupported coalescing params
Quoted 83 lines · Arthur
Quoted 83 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Tuesday, March 10, 2020 8:32 PM
To: Kiyanovski, Arthur <[email protected]>
Cc: Jakub Kicinski <[email protected]>; [email protected]; [email protected]; Belgazal, Netanel <[email protected]>; Tzalik, Guy <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; GR-Linux-NIC- [email protected]; [email protected]; [email protected]; GR-everest- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [EXTERNAL][PATCH net-next 01/15] net: ena: reject unsupported coalescing paramsCAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 11 lines · Arthur
Quoted 11 lines
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Tuesday, March 10, 2020 4:15 AM
To: [email protected]
Cc: [email protected]; Kiyanovski, Arthur <[email protected]>; Belgazal, Netanel <[email protected]>; Tzalik, Guy <[email protected]>; [email protected]; [email protected]; bcm-kernel-feedback- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];Quoted 29 lines
Quoted 29 lines
[email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jakub Kicinski <[email protected]>
Subject: [EXTERNAL][PATCH net-next 01/15] net: ena: reject unsupported coalescing paramsCAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.Signed-off-by Jakub Kicinski <[email protected]>--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/amazon/ena/ena_ethtool.c +0
-0@@ -826,6 +826,8 @@ static int ena_set_tunable(struct net_device *netdev, }Quoted 12 lines
Quoted 9 lines
drivers/net/ethernet/amazon/ena/ena_ethtool.c +3
-1static const struct ethtool_ops ena_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_USECS | + +ETHTOOL_COALESCE_USE_ADAPTIVE_RX , .get_link_ksettings = ena_get_link_ksettings, .get_drvinfo = ena_get_drvinfo, .get_msglevel = ena_get_msglevel, --2.24.1
Acked-by Sameeh Jubran <[email protected]>FROM author of this reply and Acked-by doesn't look the same. Which one is correct?
Quoted 7 lines
Quoted 1 line
Thanks
Sameeh did the check, I sent the email.
So the correct one is the one written in the email:Acked-by Sameeh Jubran <[email protected]>Sorry for the confusion.
It is important that the one who adds "-by" writes the email and uses same name, because get-lore-mbox.py (the new tool that used by many maintainers to grab patches) performs strict check between From and tags to be on the safe side.
Thanks
Kiyanovski, Arthur
maintainerRE: [PATCH net-next 01/15] net: ena: reject unsupported coalescing params
Quoted 118 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Wednesday, March 11, 2020 8:56 AM
To: Kiyanovski, Arthur <[email protected]>
Cc: Jakub Kicinski <[email protected]>; [email protected]; [email protected]; Belgazal, Netanel <[email protected]>; Tzalik, Guy <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; GR-Linux-NIC- [email protected]; [email protected]; [email protected]; GR-everest- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [EXTERNAL][PATCH net-next 01/15] net: ena: reject unsupported coalescing paramsCAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 14 lines · Arthur
Quoted 14 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Tuesday, March 10, 2020 8:32 PM
To: Kiyanovski, Arthur <[email protected]>
Cc: Jakub Kicinski <[email protected]>; [email protected]; [email protected]; Belgazal, Netanel <[email protected]>; Tzalik, Guy <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; GR-Linux-NIC- [email protected]; [email protected]; [email protected]; GR-everest- [email protected]; [email protected]; [email protected]; [email protected]; [email protected];Quoted 77 lines
Quoted 68 lines
[email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [EXTERNAL][PATCH net-next 01/15] net: ena: reject unsupported coalescing paramsCAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 4 lines · Arthur
Quoted 4 lines
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Tuesday, March 10, 2020 4:15 AM
To: [email protected]Quoted 8 lines
Quoted 8 lines
Cc: [email protected]; Kiyanovski, Arthur <[email protected]>; Belgazal, Netanel <[email protected]>; Tzalik, Guy <[email protected]>; [email protected]; [email protected];
bcm-kernel-feedback- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];Quoted 29 lines
Quoted 29 lines
[email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jakub Kicinski <[email protected]>
Subject: [EXTERNAL][PATCH net-next 01/15] net: ena: reject unsupported coalescing paramsCAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.Signed-off-by Jakub Kicinski <[email protected]>--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/amazon/ena/ena_ethtool.c +0
-0@@ -826,6 +826,8 @@ static int ena_set_tunable(struct net_device *netdev, }Quoted 12 lines
Quoted 9 lines
drivers/net/ethernet/amazon/ena/ena_ethtool.c +3
-1static const struct ethtool_ops ena_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_USECS | + +ETHTOOL_COALESCE_USE_ADAPTIVE_RX , .get_link_ksettings = ena_get_link_ksettings, .get_drvinfo = ena_get_drvinfo, .get_msglevel = ena_get_msglevel, --2.24.1
Acked-by Sameeh Jubran <[email protected]>Quoted 4 lines
FROM author of this reply and Acked-by doesn't look the same. Which one is correct?
Thanks
Sameeh did the check, I sent the email.
So the correct one is the one written in the email:Acked-by Sameeh Jubran <[email protected]>
Quoted 8 lines
Quoted 1 line
Sorry for the confusion.
It is important that the one who adds "-by" writes the email and uses same name, because
get-lore-mbox.py(the new tool that used by many maintainers to grab patches) performs strict check between From and tags to be on the safe side.Thanks
Got it, thanks!
Jakub Kicinski
maintainerPATCH 2/15 net: aquantia: reject all unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver only rejected some of the unsupported parameters.
--- .../net/ethernet/aquantia/atlantic/aq_ethtool.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)
drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c +3 -12
@@ -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,
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 3/15 net: systemport: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject most of unsupported parameters.
--- drivers/net/ethernet/broadcom/bcmsysport.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bcmsysport.c +4 -2
@@ -623,8 +623,7 @@ static int bcm_sysport_set_coalesce(struct net_device *dev,return -EINVAL ;if ((ec->tx_coalesce_usecs ==0 && ec->tx_max_coalesced_frames ==0 ) || - (ec->rx_coalesce_usecs ==0 && ec->rx_max_coalesced_frames ==0 ) || - ec->use_adaptive_tx_coalesce) + (ec->rx_coalesce_usecs ==0 && ec->rx_max_coalesced_frames ==0 ))return -EINVAL ;for (i =0 ; i < dev->num_tx_queues; i++)
@@ -2209,6 +2208,9 @@ static int bcm_sysport_set_rxnfc(struct net_device *dev, }static const struct ethtool_ops bcm_sysport_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_USECS | +ETHTOOL_COALESCE_MAX_FRAMES | +ETHTOOL_COALESCE_USE_ADAPTIVE_RX , .get_drvinfo = bcm_sysport_get_drvinfo, .get_msglevel = bcm_sysport_get_msglvl, .set_msglevel = bcm_sysport_set_msglvl,
Signature · 1 line
2.24.1
Re: [PATCH net-next 03/15] net: systemport: reject unsupported coalescing params
Quoted 7 lines · Jakub Kicinski
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.This driver did not previously reject most of unsupported parameters.
Signed-off-by Jakub Kicinski <[email protected]>
Signature · 1 line
Florian
Re: [PATCH net-next 03/15] net: systemport: reject unsupported coalescing params
In reply to Jakub KicinskiQuoted 7 lines · Jakub Kicinski
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.This driver did not previously reject most of unsupported parameters.
Signed-off-by Jakub Kicinski <[email protected]>
Signature · 1 line
Florian
Jakub Kicinski
maintainerPATCH 4/15 net: bnx2: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/broadcom/bnx2.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/ethernet/broadcom/bnx2.c +5 -0
@@ -7812,6 +7812,11 @@ static int bnx2_set_channels(struct net_device *dev, }static const struct ethtool_ops bnx2_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 = bnx2_get_drvinfo, .get_regs_len = bnx2_get_regs_len, .get_regs = bnx2_get_regs,
Signature · 1 line
2.24.1
Re: [PATCH net-next 04/15] net: bnx2: reject unsupported coalescing params
Quoted 7 lines · Jakub Kicinski
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.This driver did not previously reject unsupported parameters.
Signed-off-by Jakub Kicinski <[email protected]>
Thanks.
Jakub Kicinski
maintainerPATCH 5/15 net: bnx2x: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +1 -0
@@ -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,
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 6/15 net: bcmgenet: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject all unsupported parameters.
--- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +3 -4
@@ -686,10 +686,6 @@ static int bcmgenet_set_coalesce(struct net_device *dev,* always generate an interrupt either after MBDONE packets have been * transmitted, or when the ring is empty. */ -if (ec->tx_coalesce_usecs || ec->tx_coalesce_usecs_high || - ec->tx_coalesce_usecs_irq || ec->tx_coalesce_usecs_low || - ec->use_adaptive_tx_coalesce) -return -EOPNOTSUPP ;/* Program all TX queues with the same values, as there is no * ethtool knob to do coalescing on a per-queue basis
@@ -1113,6 +1109,9 @@ static int bcmgenet_set_eee(struct net_device *dev, struct ethtool_eee *e)/* standard ethtool support functions. */ static const struct ethtool_ops bcmgenet_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_RX_USECS | +ETHTOOL_COALESCE_MAX_FRAMES | +ETHTOOL_COALESCE_USE_ADAPTIVE_RX , .begin = bcmgenet_begin, .complete = bcmgenet_complete, .get_strings = bcmgenet_get_strings,
Signature · 1 line
2.24.1
Re: [PATCH net-next 06/15] net: bcmgenet: reject unsupported coalescing params
Quoted 6 lines · Jakub Kicinski
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.This driver did not previously reject all unsupported parameters.
Signed-off-by Jakub Kicinski <[email protected]>
Signature · 1 line
Florian
Jakub Kicinski
maintainerPATCH 7/15 net: tg3: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/broadcom/tg3.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/ethernet/broadcom/tg3.c +5 -0
@@ -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,
Signature · 1 line
2.24.1
Re: [PATCH net-next 07/15] net: tg3: reject unsupported coalescing params
Quoted 7 lines · Jakub Kicinski
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.This driver did not previously reject unsupported parameters.
Signed-off-by Jakub Kicinski <[email protected]>
Thanks.
Jakub Kicinski
maintainerPATCH 8/15 net: bna: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/brocade/bna/bnad_ethtool.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/brocade/bna/bnad_ethtool.c +3 -0
@@ -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,
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 9/15 net: liquidio: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 11 +++++++++++ include/linux/ethtool.h | 5 +++++ 2 files changed, 16 insertions(+)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c +11 -0
@@ -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,
include/linux/ethtool.h +5 -0
@@ -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
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 10/15 net: mlx4: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +4 -0
@@ -2121,6 +2121,10 @@ static int mlx4_en_set_phys_id(struct net_device *dev, }const struct ethtool_ops mlx4_en_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_USECS | +ETHTOOL_COALESCE_MAX_FRAMES | +ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQ | +ETHTOOL_COALESCE_PKT_RATE_RX_USECS , .get_drvinfo = mlx4_en_get_drvinfo, .get_link_ksettings = mlx4_en_get_link_ksettings, .set_link_ksettings = mlx4_en_set_link_ksettings,
Signature · 1 line
2.24.1
Re: [PATCH net-next 10/15] net: mlx4: reject unsupported coalescing params
Quoted 15 lines · Jakub Kicinski
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.This driver did not previously reject unsupported parameters.
Signed-off-by Jakub Kicinski <[email protected]>--- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +0
-0
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c static int mlx4_en_set_phys_id(struct net_device *dev, · line 2127
Quoted 7 lines
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +4
-0@@ -2121,6 +2121,10 @@ static int mlx4_en_set_phys_id(struct net_device *dev, }const struct ethtool_ops mlx4_en_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_USECS | +ETHTOOL_COALESCE_MAX_FRAMES | +ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQ | +ETHTOOL_COALESCE_PKT_RATE_RX_USECS ,
Hi Jakub,
We support several more params:
ETHTOOL_COALESCE_RX_USECS_LOWETHTOOL_COALESCE_RX_USECS_HIGHETHTOOL_COALESCE_RATE_SAMPLE_INTERVALETHTOOL_COALESCE_PKT_RATE_LOWETHTOOL_COALESCE_PKT_RATE_HIGHETHTOOL_COALESCE_USE_ADAPTIVE_RXETHTOOL_COALESCE_TX_MAX_FRAMES_LOWETHTOOL_COALESCE_TX_USECS
Quoted 4 lines
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +0
-0.get_drvinfo = mlx4_en_get_drvinfo, .get_link_ksettings = mlx4_en_get_link_ksettings, .set_link_ksettings = mlx4_en_set_link_ksettings,
Jakub Kicinski
maintainerRe: [PATCH net-next 10/15] net: mlx4: reject unsupported coalescing params
Quoted 27 lines · On Tue, 10 Mar 2020 16:11:16 +0200 Tariq Toukan wrote:
Quoted 15 lines · Jakub Kicinski
Set
ethtool_ops->supported_coalesce_paramsto let the core reject unsupported coalescing parameters.This driver did not previously reject unsupported parameters.
Signed-off-by Jakub Kicinski <[email protected]>--- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +0
-0drivers/net/ethernet/mellanox/mlx4/en_ethtool.c static int mlx4_en_set_phys_id(struct net_device *dev, · line 2127
Quoted 7 lines
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +4
-0@@ -2121,6 +2121,10 @@ static int mlx4_en_set_phys_id(struct net_device *dev, }const struct ethtool_ops mlx4_en_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_USECS | +ETHTOOL_COALESCE_MAX_FRAMES | +ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQ | +ETHTOOL_COALESCE_PKT_RATE_RX_USECS ,Hi Jakub,
We support several more params:
Quoted 8 lines
ETHTOOL_COALESCE_RX_USECS_LOWETHTOOL_COALESCE_RX_USECS_HIGHETHTOOL_COALESCE_RATE_SAMPLE_INTERVALETHTOOL_COALESCE_PKT_RATE_LOWETHTOOL_COALESCE_PKT_RATE_HIGHETHTOOL_COALESCE_USE_ADAPTIVE_RXETHTOOL_COALESCE_TX_MAX_FRAMES_LOWETHTOOL_COALESCE_TX_USECS
Most of these defines are groups, actually. Here's what they should cover:
ETHTOOL_COALESCE_USECSrx_coalesce_usecstx_coalesce_usecs
ETHTOOL_COALESCE_MAX_FRAMESrx_max_coalesced_framestx_max_coalesced_frames
ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQtx_max_coalesced_frames_irq
ETHTOOL_COALESCE_PKT_RATE_RX_USECSuse_adaptive_rx_coalescerx_coalesce_usecs_lowrx_coalesce_usecs_highpkt_rate_lowpkt_rate_highrate_sample_interval
So AFAICS all is covered.
I was wondering if I should name the groups somewhat differently to make it clear?
Quoted 4 lines
Quoted 4 lines
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +0
-0.get_drvinfo = mlx4_en_get_drvinfo, .get_link_ksettings = mlx4_en_get_link_ksettings, .set_link_ksettings = mlx4_en_set_link_ksettings,
Jakub Kicinski
maintainerPATCH 11/15 net: cxgb2: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/chelsio/cxgb/cxgb2.c +3 -0
@@ -793,6 +793,9 @@ static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e, }static const struct ethtool_ops t1_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_RX_USECS | +ETHTOOL_COALESCE_USE_ADAPTIVE_RX | +ETHTOOL_COALESCE_RATE_SAMPLE_INTERVAL , .get_drvinfo = get_drvinfo, .get_msglevel = get_msglevel, .set_msglevel = set_msglevel,
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 12/15 net: cxgb3: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +1 -0
@@ -2104,6 +2104,7 @@ static void get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) }static const struct ethtool_ops cxgb_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_RX_USECS , .get_drvinfo = get_drvinfo, .get_msglevel = get_msglevel, .set_msglevel = set_msglevel,
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 13/15 net: cxgb4: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +4 -0
@@ -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,
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 14/15 net: cxgb4vf: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +2 -0
@@ -1919,6 +1919,8 @@ static void cxgb4vf_get_wol(struct net_device *dev, NETIF_F_GRO | NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA)static const struct ethtool_ops cxgb4vf_ethtool_ops = { + .supported_coalesce_params =ETHTOOL_COALESCE_RX_USECS | +ETHTOOL_COALESCE_RX_MAX_FRAMES , .get_link_ksettings = cxgb4vf_get_link_ksettings, .get_fecparam = cxgb4vf_get_fecparam, .get_drvinfo = cxgb4vf_get_drvinfo,
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 15/15 net: gemini: reject unsupported coalescing params
In reply to Jakub KicinskiSet ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
--- drivers/net/ethernet/cortina/gemini.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/cortina/gemini.c +2 -0
@@ -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,
Signature · 1 line
2.24.1
David Miller
maintainerFrom: Jakub Kicinski <[email protected]>
Date: Mon, 9 Mar 2020 19:14:57 -0700
Quoted 11 lines
Convert more drivers following the groundwork laid in a recent patch set [1] and continued in [2]. The aim of the effort is to consolidate irq coalescing parameter validation in the core.
This set converts 15 drivers in
drivers/net/ethernet. 3 more conversion sets to come.None of the drivers here checked all unsupported parameters.
[1] https://lore.kernel.org/netdev/[email protected]/
[2] https://lore.kernel.org/netdev/[email protected]/
I'll let this sit for a day for review(s).
Jakub Kicinski
maintainerQuoted 10 lines · On Mon, 09 Mar 2020 19:43:13 -0700 (PDT) David Miller wrote:
From: Jakub Kicinski <[email protected]>
Date: Mon, 9 Mar 2020 19:14:57 -0700Quoted 7 lines
Convert more drivers following the groundwork laid in a recent patch set [1] and continued in [2]. The aim of the effort is to consolidate irq coalescing parameter validation in the core.
This set converts 15 drivers in
drivers/net/ethernet. 3 more conversion sets to come.
Quoted 6 lines
Quoted 4 lines
None of the drivers here checked all unsupported parameters.
[1] https://lore.kernel.org/netdev/[email protected]/
[2] https://lore.kernel.org/netdev/[email protected]/I'll let this sit for a day for review(s).
Makes sense, this is partially manual work, good to have it double checked by folks.
David Miller
maintainerFrom: Jakub Kicinski <[email protected]>
Date: Mon, 9 Mar 2020 19:14:57 -0700
Quoted 11 lines
Convert more drivers following the groundwork laid in a recent patch set [1] and continued in [2]. The aim of the effort is to consolidate irq coalescing parameter validation in the core.
This set converts 15 drivers in
drivers/net/ethernet. 3 more conversion sets to come.None of the drivers here checked all unsupported parameters.
[1] https://lore.kernel.org/netdev/[email protected]/
[2] https://lore.kernel.org/netdev/[email protected]/
Series applied, thank you.