Re: [net-next] neigh: remove duplicate check for same neigh

2016-11-29 Thread David Ahern
On 11/29/16 6:27 PM, 张胜举 wrote: > This has less changes, but I preferred to add a new function to do the > filter logic, this is the same as your code @rtnl_dump_ifinfo(). I'd prefer it to stay in line as it is now. You can save the cycles of filtering on already viewed entries without an overha

RE: [net-next] neigh: remove duplicate check for same neigh

2016-11-29 Thread 张胜举
> -Original Message- > From: David Ahern [mailto:d...@cumulusnetworks.com] > Sent: Wednesday, November 30, 2016 12:23 AM > To: Zhang Shengju ; > netdev@vger.kernel.org > Subject: Re: [net-next] neigh: remove duplicate check for same neigh > > On 11/29/16 1:22

Re: [net-next] neigh: remove duplicate check for same neigh

2016-11-29 Thread David Ahern
On 11/29/16 1:22 AM, Zhang Shengju wrote: > @@ -2285,20 +2295,15 @@ static int neigh_dump_table(struct neigh_table *tbl, > struct sk_buff *skb, > rcu_read_lock_bh(); > nht = rcu_dereference_bh(tbl->nht); > > - for (h = s_h; h < (1 << nht->hash_shift); h++) { > - if (h