Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Aug 2017 22:33:31 -0500
From:      "Mike Karels" <mike@karels.net>
To:        "Gopakumar Pillai" <gpillai@vmware.com>
Cc:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, "freebsd-net@FreeBSD.org" <freebsd-net@FreeBSD.org>
Subject:   Re: Only last IP frag sent if ARP entry absent
Message-ID:  <9B1B1A12-CD9F-4A9F-B596-A2F6E5BAED1E@karels.net>
In-Reply-To: <AFD0C317-D4E2-4A9E-B6F2-CCA2B0B7464F@vmware.com>
References:  <F9ABB88D-108D-4EF0-8962-091662F488FD@vmware.com> <43CC3432-DB42-4170-B3E7-E305561973F3@lists.zabbadoz.net> <AFD0C317-D4E2-4A9E-B6F2-CCA2B0B7464F@vmware.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Another $.02 (inline):

On 17 Aug 2017, at 18:39, Gopakumar Pillai wrote:

> Thank You Bjoern. Could you please point me to the RFC?

I don=E2=80=99t know if there is anything more recent than RFC1122 on thi=
s. =20
IIRC, it requires queuing at least one packet.  Queing one packet is=20
what BSD has done essentially since ARP was implemented.

> If this is not a MUST behavior in RFC, would my fix be good? I agree=20
> that this would affect only ICMP/UDP traffic.

People have been asking for queuing of multiple packets for years.  That=20
is a more general change.  Consider another dumb application that starts=20
out by sending multiple UDP packets back-to-back.  However,=20
well-designed application protocols don=E2=80=99t experience problems lik=
e=20
this.  I=E2=80=99ll quickly note that ping isn=E2=80=99t an application, =
but a=20
network measuring tool.  If you ask the question =E2=80=9Cwhat happens if=
 I=20
start off a session with a single large packet and I don=E2=80=99t suppor=
t=20
retransmission=E2=80=9D, ping answers that question correctly.

If badly-designed protocols get bad performance, that doesn=E2=80=99t see=
m=20
like a bug to me, but a feature.

> On 8/17/17, 2:40 PM, "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>=20
> wrote:
>
>     On 17 Aug 2017, at 21:16, Gopakumar Pillai wrote:
>
>     > Hi FreeBSD Networking Gurus,
>     > I came across an issue with an old version of FreeBSD and=20
> looking at
>     > the latest FreeBSD code, seems it exists even now. I am assuming=20
> that
>     > this issue is not reported.
>     >
>     > Observation:
>     > When a ping was performed with larger payload than MTU, the=20
> first ping
>     > failed when the ARP entry was absent for that IP.
>
>     That is because ping/ICMP has no retransmit.
>
>
>     > Noticed on the wire that the last IP fragment was sent for the=20
> first
>     > request and then the subsequent requests were fine.
>     >
>     > Root Cause:
>     >   * ip_output fragments the packets and loops through the=20
> fragments to
>     > send them to ether_output.
>     >   * ether_output does an arpresolve and if there is no existing=20
> ARP
>     > entry it'll return EWOULDBLOCK after sending ARP Request.
>     >   * ether_output ignores the error and propagates success to=20
> ip_output
>     > and it continues to send the remaining fragments.
>     >   * llentry keeps only one mbuf and the last fragment is=20
> retained when
>     > the ARP Reply comes and the fragment is sent.
>
>     Yes, according to the spec (RFC) we are supposed to throw the=20
> packet
>     away entirely and simply report that to the next upper layer. =20
> However
>     over the years people realised that this sucks for a TCP SYN=20
> packet with
>     a retransmit timer and hence we store one of them.
>
>     A large UDP packet would btw see the same behaviour to your ping.
>     There=E2=80=99s no guarantee any of these packets will not be dropp=
ed=20
> anywhere
>     on the network, so we can as well.
>
>     Just my 2ct
>
>     /bz

		Mike
From owner-freebsd-net@freebsd.org  Fri Aug 18 04:36:10 2017
Return-Path: <owner-freebsd-net@freebsd.org>
Delivered-To: freebsd-net@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C98B9DC94BA
 for <freebsd-net@mailman.ysv.freebsd.org>;
 Fri, 18 Aug 2017 04:36:10 +0000 (UTC)
 (envelope-from gpillai@vmware.com)
Received: from NAM03-CO1-obe.outbound.protection.outlook.com
 (mail-co1nam03on0045.outbound.protection.outlook.com [104.47.40.45])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))
 (Client CN "mail.protection.outlook.com",
 Issuer "Microsoft IT SSL SHA2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 724D172F99
 for <freebsd-net@FreeBSD.org>; Fri, 18 Aug 2017 04:36:09 +0000 (UTC)
 (envelope-from gpillai@vmware.com)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=onevmw.onmicrosoft.com; s=selector1-vmware-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
 bh=r1I6uWVXJSgJhXhQqxf7LI8Vxr6shEwQsVu/8MS4UlY=;
 b=qt1eQ9+VzMiF7XqQftRtl0K2AAQkFLGb/Kl3R3FPFoYPq/MaRgsB2pOPBCTuUZ2AC/S9GeKJAwLPpJ6qLOnXFGo3aDHR1ZLocUcpo44I7JsPg6JSmELzb1D436WMveioyJ+El+LBKffdguLfLXGPXDt0MX2asw7M+dFpUAumYfM=
Received: from DM5PR05MB3081.namprd05.prod.outlook.com (10.173.218.143) by
 DM5PR05MB3561.namprd05.prod.outlook.com (10.174.242.154) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.1.1385.4; Fri, 18 Aug 2017 04:36:07 +0000
Received: from DM5PR05MB3081.namprd05.prod.outlook.com ([10.173.218.143]) by
 DM5PR05MB3081.namprd05.prod.outlook.com ([10.173.218.143]) with mapi id
 15.01.1385.005; Fri, 18 Aug 2017 04:36:07 +0000
From: Gopakumar Pillai <gpillai@vmware.com>
To: Mike Karels <mike@karels.net>
CC: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>,
 "freebsd-net@FreeBSD.org" <freebsd-net@FreeBSD.org>
Subject: Re: Only last IP frag sent if ARP entry absent
Thread-Topic: Only last IP frag sent if ARP entry absent
Thread-Index: AQHTF54oAIaB9utuUkWJnCYLGMHoeqKJE8iA//+rw4CAALa/gP//nCMA
Date: Fri, 18 Aug 2017 04:36:07 +0000
Message-ID: <DA5C9C72-44E2-4D9F-B8C1-850784F36320@vmware.com>
References: <F9ABB88D-108D-4EF0-8962-091662F488FD@vmware.com>
 <43CC3432-DB42-4170-B3E7-E305561973F3@lists.zabbadoz.net>
 <AFD0C317-D4E2-4A9E-B6F2-CCA2B0B7464F@vmware.com>
 <9B1B1A12-CD9F-4A9F-B596-A2F6E5BAED1E@karels.net>
In-Reply-To: <9B1B1A12-CD9F-4A9F-B596-A2F6E5BAED1E@karels.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: spf=none (sender IP is )
 smtp.mailfrom=gpillai@vmware.com; 
x-originating-ip: [67.169.166.146]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM5PR05MB3561;
 20:+Xi1Ny2/VUU3h5WcemW1X+xSQ216Gv9cMHFzUZd1i5lKOB/XFIgft9PZzM/EJJqzY2TvIiHzpmVC/R3CI6Q/KSJ61l57kryukBYE4fqb6+z+VTgcf9kKg9aUpNpr9NRYTUCxqM4RjBvSMg9uPX///vb6RRttd8/9eBMRP+AZi0M=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: 20ac7f66-0b86-42a1-6941-08d4e5f2a4bf
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
 RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);
 SRVR:DM5PR05MB3561; 
x-ms-traffictypediagnostic: DM5PR05MB3561:
x-exchange-antispam-report-test: UriScan:(61668805478150)(278428928389397)(21748063052155); 
x-microsoft-antispam-prvs: <DM5PR05MB35610E1AB86D8BFB0754C8D9D9800@DM5PR05MB3561.namprd05.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
 RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6041248)(20161123562025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);
 SRVR:DM5PR05MB3561; BCL:0; PCL:0;
 RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);
 SRVR:DM5PR05MB3561; 
x-forefront-prvs: 040359335D
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10009020)(6009001)(24454002)(199003)(377454003)(189002)(82746002)(6506006)(6486002)(83716003)(77096006)(102836003)(4326008)(6116002)(229853002)(14454004)(33656002)(7736002)(93886005)(25786009)(478600001)(6916009)(86362001)(68736007)(5660300001)(6436002)(2950100002)(3846002)(97736004)(53546010)(54356999)(6246003)(105586002)(106356001)(81156014)(101416001)(50986999)(76176999)(6512007)(99286003)(8676002)(54906002)(8936002)(54896002)(53936002)(3660700001)(3280700002)(189998001)(66066001)(110136004)(2906002)(6306002)(36756003)(2900100001)(81166006);
 DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR05MB3561;
 H:DM5PR05MB3081.namprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords;
 A:1; MX:1; LANG:en; 
received-spf: None (protection.outlook.com: vmware.com does not designate
 permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
MIME-Version: 1.0
X-OriginatorOrg: vmware.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2017 04:36:07.3686 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR05MB3561
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
X-Content-Filtered-By: Mailman/MimeDel 2.1.23
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net/>;
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Aug 2017 04:36:10 -0000

VGhhbmsgWW91IEJqb2VybiBhbmQgTWlrZS4NCg0KV2hpbGUgSSBhZ3JlZSB3aXRoIHlvdSBNaWtl
IHRoYXQgcGluZyBjYW4gZmFpbCwgYSBVRFAgYXBwbGljYXRpb24gY291bGQgYWxzbyBiZSBhZmZl
Y3RlZCDigJMgaWYgaXRzIHNlbmRpbmcgPk1UVSBkYXRhIGFuZCBpZiBBUlAgZW50cnkgaXMgYWJz
ZW50LiBBbmQgZXRoZXJfb3V0cHV0IHdvdWxkbuKAmXQgZXZlbiB0ZWxsIHRoZSBhcHAgaWYgdGhl
IHNlbmRpbmcgZmFpbGVkIG9yIG5vdCAoYXMgcGVyIGV4aXN0aW5nIGNvZGUpLiBBZ3JlZSB0aGF0
IGJhZGx5IHdyaXR0ZW4gYXBwbGljYXRpb25zIHdvdWxkIHN1ZmZlciB0aGUgbW9zdC4gTXkgZml4
IG9ubHkgaGVscHMgYXBwbGljYXRpb25zLg0KDQpJIGd1ZXNzIEkgYW0gbm90IHRvdGFsbHkgb3V0
IG9mIGxpbmUuDQoNCkJ1dCBub3Qgc3VyZSB3aGV0aGVyIEkgc2hvdWxkIGNoZWNraW4gdGhpcyBm
aXggb3Igbm90ISDimLoNCg0KVGhhbmsgWW91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