From nobody Thu Dec 26 00:32:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1508137097323741.5616828011748; Sun, 15 Oct 2017 23:58:17 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3632B202E6160; Sun, 15 Oct 2017 23:54:41 -0700 (PDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 9512C202E60E2 for ; Sun, 15 Oct 2017 23:54:39 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2017 23:58:14 -0700 Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.176]) by orsmga002.jf.intel.com with ESMTP; 15 Oct 2017 23:58:12 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,385,1503385200"; d="scan'208";a="146881597" From: Jiaxin Wu To: edk2-devel@lists.01.org Date: Mon, 16 Oct 2017 14:58:08 +0800 Message-Id: <1508137089-17480-2-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1508137089-17480-1-git-send-email-jiaxin.wu@intel.com> References: <1508137089-17480-1-git-send-email-jiaxin.wu@intel.com> Subject: [edk2] [Patch v2 1/2] NetworkPkg/IScsiDxe: Fix the incorrect/needless DHCP process. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Karunakar P , Ye Ting , Fu Siyuan , Wu Jiaxin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The existing attempt should not trigger the DHCP process if it doesn't associates with the current NIC. That's incorrect when displaying the initiator info in attempt page. Cc: Karunakar P Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/IScsiDxe/IScsiMisc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMis= c.c index efd05cf..0a0a3f5 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.c +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c @@ -1992,13 +1992,16 @@ IScsiGetConfigData ( AttemptTmp ); =20 continue; } - } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp && !A= ttemptTmp->ValidPath) { + } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp &&=20 + !AttemptTmp->ValidPath &&=20 + AttemptTmp->NicIndex =3D=3D mPrivate->CurrentNic) { // - // Get DHCP information for already added, but failed, attempt. + // If the attempt associates with the current NIC, we can=20 + // get DHCP information for already added, but failed, attempt. // AttemptTmp->DhcpSuccess =3D FALSE; if (!mPrivate->Ipv6Flag && (AttemptTmp->SessionConfigData.IpMode = =3D=3D IP_MODE_IP4)) { Status =3D IScsiDoDhcp (Private->Image, Private->Controller, Att= emptTmp); if (!EFI_ERROR (Status)) { --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel