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: <39f7776b-e979-1d44-f27c-f9d9ed70dc40@engleder-embedded.com>
Date:   Fri, 23 Sep 2022 21:24:48 +0200
From:   Gerhard Engleder <gerhard@...leder-embedded.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     davem@...emloft.net, robh+dt@...nel.org, netdev@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH net-next 5/7] tsnep: Add EtherType RX flow classification
 support

On 22.09.22 03:00, Jakub Kicinski wrote:
> On Thu, 15 Sep 2022 22:36:35 +0200 Gerhard Engleder wrote:
>> +static int tsnep_add_rule(struct tsnep_adapter *adapter,
>> +			  struct tsnep_rxnfc_rule *rule)
>> +{
>> +	struct tsnep_rxnfc_rule *pred, *cur;
>> +
>> +	tsnep_enable_rule(adapter, rule);
>> +
>> +	pred = NULL;
>> +	list_for_each_entry(cur, &adapter->rxnfc_rules, list) {
>> +		if (cur->location >= rule->location)
>> +			break;
>> +		pred = cur;
>> +	}
>> +
>> +	list_add(&rule->list, pred ? &pred->list : &adapter->rxnfc_rules);
>> +	adapter->rxnfc_count++;
>> +
>> +	return 0;
> 
> This never fails, perhaps the return code is unnecessary

I will simplify as suggested.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ