net/arp: Improve arp_find() commit 9774d35010 to reduce the amount and frequency of data copies.

This commit is contained in:
Gregory Nutt
2018-08-25 07:12:21 -06:00
parent aa409f46ab
commit 3bf96c8e7e
11 changed files with 94 additions and 55 deletions
+1 -2
View File
@@ -159,10 +159,9 @@ static inline bool ipfwd_addrchk(FAR struct forward_s *fwd)
{
#if !defined(CONFIG_NET_ARP_IPIN) && !defined(CONFIG_NET_ARP_SEND)
FAR struct ipv4_hdr_s *ipv4 = (FAR struct ipv4_hdr_s *)fwd->f_iob->io_data;
struct arp_entry entry;
int ret;
ret = arp_find(*(in_addr_t *)ipv4->destipaddr, &entry);
ret = arp_find(*(in_addr_t *)ipv4->destipaddr, NULL);
return (ret >= 0);
#else
return true;