* [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts
@ 2018-11-20 10:39 Vijayenthiran Subramaniam
2018-11-20 11:10 ` Udit Kumar
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Vijayenthiran Subramaniam @ 2018-11-20 10:39 UTC (permalink / raw)
To: edk2-devel, siyuan.fu, jiaxin.wu; +Cc: Vijayenthiran Subramaniam
Add debug messages for failed attempts to write to a variable.
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
---
NetworkPkg/IScsiDxe/IScsiMisc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c
index dd0d32dcda16..46760d79a8f3 100644
--- a/NetworkPkg/IScsiDxe/IScsiMisc.c
+++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
@@ -845,6 +845,8 @@ IScsiCreateAttempts (
);
FreePool (AttemptConfigOrder);
if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n",
+ __FUNCTION__, Status));
return Status;
}
@@ -887,6 +889,8 @@ IScsiCreateAttempts (
);
FreePool (AttemptConfigData);
if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n",
+ __FUNCTION__, Status));
return Status;
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts
2018-11-20 10:39 [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts Vijayenthiran Subramaniam
@ 2018-11-20 11:10 ` Udit Kumar
2018-11-20 11:14 ` Laszlo Ersek
2018-11-21 0:28 ` Fu, Siyuan
2 siblings, 0 replies; 4+ messages in thread
From: Udit Kumar @ 2018-11-20 11:10 UTC (permalink / raw)
To: Vijayenthiran Subramaniam, edk2-devel@lists.01.org,
siyuan.fu@intel.com, jiaxin.wu@intel.com
> -----Original Message-----
> From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of
> Vijayenthiran Subramaniam
> Sent: Tuesday, November 20, 2018 4:10 PM
> To: edk2-devel@lists.01.org; siyuan.fu@intel.com; jiaxin.wu@intel.com
> Cc: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
> Subject: [edk2] [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed
> SetVariable attempts
>
> Add debug messages for failed attempts to write to a variable.
>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Vijayenthiran Subramaniam
> <vijayenthiran.subramaniam@arm.com>
> ---
> NetworkPkg/IScsiDxe/IScsiMisc.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c
> index dd0d32dcda16..46760d79a8f3 100644
> --- a/NetworkPkg/IScsiDxe/IScsiMisc.c
> +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
> @@ -845,6 +845,8 @@ IScsiCreateAttempts (
> );
> FreePool (AttemptConfigOrder);
> if (EFI_ERROR (Status)) {
> + DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n",
> + __FUNCTION__, Status));
> return Status;
> }
>
> @@ -887,6 +889,8 @@ IScsiCreateAttempts (
> );
> FreePool (AttemptConfigData);
> if (EFI_ERROR (Status)) {
> + DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n",
> + __FUNCTION__, Status));
> return Status;
> }
> }
Since you are printing, same text for both failure , how will you decide which SetVariable is failed
You can choose to have different text or __LINE__ should help
> --
> 2.17.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.01
> .org%2Fmailman%2Flistinfo%2Fedk2-
> devel&data=02%7C01%7Cudit.kumar%40nxp.com%7C5faa1c1f546046d1f1
> a708d64ed7ff20%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C6367
> 83086961408415&sdata=RZdmCRaq8x0ps9gu13YAoWf8lsGS9zH2fAdnDLbP
> 3rE%3D&reserved=0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts
2018-11-20 10:39 [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts Vijayenthiran Subramaniam
2018-11-20 11:10 ` Udit Kumar
@ 2018-11-20 11:14 ` Laszlo Ersek
2018-11-21 0:28 ` Fu, Siyuan
2 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2018-11-20 11:14 UTC (permalink / raw)
To: Vijayenthiran Subramaniam, edk2-devel, siyuan.fu, jiaxin.wu
On 11/20/18 11:39, Vijayenthiran Subramaniam wrote:
> Add debug messages for failed attempts to write to a variable.
>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
> ---
> NetworkPkg/IScsiDxe/IScsiMisc.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c
> index dd0d32dcda16..46760d79a8f3 100644
> --- a/NetworkPkg/IScsiDxe/IScsiMisc.c
> +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
> @@ -845,6 +845,8 @@ IScsiCreateAttempts (
> );
> FreePool (AttemptConfigOrder);
> if (EFI_ERROR (Status)) {
> + DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n",
> + __FUNCTION__, Status));
> return Status;
> }
>
> @@ -887,6 +889,8 @@ IScsiCreateAttempts (
> );
> FreePool (AttemptConfigData);
> if (EFI_ERROR (Status)) {
> + DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n",
> + __FUNCTION__, Status));
> return Status;
> }
> }
>
I'll let Siyuan and Jiaxin decide whether these log messages should be
added or not. However, if we do add them, then we should distinguish
them better. Right now they look the same. I suggest logging the
variable namespace (or "vendor") GUID and the variable name as well.
Thanks
Laszlo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts
2018-11-20 10:39 [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts Vijayenthiran Subramaniam
2018-11-20 11:10 ` Udit Kumar
2018-11-20 11:14 ` Laszlo Ersek
@ 2018-11-21 0:28 ` Fu, Siyuan
2 siblings, 0 replies; 4+ messages in thread
From: Fu, Siyuan @ 2018-11-21 0:28 UTC (permalink / raw)
To: Vijayenthiran Subramaniam, edk2-devel@lists.01.org, Wu, Jiaxin
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
> -----Original Message-----
> From: Vijayenthiran Subramaniam [mailto:vijayenthiran.subramaniam@arm.com]
> Sent: Tuesday, November 20, 2018 6:40 PM
> To: edk2-devel@lists.01.org; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>
> Cc: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
> Subject: [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed
> SetVariable attempts
>
> Add debug messages for failed attempts to write to a variable.
>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Vijayenthiran Subramaniam
> <vijayenthiran.subramaniam@arm.com>
> ---
> NetworkPkg/IScsiDxe/IScsiMisc.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c
> b/NetworkPkg/IScsiDxe/IScsiMisc.c
> index dd0d32dcda16..46760d79a8f3 100644
> --- a/NetworkPkg/IScsiDxe/IScsiMisc.c
> +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
> @@ -845,6 +845,8 @@ IScsiCreateAttempts (
> );
> FreePool (AttemptConfigOrder);
> if (EFI_ERROR (Status)) {
> + DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n",
> + __FUNCTION__, Status));
> return Status;
> }
>
> @@ -887,6 +889,8 @@ IScsiCreateAttempts (
> );
> FreePool (AttemptConfigData);
> if (EFI_ERROR (Status)) {
> + DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n",
> + __FUNCTION__, Status));
> return Status;
> }
> }
> --
> 2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-21 0:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-20 10:39 [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts Vijayenthiran Subramaniam
2018-11-20 11:10 ` Udit Kumar
2018-11-20 11:14 ` Laszlo Ersek
2018-11-21 0:28 ` Fu, Siyuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox