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]
Message-ID: <20210616130424.GB9951@plvision.eu>
Date:   Wed, 16 Jun 2021 16:04:24 +0300
From:   Vadym Kochan <vadym.kochan@...ision.eu>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        Andrew Lunn <andrew@...n.ch>,
        Taras Chornyi <tchornyi@...vell.com>,
        linux-kernel@...r.kernel.org,
        Mickey Rachamim <mickeyr@...vell.com>,
        Serhiy Boiko <serhiy.boiko@...ision.eu>,
        Volodymyr Mytnyk <vmytnyk@...vell.com>,
        Vadym Kochan <vkochan@...vell.com>
Subject: Re: [PATCH net-next 1/2] net: marvell: Implement TC flower offload

Hi Vladimir,

On Wed, Jun 16, 2021 at 03:54:53AM +0300, Vladimir Oltean wrote:
> On Tue, Jun 15, 2021 at 03:54:43PM +0300, Vadym Kochan wrote:
> > +static int prestera_port_set_features(struct net_device *dev,
> > +				      netdev_features_t features)
> > +{
> > +	netdev_features_t oper_features = dev->features;
> > +	int err;
> > +
> > +	err = prestera_port_handle_feature(dev, features, NETIF_F_HW_TC,
> > +					   prestera_port_feature_hw_tc);
> 
> Why do you even make NETIF_F_HW_TC able to be toggled and not just fixed
> to "on" in dev->features? If I understand correctly, you could then delete
> a bunch of refcounting code whose only purpose is to allow that feature
> to be disabled per port.
> 

The only case where it can be used is when user want to disable TC
offloading and apply set of rules w/o skip_hw.

So you think it is OK to not having an ability to disable offloading at
all ?

> > +
> > +	if (err) {
> > +		dev->features = oper_features;
> > +		return -EINVAL;
> > +	}
> > +
> > +	return 0;
> > +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ