netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 3
@ 2020-03-10  2:14 Jakub Kicinski
  2020-03-10  2:14 ` [PATCH net-next 01/15] net: ena: reject unsupported coalescing params Jakub Kicinski
                   ` (16 more replies)
  0 siblings, 17 replies; 32+ messages in thread
From: Jakub Kicinski @ 2020-03-10  2:14 UTC (permalink / raw)
  To: davem
  Cc: netdev, akiyano, netanel, gtzalik, irusskikh, f.fainelli,
	bcm-kernel-feedback-list, rmody, GR-Linux-NIC-Dev, aelior,
	skalluru, GR-everest-linux-l2, opendmb, siva.kallam, prashant,
	mchan, dchickles, sburla, fmanlunas, tariqt, vishal, leedom,
	ulli.kroll, linus.walleij, Jakub Kicinski

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/20200305051542.991898-1-kuba@kernel.org/
[2] https://lore.kernel.org/netdev/20200306010602.1620354-1-kuba@kernel.org/

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

-- 
2.24.1


^ permalink raw reply	[flat|nested] 32+ messages in thread
* RE: [PATCH net-next 09/15] net: liquidio: reject unsupported coalescing params
@ 2020-03-10 16:55 Derek Chickles
  0 siblings, 0 replies; 32+ messages in thread
From: Derek Chickles @ 2020-03-10 16:55 UTC (permalink / raw)
  To: Jakub Kicinski, davem@davemloft.net
  Cc: netdev@vger.kernel.org, akiyano@amazon.com, netanel@amazon.com,
	gtzalik@amazon.com, Igor Russkikh, f.fainelli@gmail.com,
	bcm-kernel-feedback-list@broadcom.com, Rasesh Mody,
	GR-Linux-NIC-Dev, Ariel Elior, Sudarsana Reddy Kalluru,
	GR-everest-linux-l2, opendmb@gmail.com, siva.kallam@broadcom.com,
	prashant@broadcom.com, mchan@broadcom.com, Satananda Burla,
	Felix Manlunas, tariqt@mellanox.com, vishal@chelsio.com,
	leedom@chelsio.com, ulli.kroll@googlemail.com,
	linus.walleij@linaro.org



> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Monday, March 9, 2020 7:15 PM
> Subject: [EXT] [PATCH net-next 09/15] net: liquidio: reject unsupported
> coalescing params
> 
> ----------------------------------------------------------------------
> 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/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
> --
> 2.24.1

Acked-by: Derek Chickles <dchickles@marvell.com>

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

end of thread, other threads:[~2020-03-11  7:09 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH net-next 02/15] net: aquantia: reject all " Jakub Kicinski
2020-03-10  2:15 ` [PATCH net-next 03/15] net: systemport: reject " 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
  -- strict thread matches above, loose matches on Subject: below --
2020-03-10 16:55 [PATCH net-next 09/15] net: liquidio: reject unsupported coalescing params Derek Chickles

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