From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web12.15764.1599719583314097290 for ; Wed, 09 Sep 2020 23:33:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HRmiYBh8; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599719582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FEUC0BTrAr5CtEGQAKPsd7i2xtkCKqhYdG+5u9psI0g=; b=HRmiYBh8fON+xk8VpfiD86n6EHUqUxLlvoRLl/KJqYBLfLOdEBJZtBKws+ELeZA5jt0OoQ HPDfwA0P//z/AieB2HQeKxjyQIq0PyWNlnxb5yh0V+Wg97VW+1iOnol7k+jeceBhYPrGpb WbhyMDP6C9E6ECqMy1/nz7NczJb/Km0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-176-tB0jzsPpNv2vmJWfAPIhuw-1; Thu, 10 Sep 2020 02:32:53 -0400 X-MC-Unique: tB0jzsPpNv2vmJWfAPIhuw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 427A718BE160; Thu, 10 Sep 2020 06:32:51 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-181.ams2.redhat.com [10.36.112.181]) by smtp.corp.redhat.com (Postfix) with ESMTP id B86E95D9EF; Thu, 10 Sep 2020 06:32:47 +0000 (UTC) Subject: Re: [PATCH v11 0/1] ShellPkg/DynamicCommand: add HttpDynamicCommand To: Vladimir Olovyannikov , devel@edk2.groups.io Cc: Zhichao Gao , Maciej Rabeda , Jiaxin Wu , Siyuan Fu , Ray Ni , Liming Gao , Nd , Samer El-Haj-Mahmoud References: <20200909184904.11129-1-vladimir.olovyannikov@broadcom.com> From: "Laszlo Ersek" Message-ID: Date: Thu, 10 Sep 2020 08:32:46 +0200 MIME-Version: 1.0 In-Reply-To: <20200909184904.11129-1-vladimir.olovyannikov@broadcom.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US On 09/09/20 20:49, Vladimir Olovyannikov wrote: > Signed-off-by: Vladimir Olovyannikov > Cc: Zhichao Gao > Cc: Maciej Rabeda > Cc: Jiaxin Wu > Cc: Siyuan Fu > Cc: Ray Ni > Cc: Liming Gao > Cc: Nd > Cc: Laszlo Ersek > Cc: Samer El-Haj-Mahmoud > > This patchset introduces an http client utilizing EDK2 HTTP protocol, to > allow fast image downloading from http/https servers. > HTTP download speed is usually faster than tftp. > The client is based on the same approach as tftp dynamic command, and > uses the same UEFI Shell command line parameters. This makes it easy > integrating http into existing UEFI Shell scripts. > Note that to enable HTTP download, feature Pcd > gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections must be set to TRUE. > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2860 > > PATCH v11 changes: > Address comments from Laszlo: > - use TimeBaseLib.h header to get rid of duplicated constants; > - explicitly return UINT32 in EfiTimeToEpoch(). to be clear, I explicitly *disagree* with returning UINT32 from EfiTimeToEpoch(). I'm not "demanding" (or even suggesting) that you update the EfiTimeToEpoch() implementation in this patch to return UINTN, but I'd like to be very clear that, IMO, for EfiTimeToEpoch() to suffer from a year 2106 problem on 64-bit systems too, is bad design. So please don't list the UINT32 return type as my suggestion -- that's the exact opposite of what I'd actually suggest. Zhichao: are you ready to merge this patch? If so, please let me know; I'll test it then. Thanks Laszlo > > > Vladimir Olovyannikov (1): > ShellPkg/DynamicCommand: add HttpDynamicCommand > > ShellPkg/ShellPkg.dec | 1 + > ShellPkg/ShellPkg.dsc | 5 + > .../HttpDynamicCommand/HttpApp.inf | 58 + > .../HttpDynamicCommand/HttpDynamicCommand.inf | 63 + > .../DynamicCommand/HttpDynamicCommand/Http.h | 91 + > ShellPkg/Include/Guid/ShellLibHiiGuid.h | 5 + > .../DynamicCommand/HttpDynamicCommand/Http.c | 1823 +++++++++++++++++ > .../HttpDynamicCommand/HttpApp.c | 61 + > .../HttpDynamicCommand/HttpDynamicCommand.c | 137 ++ > .../HttpDynamicCommand/Http.uni | 117 ++ > 10 files changed, 2361 insertions(+) > create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.inf > create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf > create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.h > create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c > create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.c > create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.c > create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.uni >