Re: [PATCH net-next v7 01/10] net: bridge: extend the process of special frames

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

 



On Tue, 27 Oct 2020 10:02:42 +0000
Henrik Bjoernlund via Bridge <bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> +/* Return 0 if the frame was not processed otherwise 1
> + * note: already called with rcu_read_lock
> + */
> +static int br_process_frame_type(struct net_bridge_port *p,
> +				 struct sk_buff *skb)
> +{
> +	struct br_frame_type *tmp;
> +
> +	hlist_for_each_entry_rcu(tmp, &p->br->frame_type_list, list)
> +		if (unlikely(tmp->type == skb->protocol))
> +			return tmp->frame_handler(p, skb);
> +
> +	return 0;
> +}

Does the linear search of frame types have noticable impact on performance?
Hint: maybe a bitmap or something would be faster.



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux