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] [day] [month] [year] [list]
Message-ID: <d516d98f-f0bf-33b1-777b-10a218c3aecf@gmail.com>
Date:   Mon, 6 Aug 2018 15:37:24 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev@...r.kernel.org, vivien.didelot@...oirfairelinux.com,
        linville@...driver.com, davem@...emloft.net
Subject: Re: [PATCH net-next 2/3] net: dsa: bcm_sf2: Propagate ethtool::rxnfc
 to CPU port



On 08/06/2018 03:32 PM, Andrew Lunn wrote:
>>  int bcm_sf2_get_rxnfc(struct dsa_switch *ds, int port,
>>  		      struct ethtool_rxnfc *nfc, u32 *rule_locs)
>>  {
>> +	struct net_device *p = ds->ports[port].cpu_dp->master;
>>  	struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
>>  	int ret = 0;
>>  
>> @@ -1214,12 +1223,20 @@ int bcm_sf2_get_rxnfc(struct dsa_switch *ds, int port,
>>  
>>  	mutex_unlock(&priv->cfp.lock);
> 
> Hi Florian
> 
> I think you should be testing ret here. If you have had a real error,
> you probably should be returning it, rather than overwriting it with
> what ethtool returns below.

Hu, right, thanks for spotting it, this is done in the set_rxnfc() part,
will submit a v2 shortly.

> 
>> +	/* Pass up the commands to the attached master network device */
>> +	if (p->ethtool_ops->get_rxnfc) {
>> +		ret = p->ethtool_ops->get_rxnfc(p, nfc, rule_locs);
>> +		if (ret == -EOPNOTSUPP)
>> +			ret = 0;
>> +	}
>> +
>>  	return ret;
>>  }
> 
>    Andrew
> 

-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ