From patchwork Wed Mar 16 06:02:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying-Chun Liu X-Patchwork-Id: 1605952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Kxi93zOx; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KJKSF0lHhz9sBy for ; Wed, 16 Mar 2022 17:02:35 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7BD1D82FCA; Wed, 16 Mar 2022 07:02:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Kxi93zOx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2BD898002A; Wed, 16 Mar 2022 07:02:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 450DA80F68 for ; Wed, 16 Mar 2022 07:02:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=grandpaul@gmail.com Received: by mail-pf1-x430.google.com with SMTP id g19so2525612pfc.9 for ; Tue, 15 Mar 2022 23:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yxMTn/pWodDBkGCWlOeJvpYy3mLd0DjQTilQeMQt7no=; b=Kxi93zOxvwC37HjTgExyzPkOg4r0KdrRXF+ymZe1LlYSTyMd+MC2geHhsHjoWuiH4v 5xbvZFPx1+tx/ITIVCL7yxgW8Zbzi88UZu0jrrsl7x/u9N1Sz7LcafB8xC90nTl+A8dE ebJluYVFCTLC9VZcQ2D19gwIbHidtEZt3VvZtFZtJi2rIrBjKXNpD6rQAP0ab9f1mal7 FQOd9aQJtC4/iNahoYa5HDrcd4zOQn6MnxHONxdPr6LmwLx9NATP0698Ut3z9zVcV5yj aVoU68oKJRwKiDzgrTh2t/JCJSXZuvTR67esfuxh/WtQMVSG4Bu9UZHAAZGBkREq2SZH q8Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yxMTn/pWodDBkGCWlOeJvpYy3mLd0DjQTilQeMQt7no=; b=6wE64qp9LN4lt8fX2VuPgSvRQPEULr+LUq/c/x4+J/wmzymrLuHvf0hkutMpAXNL0t wDot7G0tCLiSyt1Ia1Z8nxKGgTnthWMOvEaMuS9Wx4NQygaULLlA6328LsF0s5X0MJWk KEk7y5LYCz2RSs/in8QDMCN83tThm3Gv9crnQWdJ04etGokM0LoJbB93LZTZ93eU/xCh /8OrwB837x3hWo02Gt6d5S0C2qUJcBsuzHnXTxQUlHJAEqmjxSq3nVVa1jPuWARMvr6u ne9UTpD8o6XROWxOpW0veAY4QsuJ9kWECcKRhMNC68kRFa2ebyqc4Zr95FlzL7p3FHmW 6ayA== X-Gm-Message-State: AOAM533hZFOPOGC2NtamfDw5sbh1vqJ9S1QasGE5xnDuRUswMYYTsmip a1D7GaG/g++RyVECx7RXsVKCVleWZNk= X-Google-Smtp-Source: ABdhPJz5v7HYp2McVoWTBiuOVjHXc3uhI9rRkUJN3Re3whIa5uVtEotretyVaU93DOJ34MSva/DKnQ== X-Received: by 2002:a05:6a00:1145:b0:4f6:3ebc:a79b with SMTP id b5-20020a056a00114500b004f63ebca79bmr32009461pfm.41.1647410538255; Tue, 15 Mar 2022 23:02:18 -0700 (PDT) Received: from localhost (host-111-184-129-17.dynamic.kbtelecom.net. [111.184.129.17]) by smtp.gmail.com with ESMTPSA id e10-20020a056a00162a00b004f6fc39c081sm1108923pfc.211.2022.03.15.23.02.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Mar 2022 23:02:17 -0700 (PDT) From: Ying-Chun Liu To: u-boot@lists.denx.de Cc: "Ying-Chun Liu (PaulLiu)" Subject: [PATCH v13 0/2] add TCP and HTTP for downloading images Date: Wed, 16 Mar 2022 14:02:11 +0800 Message-Id: <20220316060213.68082-1-grandpaul@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean From: "Ying-Chun Liu (PaulLiu)" This patch is a refresh from previous patches made by Duncan Hare . I've contacted him and continue to work on this patch. This patch introduce a TCP stack with SACK. And a simple wget command to download images from http server. v13: Fix some issues which is reviewed by Christian Ying-Chun Liu (PaulLiu) (2): net: Add TCP protocol net: Add wget application cmd/Kconfig | 7 + cmd/net.c | 13 + include/net.h | 13 +- include/net/tcp.h | 222 ++++++++++++++ include/net/wget.h | 19 ++ net/Kconfig | 6 + net/Makefile | 2 + net/net.c | 36 +++ net/tcp.c | 698 +++++++++++++++++++++++++++++++++++++++++++++ net/wget.c | 436 ++++++++++++++++++++++++++++ 10 files changed, 1450 insertions(+), 2 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