From owner-freebsd-net@freebsd.org Tue Aug 18 17:47:46 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 238203C2679 for ; Tue, 18 Aug 2020 17:47:46 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BWJKC30Jsz4QZS for ; Tue, 18 Aug 2020 17:47:42 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 07IHle34066441; Tue, 18 Aug 2020 10:47:40 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 07IHldYZ066440; Tue, 18 Aug 2020 10:47:39 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202008181747.07IHldYZ066440@gndrsh.dnsmgr.net> Subject: Re: Is anybody using ng_pipe? In-Reply-To: To: Ryan Stone Date: Tue, 18 Aug 2020 10:47:39 -0700 (PDT) CC: freebsd-net X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4BWJKC30Jsz4QZS X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.71 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.19)[-0.185]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; MAILMAN_DEST(0.00)[freebsd-net]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2020 17:47:46 -0000 > I recently needed to be able to simulate a lossy, high-latency network > in an environment where dummynet wasn't possible. I gave ng_pipe a > try, and hit some major issues > > 1. Instead of configuring a packet drop rate, you configure a bit > error rate, which I found significantly less intuitive >From your background being packet network centric perhaps? Those of us who have line oriented, aka telecom, centric backgrounds BER is a very meaningful and useful metric. > 2. The use of BER makes for a very inconvenient implementation, as > ng_pipe has to maintain a table of packet drop rates for every > possible packet size Hum, that sounds like a poor implementation indeed. It seems like it would be easy to convert a BER into a packet drop probability based on bytes that have passed through the pipe. It should be easy to covert a BER into a packet drop rate, but doing the converse leads to quantization errors. I would rather see us keep the BER as the metric and fix what is broken rather than convert this to a packet drop rate.. > 3. The table implementation isn't sized right for LRO or TSO, leading > to ng_pipe going out of bounds of the array and panicking the system Code predates LRO and TSO, so not unexpected. > 4. The table calculation had two integer truncation bugs and used the > wrong formula. I'm reasonably sure it would never calculate a > probability other than 0 due a 64-bit constant being truncated to > 32-bits. You retracted this. > I'd like to dump all of this and just implement a packet loss rate, > which would simplify all this immensely. Is anybody using ng_pipe > with a non-zero BER who would object to this? Given this litany of > issues I doubt it, but I thought that I'd be sure. My gut instinc is that statistically BER leads to a more realistic model. -- Rod Grimes rgrimes@freebsd.org