From patchwork Sat Apr 14 23:43:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duncan Hare X-Patchwork-Id: 898211 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=synoia.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=yahoo.com header.i=@yahoo.com header.b="HJtsw1Lj"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40Nrny65sJz9s15 for ; Sun, 15 Apr 2018 09:44:05 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D369FC21E79; Sat, 14 Apr 2018 23:43:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B4BE2C21C2C; Sat, 14 Apr 2018 23:43:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BBE94C21C50; Sat, 14 Apr 2018 23:43:47 +0000 (UTC) Received: from sonic314-20.consmr.mail.bf2.yahoo.com (sonic314-20.consmr.mail.bf2.yahoo.com [74.6.132.194]) by lists.denx.de (Postfix) with ESMTPS id 4A40DC21C2C for ; Sat, 14 Apr 2018 23:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1523749425; bh=i0oLn+pit2Q/vdA8mIPkV+przy5qn53uZtnx9cCuCtc=; h=From:To:Cc:Subject:Date:From:Subject; b=HJtsw1LjsYO+Bb/mLsn+Jba1jp0Qv6Qx+3CYFwj6qfW/sHei/8sBMG0m6qNw6RL6yt6sXurHS0HEiKppowfCx6s0GOmAczync/JUmvtzrhEOMXYybXtR9CQIxzf6suf7Euy5jybdfe7GzccyZAia+tpASUoMAooIDNjn935GEh9prdquaeW5lJcsSYfXZrFzfGCBLrXcCy7BTZKDje8W7Hzd1udL7GpWzC+utoaOuj/0FbnFu+44FYO6nmDqZJips7GsATsf3lCYJU4inTpzhjaAMxoU50SvvHUXvb3YlwD+mUBcyAmeDIGpDE4n/WbyIAuKFxx5m2oCcMmvNP7LAw== X-YMail-OSG: Z4gytqEVM1lmup6j10T9mc3zmZ.Mzt8lQFRi.FAZos4WtQpTbejF3FDuA95HCAx a2mOgEdwyC8v0b6.WaQ25Z_JO3Hr5rhSOm7rf5gyi_5.MdS.ZG1CJlmAfk4DlNz0P2oPFcbd4SGy x0r2woPjfzd7MMjQGUGkDG4s9IxNZMB1ix33Ou3nck9dblPkmetihxw0KRdBPQddqJGter_NU66J oJq_jBLJjDM6LGFcaMY0NrGUcTiJV5CGnnZZ8D1ZZrfhDa.i9ISCHU9Wfn7Wcey7VfKDvCGpH57S 6Fctq7hr1gbiPaEtFde1iB5IoqPEpzuOgBaK_YrUkbagXYNVrxsIYbLVm73BWHJy24lFn3a9X9kT .oIGsrjjUY0BwdXW4m2hS5qHKAFQlpxcR4BfQITl73COulGsj7E9UeLvlUhgoo8nO9bSzOL8XDZ0 32cs9AxSJ7w_Ibqa5da1ikvAM0xHK50ipcuDVVXos8yYwGnzK9BjogRju7aE79fuOJ61IGzWGXTl RjQovQlUFrNsQBW6f1ucCjUvw2nfDaOs- Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.bf2.yahoo.com with HTTP; Sat, 14 Apr 2018 23:43:45 +0000 Received: from 68-95-124-113.lightspeed.irvnca.sbcglobal.net (EHLO raspberrypi.Danum.local) ([68.95.124.113]) by smtp418.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 0ccac9e93d7fce851aa43fc39fb7f75d; Sat, 14 Apr 2018 23:43:43 +0000 (UTC) From: DH@synoia.com To: DuncanCHare@yahoo.com Date: Sat, 14 Apr 2018 16:43:33 -0700 Message-Id: <20180414234336.26636-1-DH@synoia.com> X-Mailer: git-send-email 2.11.0 Cc: Yauheni Kaliuta , u-boot@lists.denx.de, Joe Hershberger , Maxime Ripard , Jagan Teki Subject: [U-Boot] [PATCH v10 0/3] Why netboot: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Duncan Hare Central management, including logs and change control, coupled with with enhanced security and unauthorized change detection and remediation by exposing a small attack surface. Why TCP: Currently file transfer are done using tftp or NFS both over udp. This requires a request to be sent from client (u-boot) to the boot server. For a 4 Mbyte kernel, with a 1k block size this requires 4,000 request for a block. Using a large block size, one greater than the Ethernet maximum frame size limitation, would require fragmentation, which u-boot supports. However missing fragment recovery requires timeout detection and re-transmission requests for missing fragments. UDP is ideally suited to fast single packet exchanges, inquiry/response, for example dns, becuse of the lack of connection overhead. UDP as a file transport mechanism is slow, even in low latency networks, because file transfer with udp requires poll/response mechanism to provide transfer integrity. In networks with large latency, for example: the internet, UDP is even slower. What is a 30 second transfer on a local boot server and LAN increase to over 3 minutes, because of all the requests/response traffic. This was anticipated in the evolution of the IP protocols and TCP was developed and then enhanced for high latency high bandwidth networks. The current standard is TCP with selective acknowledgment. In our testing we have reduce kernel transmission time to around 0.4 seconds for a 4Mbyte kernel, with a 100 Mbps downlink. Why http and wget: HTTP is the most efficient file retrieval protocol in common use. The client send a single request, after TCP connection, to receive a file of any length. WGET is the application which implements http file transfer outside browsers as a file transfer protocol. Versions of wget exists on many operating systems. Changes in v10: Initial changes for adding TCP Duncan Hare (3): Adding TCP and wget into u-boot Adding TCP Adding wget cmd/Kconfig | 5 + cmd/net.c | 13 + include/net.h | 33 ++- include/net/tcp.h | 218 ++++++++++++++++ include/net/wget.h | 17 ++ net/Kconfig | 10 + net/Makefile | 3 +- net/net.c | 89 +++++-- net/ping.c | 9 +- net/tcp.c | 749 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/wget.c | 420 ++++++++++++++++++++++++++++++ 11 files changed, 1532 insertions(+), 34 deletions(-) create mode 100644 include/net/tcp.h create mode 100644 include/net/wget.h create mode 100644 net/tcp.c create mode 100644 net/wget.c