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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ec3b324-bb64-50ed-8a3e-848d648fb35b@amd.com>
Date:   Thu, 5 Mar 2020 08:30:24 -0600
From:   Tom Lendacky <thomas.lendacky@....com>
To:     Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc:     andrew@...n.ch, ecree@...arflare.com, mkubecek@...e.cz,
        benve@...co.com, _govind@....com, peppe.cavallaro@...com,
        alexandre.torgue@...com, joabreu@...opsys.com, snelson@...sando.io,
        yisen.zhuang@...wei.com, salil.mehta@...wei.com,
        jeffrey.t.kirsher@...el.com, jacob.e.keller@...el.com,
        alexander.h.duyck@...ux.intel.com, michael.chan@...adcom.com,
        saeedm@...lanox.com, leon@...nel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 02/12] xgbe: let core reject the unsupported
 coalescing parameters

On 3/4/20 11:15 PM, Jakub Kicinski wrote:
> Set ethtool_ops->supported_coalesce_params to let
> the core reject unsupported coalescing parameters.
> 
> This driver correctly rejects all unsupported parameters.
> We are only losing the error print.
> 
> v3: adjust commit message for new error code and member name
> 
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>

Acked-by: Tom Lendacky <thomas.lendacky@....com>

> ---
>  drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 26 ++------------------
>  1 file changed, 2 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
> index b23c8ee24ee3..61f39a0e04f9 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
> @@ -450,30 +450,6 @@ static int xgbe_set_coalesce(struct net_device *netdev,
>  	unsigned int rx_frames, rx_riwt, rx_usecs;
>  	unsigned int tx_frames;
>  
> -	/* Check for not supported parameters  */
> -	if ((ec->rx_coalesce_usecs_irq) ||
> -	    (ec->rx_max_coalesced_frames_irq) ||
> -	    (ec->tx_coalesce_usecs) ||
> -	    (ec->tx_coalesce_usecs_irq) ||
> -	    (ec->tx_max_coalesced_frames_irq) ||
> -	    (ec->stats_block_coalesce_usecs) ||
> -	    (ec->use_adaptive_rx_coalesce) ||
> -	    (ec->use_adaptive_tx_coalesce) ||
> -	    (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)) {
> -		netdev_err(netdev, "unsupported coalescing parameter\n");
> -		return -EOPNOTSUPP;
> -	}
> -
>  	rx_riwt = hw_if->usec_to_riwt(pdata, ec->rx_coalesce_usecs);
>  	rx_usecs = ec->rx_coalesce_usecs;
>  	rx_frames = ec->rx_max_coalesced_frames;
> @@ -837,6 +813,8 @@ static int xgbe_set_channels(struct net_device *netdev,
>  }
>  
>  static const struct ethtool_ops xgbe_ethtool_ops = {
> +	.supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS |
> +				     ETHTOOL_COALESCE_MAX_FRAMES,
>  	.get_drvinfo = xgbe_get_drvinfo,
>  	.get_msglevel = xgbe_get_msglevel,
>  	.set_msglevel = xgbe_set_msglevel,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ