lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <BN8PR18MB24183949419791FFC339B608ACFF0@BN8PR18MB2418.namprd18.prod.outlook.com>
Date:   Tue, 10 Mar 2020 16:55:58 +0000
From:   Derek Chickles <dchickles@...vell.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "akiyano@...zon.com" <akiyano@...zon.com>,
        "netanel@...zon.com" <netanel@...zon.com>,
        "gtzalik@...zon.com" <gtzalik@...zon.com>,
        Igor Russkikh <irusskikh@...vell.com>,
        "f.fainelli@...il.com" <f.fainelli@...il.com>,
        "bcm-kernel-feedback-list@...adcom.com" 
        <bcm-kernel-feedback-list@...adcom.com>,
        Rasesh Mody <rmody@...vell.com>,
        GR-Linux-NIC-Dev <GR-Linux-NIC-Dev@...vell.com>,
        Ariel Elior <aelior@...vell.com>,
        Sudarsana Reddy Kalluru <skalluru@...vell.com>,
        GR-everest-linux-l2 <GR-everest-linux-l2@...vell.com>,
        "opendmb@...il.com" <opendmb@...il.com>,
        "siva.kallam@...adcom.com" <siva.kallam@...adcom.com>,
        "prashant@...adcom.com" <prashant@...adcom.com>,
        "mchan@...adcom.com" <mchan@...adcom.com>,
        Satananda Burla <sburla@...vell.com>,
        Felix Manlunas <fmanlunas@...vell.com>,
        "tariqt@...lanox.com" <tariqt@...lanox.com>,
        "vishal@...lsio.com" <vishal@...lsio.com>,
        "leedom@...lsio.com" <leedom@...lsio.com>,
        "ulli.kroll@...glemail.com" <ulli.kroll@...glemail.com>,
        "linus.walleij@...aro.org" <linus.walleij@...aro.org>
Subject: RE: [PATCH net-next 09/15] net: liquidio: reject unsupported
 coalescing params



> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.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@...nel.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@...vell.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ