Re: [PATCH net-next 5/7] tsnep: Add EtherType RX flow classification support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux