[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220921180042.440a8b65@kernel.org>
Date: Wed, 21 Sep 2022 18:00:42 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Gerhard Engleder <gerhard@...leder-embedded.com>
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 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
Powered by blists - more mailing lists