* [Patch v3 1/3] NetworkPkg/IScsiDxe: Fix the incorrect/needless DHCP process.
2017-10-18 6:53 [Patch v3 0/3] NetworkPkg/IScsiDxe: Display InitiatorInfo correctly Jiaxin Wu
@ 2017-10-18 6:53 ` Jiaxin Wu
2017-10-18 6:53 ` [Patch v3 2/3] NetworkPkg/IScsiDxe: Clean the previous ConfigData when switching the IP mode Jiaxin Wu
2017-10-18 6:53 ` [Patch v3 3/3] NetworkPkg/IScsiDxe: Display InitiatorInfo in attempt page even DHCP enabled Jiaxin Wu
2 siblings, 0 replies; 4+ messages in thread
From: Jiaxin Wu @ 2017-10-18 6:53 UTC (permalink / raw)
To: edk2-devel; +Cc: Karunakar P, Ye Ting, Fu Siyuan, Wu Jiaxin
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 <karunakarp@amiindia.co.in>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
NetworkPkg/IScsiDxe/IScsiMisc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c
index efd05cf..0a0a3f5 100644
--- a/NetworkPkg/IScsiDxe/IScsiMisc.c
+++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
@@ -1992,13 +1992,16 @@ IScsiGetConfigData (
AttemptTmp
);
continue;
}
- } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp && !AttemptTmp->ValidPath) {
+ } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp &&
+ !AttemptTmp->ValidPath &&
+ AttemptTmp->NicIndex == mPrivate->CurrentNic) {
//
- // Get DHCP information for already added, but failed, attempt.
+ // If the attempt associates with the current NIC, we can
+ // get DHCP information for already added, but failed, attempt.
//
AttemptTmp->DhcpSuccess = FALSE;
if (!mPrivate->Ipv6Flag && (AttemptTmp->SessionConfigData.IpMode == IP_MODE_IP4)) {
Status = IScsiDoDhcp (Private->Image, Private->Controller, AttemptTmp);
if (!EFI_ERROR (Status)) {
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Patch v3 2/3] NetworkPkg/IScsiDxe: Clean the previous ConfigData when switching the IP mode.
2017-10-18 6:53 [Patch v3 0/3] NetworkPkg/IScsiDxe: Display InitiatorInfo correctly Jiaxin Wu
2017-10-18 6:53 ` [Patch v3 1/3] NetworkPkg/IScsiDxe: Fix the incorrect/needless DHCP process Jiaxin Wu
@ 2017-10-18 6:53 ` Jiaxin Wu
2017-10-18 6:53 ` [Patch v3 3/3] NetworkPkg/IScsiDxe: Display InitiatorInfo in attempt page even DHCP enabled Jiaxin Wu
2 siblings, 0 replies; 4+ messages in thread
From: Jiaxin Wu @ 2017-10-18 6:53 UTC (permalink / raw)
To: edk2-devel; +Cc: Karunakar P, Ye Ting, Fu Siyuan, Wu Jiaxin
Cc: Karunakar P <karunakarp@amiindia.co.in>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
NetworkPkg/IScsiDxe/IScsiConfig.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiConfig.c
index 52e51d6..f20f590 100644
--- a/NetworkPkg/IScsiDxe/IScsiConfig.c
+++ b/NetworkPkg/IScsiDxe/IScsiConfig.c
@@ -3590,13 +3590,20 @@ IScsiFormCallback (
case KEY_IP_MODE:
switch (Value->u8) {
case IP_MODE_IP6:
case IP_MODE_IP4:
+ ZeroMem (IfrNvData->LocalIp, sizeof (IfrNvData->LocalIp));
+ ZeroMem (IfrNvData->SubnetMask, sizeof (IfrNvData->SubnetMask));
+ ZeroMem (IfrNvData->Gateway, sizeof (IfrNvData->Gateway));
ZeroMem (IfrNvData->TargetIp, sizeof (IfrNvData->TargetIp));
Private->Current->AutoConfigureMode = 0;
-
+ ZeroMem (&Private->Current->SessionConfigData.LocalIp, sizeof (EFI_IP_ADDRESS));
+ ZeroMem (&Private->Current->SessionConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
+ ZeroMem (&Private->Current->SessionConfigData.Gateway, sizeof (EFI_IP_ADDRESS));
+ ZeroMem (&Private->Current->SessionConfigData.TargetIp, sizeof (EFI_IP_ADDRESS));
+
break;
}
break;
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Patch v3 3/3] NetworkPkg/IScsiDxe: Display InitiatorInfo in attempt page even DHCP enabled.
2017-10-18 6:53 [Patch v3 0/3] NetworkPkg/IScsiDxe: Display InitiatorInfo correctly Jiaxin Wu
2017-10-18 6:53 ` [Patch v3 1/3] NetworkPkg/IScsiDxe: Fix the incorrect/needless DHCP process Jiaxin Wu
2017-10-18 6:53 ` [Patch v3 2/3] NetworkPkg/IScsiDxe: Clean the previous ConfigData when switching the IP mode Jiaxin Wu
@ 2017-10-18 6:53 ` Jiaxin Wu
2 siblings, 0 replies; 4+ messages in thread
From: Jiaxin Wu @ 2017-10-18 6:53 UTC (permalink / raw)
To: edk2-devel; +Cc: Karunakar P, Ye Ting, Fu Siyuan, Wu Jiaxin
Cc: Karunakar P <karunakarp@amiindia.co.in>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr b/NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr
index d401419..35e8f9a 100644
--- a/NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr
+++ b/NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr
@@ -189,13 +189,14 @@ formset
flags = INTERACTIVE,
key = KEY_DHCP_ENABLE,
endcheckbox;
endif;
- suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01 OR
- ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_IP6 OR
+ suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_IP6 OR
ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
+
+ grayoutif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01;
string varid = ISCSI_CONFIG_IFR_NVDATA.LocalIp,
prompt = STRING_TOKEN(STR_ISCSI_LOCAL_IP_ADDRESS),
help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
flags = INTERACTIVE,
key = KEY_LOCAL_IP,
@@ -218,10 +219,11 @@ formset
flags = INTERACTIVE,
key = KEY_GATE_WAY,
minsize = IP4_MIN_SIZE,
maxsize = IP4_MAX_SIZE,
endstring;
+ endif;
endif;
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
subtitle text = STRING_TOKEN(STR_NULL);
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 4+ messages in thread