Date: Fri, 16 Mar 2018 15:44:49 +0300 From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: sthaug@nethelp.no, "Alexander V. Chernikov" <melifaro@ipfw.ru> Cc: freebsd-net@freebsd.org Subject: Re: Does FreeBSD do proactive ARP refresh? Message-ID: <21eca372-6fc0-6c86-4ca8-a398bfa37d92@yandex.ru> In-Reply-To: <20180316.124748.104098359.sthaug@nethelp.no> References: <8530131521193098@web19g.yandex.ru> <20180316.110054.74682026.sthaug@nethelp.no> <20180316.122720.71152047.sthaug@nethelp.no> <20180316.124748.104098359.sthaug@nethelp.no>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3ZUx1sX8ShmEqqE7Fpvpn6TYQFyAFT7A6 Content-Type: multipart/mixed; boundary="mrt3brP2owfeyIyP8LR7RrorVMGhNXcmM"; protected-headers="v1" From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: sthaug@nethelp.no, "Alexander V. Chernikov" <melifaro@ipfw.ru> Cc: freebsd-net@freebsd.org Message-ID: <21eca372-6fc0-6c86-4ca8-a398bfa37d92@yandex.ru> Subject: Re: Does FreeBSD do proactive ARP refresh? References: <8530131521193098@web19g.yandex.ru> <20180316.110054.74682026.sthaug@nethelp.no> <20180316.122720.71152047.sthaug@nethelp.no> <20180316.124748.104098359.sthaug@nethelp.no> In-Reply-To: <20180316.124748.104098359.sthaug@nethelp.no> --mrt3brP2owfeyIyP8LR7RrorVMGhNXcmM Content-Type: multipart/mixed; boundary="------------FB3221505C4F71A7F48BA677" Content-Language: en-US This is a multi-part message in MIME format. --------------FB3221505C4F71A7F48BA677 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 16.03.2018 14:47, sthaug@nethelp.no wrote: >> And thank you for that suggestion! The packet loss during ARP refresh >> (of the destination address connected to the output interface) does >> *not* happen when the box is forwarding! It only happens with locally >> generated traffic. >=20 > Checking once per second with "arp -n <destination IP>" I can see the > following behavior with net.link.ether.inet.max_age=3D120: >=20 > - Locally generated traffic: The ARP entry is refreshed after > net.link.ether.inet.max_age seconds - which presumably means it > actually expires first. And there is some packet loss. >=20 > - Transit traffic (the box is forwarding): The ARP entry is refreshed > 5 seconds *before* net.link.ether.inet.max_age has passed, and there > is no packet loss. Can you test this patch? I did not tested it, but I think it should fix this issue. --=20 WBR, Andrey V. Elsukov --------------FB3221505C4F71A7F48BA677 Content-Type: text/x-patch; name="ethersubr.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ethersubr.diff" Index: sys/net/if_ethersubr.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/net/if_ethersubr.c (revision 330791) +++ sys/net/if_ethersubr.c (working copy) @@ -317,6 +317,17 @@ ether_output(struct ifnet *ifp, struct mbuf *m, phdr =3D lle->r_linkdata; hlen =3D lle->r_hdrlen; pflags =3D lle->r_flags; + /* + * XXX: Check if we have feedback request + * from arptimer()/nd6_llinfo_timer(). + */ + if ((pflags & RLLE_VALID) && + lle->r_skip_req !=3D 0) { + LLE_REQ_LOCK(lle); + /* Notify that entry was used */ + lle->r_skip_req =3D 0; + LLE_REQ_UNLOCK(lle); + } } } } --------------FB3221505C4F71A7F48BA677-- --mrt3brP2owfeyIyP8LR7RrorVMGhNXcmM-- --3ZUx1sX8ShmEqqE7Fpvpn6TYQFyAFT7A6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlqrvEEACgkQAcXqBBDI oXo7tgf9EMttcnWuuQgjd9VieQBdI9Bw3VQfmzXNB+3nu28jTm5r/OGgoCWQ3OzE bYlOuP4CVXFraSlFE0eR+/krd/qpYHMnI14eTl05VZpJctEHVG4tBEfiEsXfdv8G h4RHbMXliA+sYen9dLD1kWTMF2P7yGpAlKyrpl4b07IFAEvkJM7VI6LnLKRV/EFk BI7BZWpWRecfN5fZlZFrFUTJlu7ClzM3M16D056x20fFI8gLvBvrCTM+eTiUZk7z Nw913kR7QDoydFqd9gDATIAaq/UTCe/8EtEVg/5MEp3lOmTnQxiK1zXnI74Sr1k5 NgicksaL3qepWHPoj/ERM0vy71OhpA== =NT4S -----END PGP SIGNATURE----- --3ZUx1sX8ShmEqqE7Fpvpn6TYQFyAFT7A6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?21eca372-6fc0-6c86-4ca8-a398bfa37d92>