From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5E36821A00AE6 for ; Wed, 7 Nov 2018 17:23:49 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2018 17:23:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,477,1534834800"; d="scan'208";a="278022379" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 07 Nov 2018 17:23:48 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 7 Nov 2018 17:23:48 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.161]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.199]) with mapi id 14.03.0415.000; Thu, 8 Nov 2018 09:23:45 +0800 From: "Wu, Jiaxin" To: "Carsey, Jaben" , "Fu, Siyuan" , "edk2-devel@lists.01.org" CC: "Ye, Ting" Thread-Topic: [PATCH v1] ShellPkg/TftpDynamicCommand: Clarify the retry count option in command. Thread-Index: AQHUdNUHLBCZCbnPy0KaTAe+n3o2cKVBynMAgALFCoCAAIjDsA== Date: Thu, 8 Nov 2018 01:23:45 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B7274164F2A42@SHSMSX103.ccr.corp.intel.com> References: <20181105065830.16192-1-Jiaxin.wu@intel.com> <20181105065830.16192-2-Jiaxin.wu@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTZkYzk0ZmQtYTIyNy00NWJmLWFjMTEtYjdhYzU3NTFhZDI1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoia0FkUE0xNk10em5ZNWQybzFiQWx6Y3hkOXJHS3Y0NnpldFRVOXVGWEdvNTVab3FWU3BwXC93UFprelFNekx0QVEifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v1] ShellPkg/TftpDynamicCommand: Clarify the retry count option in command. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2018 01:23:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Jaben, The patch already has been pushed after received your/Siyuan reviewed-by ta= g. Thanks, Jiaxin > -----Original Message----- > From: Carsey, Jaben > Sent: Thursday, November 8, 2018 9:09 AM > To: Fu, Siyuan ; Wu, Jiaxin ; > edk2-devel@lists.01.org > Cc: Ye, Ting > Subject: RE: [PATCH v1] ShellPkg/TftpDynamicCommand: Clarify the retry > count option in command. >=20 > Wu, >=20 > I plan to push this patch tomorrow, but I would like to add this to the c= ommit > message. What do you think? >=20 > "This fixes the bug where parameter value 0 causes failure." >=20 > -Jaben >=20 > > -----Original Message----- > > From: Fu, Siyuan > > Sent: Monday, November 05, 2018 10:51 PM > > To: Wu, Jiaxin ; edk2-devel@lists.01.org > > Cc: Carsey, Jaben ; Ye, Ting > > Subject: RE: [PATCH v1] ShellPkg/TftpDynamicCommand: Clarify the retry > > count option in command. > > Importance: High > > > > Reviewed-by: Fu Siyuan > > > > > > > > > -----Original Message----- > > > From: Wu, Jiaxin > > > Sent: Monday, November 5, 2018 2:59 PM > > > To: edk2-devel@lists.01.org > > > Cc: Carsey, Jaben ; Ye, Ting > > ; > > > Fu, Siyuan ; Wu, Jiaxin > > > Subject: [PATCH v1] ShellPkg/TftpDynamicCommand: Clarify the retry > > count > > > option in command. > > > > > > [-c ] is to define the number of times to transmit reque= st > > > packets and wait for a response. The default value is 6. But it doesn= 't > > > specify the behavior of zero value. Here, The patch is to clear that: > > > Set to zero also means to use the default value. > > > > > > Cc: Carsey Jaben > > > Cc: Ye Ting > > > Cc: Fu Siyuan > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > > Signed-off-by: Wu Jiaxin > > > --- > > > ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c | 6 +++++- > > > ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni | 3 ++- > > > 2 files changed, 7 insertions(+), 2 deletions(-) > > > > > > diff --git a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c > > > b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c > > > index ac2813efc3..028686e1ff 100644 > > > --- a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c > > > +++ b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c > > > @@ -216,11 +216,11 @@ EFI_MTFTP4_CONFIG_DATA > > DefaultMtftp4ConfigData =3D { > > > { { 0, 0, 0, 0 } }, // SubnetMask - Not relev= ant > > > as UseDefaultSetting=3DTRUE > > > 0, // LocalPort - Automatic= ally > > > assigned port number. > > > { { 0, 0, 0, 0 } }, // GatewayIp - Not relev= ant > > > as UseDefaultSetting=3DTRUE > > > { { 0, 0, 0, 0 } }, // ServerIp - Not known= yet > > > 69, // InitialServerPort - Standard = TFTP > > > server port > > > - 6, // TryCount - Max numbe= r of > > > retransmissions. > > > + 6, // TryCount - The numbe= r of > > > times to transmit request packets and wait for a response. > > > 4 // TimeoutValue - Retransmi= ssion > > > timeout in seconds. > > > }; > > > > > > STATIC CONST SHELL_PARAM_ITEM ParamList[] =3D { > > > {L"-i", TypeValue}, > > > @@ -419,10 +419,14 @@ RunTftp ( > > > ValueStr =3D ShellCommandLineGetValue (CheckPackage, L"-c"); > > > if (ValueStr !=3D NULL) { > > > if (!StringToUint16 (ValueStr, &Mtftp4ConfigData.TryCount)) { > > > goto Error; > > > } > > > + > > > + if (Mtftp4ConfigData.TryCount =3D=3D 0) { > > > + Mtftp4ConfigData.TryCount =3D 6; > > > + } > > > } > > > > > > ValueStr =3D ShellCommandLineGetValue (CheckPackage, L"-t"); > > > if (ValueStr !=3D NULL) { > > > if (!StringToUint16 (ValueStr, &Mtftp4ConfigData.TimeoutValue)) = { > > > diff --git a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni > > > b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni > > > index 654e42ad23..ff64912564 100644 > > > --- a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni > > > +++ b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni > > > @@ -56,11 +56,12 @@ > > > " -i interface - Specifies an adapter name, i.e., eth0.\r\n" > > > " -l port - Specifies the local port number. Default value= is > > > 0\r\n" > > > " and the port number is automatically assigned.= \r\n" > > > " -r port - Specifies the remote port number. Default valu= e is > > > 69.\r\n" > > > " -c - The number of times to transmit request packet= s > > > and\r\n" > > > -" wait for a response. The default value is 6.\r= \n" > > > +" wait for a response. The default value is 6. S= et to > > > zero\r\n" > > > +" also means to use the default value.\r\n" > > > " -t - The number of seconds to wait for a response > > > after\r\n" > > > " sending a request packet. Default value is 4s.= \r\n" > > > " -s - Specifies the TFTP blksize option as defined i= n RFC > > > 2348.\r\n" > > > " Valid range is between 8 and 65464, default va= lue > > > is 512.\r\n" > > > " -w - Specifies the TFTP windowsize option as define= d in > > > RFC 7440.\r\n" > > > -- > > > 2.17.1.windows.2