From owner-freebsd-net@freebsd.org Fri Mar 16 12:47:19 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6D0AF4C067 for ; Fri, 16 Mar 2018 12:47:18 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 591017CC78 for ; Fri, 16 Mar 2018 12:47:18 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback4o.mail.yandex.net (mxback4o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1e]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 2E0D24306E2E; Fri, 16 Mar 2018 15:46:09 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback4o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hcY6cJUElj-k8Ga0JL9; Fri, 16 Mar 2018 15:46:09 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1521204369; bh=uFK+AUVedCO5QnH8k3P7LpOzQkq//RttyW1w0iDW77Q=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=otD7cmXeFJgdEUFbR0tqnCm74Yfckd7aE7wgKtq5o6DU/EdeIE3IatnKrwWI1XVdb ImtGR+4u8B4gu5LgHzydQyJo2/ijBTtVVdaC4081Q0q5zPw2xHDXYbehmIa+NHYHgl S7tN1TmDJ5IGv3jSaRDCsVVSwxvLAcHxkT2HZxfY= Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Pavw99EYXc-k7Ra49k6; Fri, 16 Mar 2018 15:46:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1521204368; bh=uFK+AUVedCO5QnH8k3P7LpOzQkq//RttyW1w0iDW77Q=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=np4yD3zx/Im5KmB6SgDvoQcHz/gAtuE6i/extC64ut1z7K6oRY18heiP7zG0q4m53 Rb9n60fj9JGqH68qs88Y9lTsah9wxMn4Xe4yOGD0SpKsyVBTA+Eth4SL2ctGp3T5hE YTnOCFlleQQ5CMPU2ajPfC9/5/WUA+fOUIUMTOi0= Authentication-Results: smtp4o.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: Does FreeBSD do proactive ARP refresh? To: sthaug@nethelp.no, "Alexander V. Chernikov" Cc: freebsd-net@freebsd.org References: <8530131521193098@web19g.yandex.ru> <20180316.110054.74682026.sthaug@nethelp.no> <20180316.122720.71152047.sthaug@nethelp.no> <20180316.124748.104098359.sthaug@nethelp.no> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <21eca372-6fc0-6c86-4ca8-a398bfa37d92@yandex.ru> Date: Fri, 16 Mar 2018 15:44:49 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180316.124748.104098359.sthaug@nethelp.no> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3ZUx1sX8ShmEqqE7Fpvpn6TYQFyAFT7A6" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 12:47:19 -0000 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" To: sthaug@nethelp.no, "Alexander V. Chernikov" 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 " 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--