From: David Ahern <d...@cumulusnetworks.com>
Date: Sun,  3 Apr 2016 17:09:07 -0700

> +             rcu_read_lock_bh();
> +
> +             n = __neigh_lookup_noref(&arp_tbl, &nh->nh_gw, nh->nh_dev);
> +             if (n)
> +                     state = n->nud_state;
> +
> +             rcu_read_unlock_bh();

Please use __ipv4_neigh_lookup_noref() (from net/arp.h), it inlines
the comparison and hash functions and is therefore several orders of
magnitude faster.

Reply via email to