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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Mar 2020 10:37:08 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Tariq Toukan <tariqt@...lanox.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, akiyano@...zon.com,
        netanel@...zon.com, gtzalik@...zon.com, irusskikh@...vell.com,
        f.fainelli@...il.com, bcm-kernel-feedback-list@...adcom.com,
        rmody@...vell.com, GR-Linux-NIC-Dev@...vell.com,
        aelior@...vell.com, skalluru@...vell.com,
        GR-everest-linux-l2@...vell.com, opendmb@...il.com,
        siva.kallam@...adcom.com, prashant@...adcom.com,
        mchan@...adcom.com, dchickles@...vell.com, sburla@...vell.com,
        fmanlunas@...vell.com, vishal@...lsio.com,
        ulli.kroll@...glemail.com, linus.walleij@...aro.org
Subject: Re: [PATCH net-next 10/15] net: mlx4: reject unsupported coalescing
 params

On Tue, 10 Mar 2020 16:11:16 +0200 Tariq Toukan wrote:
> On 3/10/2020 4:15 AM, 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@...nel.org>
> > ---
> >   drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> > index 8bf1f08fdee2..8a5ea2543670 100644
> > --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> > +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> > @@ -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_LOW
> ETHTOOL_COALESCE_RX_USECS_HIGH
> ETHTOOL_COALESCE_RATE_SAMPLE_INTERVAL
> ETHTOOL_COALESCE_PKT_RATE_LOW
> ETHTOOL_COALESCE_PKT_RATE_HIGH
> ETHTOOL_COALESCE_USE_ADAPTIVE_RX
> ETHTOOL_COALESCE_TX_MAX_FRAMES_LOW
> ETHTOOL_COALESCE_TX_USECS

Most of these defines are groups, actually. Here's what they should
cover:

ETHTOOL_COALESCE_USECS
rx_coalesce_usecs
tx_coalesce_usecs

ETHTOOL_COALESCE_MAX_FRAMES
rx_max_coalesced_frames
tx_max_coalesced_frames

ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQ
tx_max_coalesced_frames_irq

ETHTOOL_COALESCE_PKT_RATE_RX_USECS
use_adaptive_rx_coalesce
rx_coalesce_usecs_low
rx_coalesce_usecs_high
pkt_rate_low
pkt_rate_high
rate_sample_interval

So AFAICS all is covered.

I was wondering if I should name the groups somewhat differently to
make it clear?

> >   	.get_drvinfo = mlx4_en_get_drvinfo,
> >   	.get_link_ksettings = mlx4_en_get_link_ksettings,
> >   	.set_link_ksettings = mlx4_en_set_link_ksettings,
> >   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ