From patchwork Thu Apr 21 16:54:21 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: 564410 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp608395map; Thu, 21 Apr 2022 09:54:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwLZ//1/Goz8Y6kfoc5e17ywsYvTbePI990uZKyTuUNyAw1DDW7FDJRlHCwu/MfFP6pCnA X-Received: by 2002:a05:6402:528c:b0:425:ab33:7b6b with SMTP id en12-20020a056402528c00b00425ab337b6bmr485281edb.49.1650560078776; Thu, 21 Apr 2022 09:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650560078; cv=none; d=google.com; s=arc-20160816; b=EkM3oYqptga7eG1vBhGfSLWV7RW1BhFU866BFumBixWEIcg/IPXXQcgYojEZCFHx+a HNuiILb6i970frzyEn+EiI2r1STa3IN/vUBIQV9ZDJqimWWPOWXCslIExQFH/cw49vRY t/+09GQRGVKSU83ilODZwzVb0sMI6Kqtmh3Zcqm1RD4Kkiw/s5SOhiF1xIrN6dooNYx6 o4gKb/8UHR8bnBNRh/ovrOT4/YrscCBrRn6DNQme/kqacVbu2nH9EFJ7qFQNflc/ADZI mE46HWK/UHWYLJUJ2gOQAiMqznCAg+Q4dwD2Q5kVGO9hi9u+m+4TJ0Matqj22ah2lV32 2HbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=nJQ1MR9Y6kRy92K/eG0Anw0oRtMNyw9MAHpiZCRz1N8=; b=wq3AkO12ocH/LjBPh/F9Mu3OenXEg9Q+wm1Gm37S5rDs53B/pVw4c6Kju1FUG6Nd0g 0rOxmxIXwjaugOrMM9wGB1sAPD7r9fJ2byoxGjYHsFWIjbWpBBbqL3VgfIpqHneyRL8e aK3+Lf0CpdBeKTm6MzPaX8t859bRPrGYzXEdQdDA8UmH2c9CAJJeavQwIvtfGMv/Xw/z wg9u+dP9R2XglgAxW6K416vYcA2zcBTEMorHU3/TAHKlmgt5k7kc/eQC4QzDNbLUo9gp dhFmyapwa+2S/VYtCAgVq5EzmOjZStUfWUbKUZlU0/0M4mZNQw4g3Z5Ky9IJOqZeD43o kuig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fR2ahqeb; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id k5-20020a170906578500b006dfb901bf65si4557563ejq.535.2022.04.21.09.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 09:54:38 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fR2ahqeb; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D142F83EAF; Thu, 21 Apr 2022 18:54:35 +0200 (CEST) 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="fR2ahqeb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BBFB783EAF; Thu, 21 Apr 2022 18:54:33 +0200 (CEST) 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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) (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 B3B108394D for ; Thu, 21 Apr 2022 18:54:30 +0200 (CEST) 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-pl1-x633.google.com with SMTP id n18so5431064plg.5 for ; Thu, 21 Apr 2022 09:54:30 -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=nJQ1MR9Y6kRy92K/eG0Anw0oRtMNyw9MAHpiZCRz1N8=; b=fR2ahqebESstV5PZPsted1J5IrXl+wh9ngFTUddaH5J5B221KaRdJ/BeEY24zNn52L kw7d5ItfyfQpis6qZePGX6meBUz2EkcwFXewVI6jkeQMPQS0SfyR7RcTLIPlhJepnAO4 858Kj8xdGwZMUK5wEt+laI5LdguPmawZ0jQ3Qbe4hTHG0xyrUhgYxAHZ4hwvm8oY0a21 AyOj3QW3HkkisvWauysbuO36N4PWIsW7QFCHlrRFsHdQesHO4qneb4pumHgHKWS26nKe dz0FZDrlBN+WmZM8/AFRGMNwJfih1ROdi6BE7TKr5hVpk9djl881Ou3X1WqDMtfl1r1Z T/8Q== 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=nJQ1MR9Y6kRy92K/eG0Anw0oRtMNyw9MAHpiZCRz1N8=; b=RsFY8+XluSkbIlPNqPy9SVzo6aRoVTPtuI86G+uiXMpigXFQGS4Q0OzCOxBUoC1Qg4 5EtdQJRagj9Zjq+iRbjeOfqhnrRhsO81pKcY8+yoE/gMncsqzW7tv41NwurE3prAYYU5 jf5gEkYgZrN2MOpcnUtxW0bnzuhqOZMhPD8xtL/1WeT12dgIkhgKuaRE+iImO7SGKQiq yjTb7buXjbJOwG8uRWBQdCZZeAZJHb+cSgIeLzEdyD4ej8m5PzC8iq3tnFLfQI5IA93p oFrtfpTAxEULeIK+lCwKMV2h78uyhTI5NuBVDt6wiH4SBdDmHDq51Vri1Z2dF7GRDRDO YB4w== X-Gm-Message-State: AOAM5313aHLdfk+QCF+M1Yx6OnbNCkgKHmD4+h1rpcFYD+3nw4mPDtaA 5w8GsnGvEB77CJVC0+SUWAMw/0p17s0= X-Received: by 2002:a17:903:240c:b0:153:c452:f282 with SMTP id e12-20020a170903240c00b00153c452f282mr430532plo.88.1650560068695; Thu, 21 Apr 2022 09:54:28 -0700 (PDT) Received: from localhost ([111.184.129.17]) by smtp.gmail.com with ESMTPSA id n3-20020a056a000d4300b0050ac8dbfd0csm6955464pfv.163.2022.04.21.09.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 09:54:28 -0700 (PDT) From: Ying-Chun Liu To: u-boot@lists.denx.de Cc: Grant.Likely@arm.com, "Ying-Chun Liu (PaulLiu)" Subject: [PATCH v14 0/2] add TCP and HTTP for downloading images Date: Fri, 22 Apr 2022 00:54:21 +0800 Message-Id: <20220421165424.168274-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 v14: Add options to enable/disable SACK. Ying-Chun Liu (PaulLiu) (2): net: Add TCP protocol net: Add wget application cmd/Kconfig | 7 + cmd/net.c | 13 + include/net.h | 10 +- include/net/tcp.h | 222 ++++++++++++++ include/net/wget.h | 19 ++ net/Kconfig | 12 + net/Makefile | 2 + net/net.c | 36 +++ net/tcp.c | 709 +++++++++++++++++++++++++++++++++++++++++++++ net/wget.c | 436 ++++++++++++++++++++++++++++ 10 files changed, 1464 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