From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0712.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::712]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6509C1A1DF2 for ; Wed, 17 Aug 2016 05:17:57 -0700 (PDT) Received: from TU4PR84MB0302.NAMPRD84.PROD.OUTLOOK.COM (10.162.186.24) by TU4PR84MB0303.NAMPRD84.PROD.OUTLOOK.COM (10.162.186.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21; Wed, 17 Aug 2016 12:17:56 +0000 Received: from TU4PR84MB0302.NAMPRD84.PROD.OUTLOOK.COM ([10.162.186.24]) by TU4PR84MB0302.NAMPRD84.PROD.OUTLOOK.COM ([10.162.186.24]) with mapi id 15.01.0557.022; Wed, 17 Aug 2016 12:17:54 +0000 From: "Cohen, Eugene" To: "Wu, Jiaxin" , "Ye, Ting" , "edk2-devel@lists.01.org" , "Kinney, Michael D" , "Fu, Siyuan" Thread-Topic: DHCP Automatic Configure at Driver Connect Thread-Index: AdHzMrTK7bp7ndKxTJOq/Qc4XXghzQARlkIgAAQKA6AAE/Dm8AAV/5hgABh+18AAGhwegACBdhLAABj3DZAAI4TcYAANnL8wABWc93A= Date: Wed, 17 Aug 2016 12:17:54 +0000 Message-ID: References: <895558F6EA4E3B41AC93A00D163B7274137C5EA3@SHSMSX103.ccr.corp.intel.com> <895558F6EA4E3B41AC93A00D163B7274137C63EC@SHSMSX103.ccr.corp.intel.com> <895558F6EA4E3B41AC93A00D163B7274137C677D@SHSMSX103.ccr.corp.intel.com> <895558F6EA4E3B41AC93A00D163B7274137C7D82@SHSMSX103.ccr.corp.intel.com> <895558F6EA4E3B41AC93A00D163B7274137C819F@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <895558F6EA4E3B41AC93A00D163B7274137C819F@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=eugene@hp.com; x-originating-ip: [174.19.99.119] x-ms-office365-filtering-correlation-id: fe0df0d0-63fa-488b-690a-08d3c6988471 x-microsoft-exchange-diagnostics: 1; TU4PR84MB0303; 6:eKlI/A3rFtIJsM7DuXiI3E1sPUxbd+VD1hoZD36/cAjILlFxmviuOLfpWpxoJ2haTKjg1uKLmcNnfnbnA3CcHmftIiPQfpJSEMX9Em9+yBFvOruBV9K9Fo37vqoJafAMe6PcENo1ejsPmUM+D3ZWGHpHCozFfwJzOBQKoj0Z6htqFq/0/637pws+AxkiGgVTTLkI0GhtYvAtWKafxgPZfrUeMCcI9PBoyhy1fvgXlSTSHDodCtEZldMfjysBd/j/tE8bPW4gs/s2N0sQmkEoT/6tRIGWYWZW/XWd72p3kIs=; 5:gYzYXFTxOJIkbpr2W7l9Bv4jei0MY999c0BzL1kW/RwaJH0pnVxsmnElVnByLUCcum3QezBcRFu2UBh6UDdXz8hE1dLVNEtm7d2u2Cxi1Vs87IhetJFoG6eDddIxFqHwn2vbgZ+YRjasUc69gX9qnA==; 24:YTRGCY8A+zbnW6Th2SV1Wlis3BDbM9AJe50qtc0RdnROiCca25n4/OFqbbmBMCyoPzPj5491xUojiRwCZnX316dZ3q0TspnkQnNLG6p8ehE=; 7:WIvNFj1tZaOQC1gFZx+zH8NxzSCi6TTsL84tyUMLj6K3jONC5WrFS9k4DcqUotqZOkJLpEZ9QPp+/CxxVsDrkviyQf0c6MT4dbA6pwFCzmzMe4snCnQ37LDHAjleumVcYYI1C4Tj1cf2A+dfxL4deND0FFItn1yJvh+UhQu+0qV49NN8wlVopqQZh2nVZ0Db3b2+9GY1NW5jngWDhQR1lG/HpkYKwXMO5c3KuOmZMSdxh/MyegUBIyeHkdAnJnil x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:TU4PR84MB0303; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(21532816269658); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:TU4PR84MB0303; BCL:0; PCL:0; RULEID:; SRVR:TU4PR84MB0303; x-forefront-prvs: 0037FD6480 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(6602003)(189002)(81166006)(102836003)(305945005)(6116002)(68736007)(3846002)(8936002)(81156014)(101416001)(50986999)(8676002)(33656002)(9686002)(7696003)(345774005)(87936001)(74316002)(2900100001)(2501003)(5001770100001)(86362001)(106356001)(54356999)(2950100001)(76176999)(92566002)(105586002)(93886004)(66066001)(97736004)(122556002)(77096005)(107886002)(586003)(10400500002)(7846002)(3280700002)(5002640100001)(99286002)(3660700001)(189998001)(7736002)(2906002)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:TU4PR84MB0303; H:TU4PR84MB0302.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: hp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Aug 2016 12:17:54.5842 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ca7981a2-785a-463d-b82a-3db87dfc3ce6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TU4PR84MB0303 Subject: Re: DHCP Automatic Configure at Driver Connect X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2016 12:17:57 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Jiaxin, > Ip4Config2OnDhcp4SbInstalled() maybe confused you, but it's not accurate > as you said "when the DHCP SB is installed you do a configure automatical= ly". > It's more proper to say "IPv4 driver is requiring DHCP SB due to it detec= ts the > DHCP policy." In such a case, it's reasonable with the function > Ip4Config2OnDhcp4SbInstalled(). I see - my observation was based on the fact that removing this prevented t= he undesirable automatic configuration, but what you say makes sense. > I agree with you this code did not exist in *Ip4Dxe* before. We implement= ed > this function because of we need start the AutoConfig due to the DHCP > policy is detected by Ip4Dxe driver (DHCP policy (note: NOT DHCP SB) > together with D.O.R.A process). It does may appear AutoConfig straight aw= ay > with DHCP SB if Ip4Dxe ahead of Dhcp4Dxe. But the precondition is that th= e > DHCP policy has been detected. If the policy is not DHCP during the syst= em > boot, I think your concern will not appear. Are you saying the IP4 interface will not come "up" even for a static IP po= licy? I was assuming it would in this case. I'm not sure how big a deal t= his is because if there are no listeners or connections initiated it's kind= of a don't-care - I think the only difference would be whether responses t= o ARP are provided. > Now, compared to old Ip4Config behavior, we take 'ifconfig' tool command > as example - "ifconfig -s eth0 dhcp": > The Ip4Config->Start will be invoked to start the auto configuration. It = was > implemented in the deprecated driver -- Ip4ConfigDxe. When the system > boot next time, the previous IP configuration will cleaned and the interf= ace > will be in UN-CONFIG status again. Current implementation don't have thi= s > clean-up operation no matter Static/DHCP policy has been set. Is this the > difference you mentioned? Okay - this must be it - so DHCP magically turned back into "unconfigured" = effectively creating the on-demand Configure() effect, at least for DHCP ca= ses, that we now desire. Interesting. > Now, let us consider your requirement: > 1) The IP config information stored in NVRAM > 2) A separate policy to delay the IP interface coming up until a componen= t > calls Configure (). > > #1 is also the current implementation. For 2), I remember you have one > patch to do this implementation, can you share it to us for better > understanding? Yes, my first thought was to make the handling of Ip4Config2OnDhcp4SbInstal= led conditional based on a PCD value (the policy in this case, would be in = the PCD value). Based on the limited experiment I did this seems to have t= he desired effect but based on your expertise perhaps there is a better loc= ation for such a check? Thank you for patiently helping me with this - it's been enlightening to le= arn the history and thinking behind the config process. Eugene