public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
@ 2022-01-19  6:12 wenyi,xie
  2022-01-19  6:12 ` [PATCH EDK2 v1 1/1] " wenyi,xie
  2022-01-19  7:29 ` [PATCH EDK2 v1 0/1] " Abner Chang
  0 siblings, 2 replies; 7+ messages in thread
From: wenyi,xie @ 2022-01-19  6:12 UTC (permalink / raw)
  To: devel, abner.chang, nickle.wang; +Cc: songdongkuang, xiewenyi2

Main Changes :
1.Remove redundant if statement.

Wenyi Xie (1):
  RedfishPkg/RedfishRestExDxe:Simplify status check

 RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 38 +++++++++-----------
 1 file changed, 17 insertions(+), 21 deletions(-)

-- 
2.20.1.windows.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH EDK2 v1 1/1] RedfishPkg/RedfishRestExDxe:Simplify status check
  2022-01-19  6:12 [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check wenyi,xie
@ 2022-01-19  6:12 ` wenyi,xie
  2022-01-19  7:29 ` [PATCH EDK2 v1 0/1] " Abner Chang
  1 sibling, 0 replies; 7+ messages in thread
From: wenyi,xie @ 2022-01-19  6:12 UTC (permalink / raw)
  To: devel, abner.chang, nickle.wang; +Cc: songdongkuang, xiewenyi2

Remove redundant determine statements.
No functional change.

Cc: Abner Chang <abner.chang@hpe.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
---
 RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 38 +++++++++-----------
 1 file changed, 17 insertions(+), 21 deletions(-)

diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c b/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c
index eb1d8b8fa236..ba0a42097b92 100644
--- a/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c
+++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c
@@ -44,7 +44,7 @@ ResetHttpTslSession (
 }
 
 /**
-  This function check
+  This function check Http receive status
 
   @param[in]  Instance             Pointer to EFI_REST_EX_PROTOCOL instance for a particular
                                    REST service.
@@ -67,37 +67,33 @@ RedfishCheckHttpReceiveStatus (
 
   if (!EFI_ERROR (HttpIoReceiveStatus)) {
     ReturnStatus = EFI_SUCCESS;
-  } else if (EFI_ERROR (HttpIoReceiveStatus) && (HttpIoReceiveStatus != EFI_CONNECTION_FIN)) {
+  } else if (HttpIoReceiveStatus != EFI_CONNECTION_FIN) {
     if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY) == 0) {
       DEBUG ((DEBUG_ERROR, "%a: TCP error, reset HTTP session.\n", __FUNCTION__));
       Instance->Flags |= RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY;
       gBS->Stall (500);
       Status = ResetHttpTslSession (Instance);
-      if (EFI_ERROR (Status)) {
-        DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__));
-        ReturnStatus = EFI_DEVICE_ERROR;
-      } else {
+      if (!EFI_ERROR (Status)) {
         return EFI_NOT_READY;
       }
-    } else {
-      ReturnStatus = EFI_DEVICE_ERROR;
+      DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__));
     }
+
+    ReturnStatus = EFI_DEVICE_ERROR;
   } else {
-    if (HttpIoReceiveStatus == EFI_CONNECTION_FIN) {
-      if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TLS_RETRY) != 0) {
-        DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a new TLS session.\n", __FUNCTION__));
-        ReturnStatus = EFI_DEVICE_ERROR;
-      }
-
-      Instance->Flags |= RESTEX_INSTANCE_FLAGS_TLS_RETRY;
-      Status           = ResetHttpTslSession (Instance);
-      if (EFI_ERROR (Status)) {
-        DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__));
-        ReturnStatus = EFI_DEVICE_ERROR;
-      }
+    if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TLS_RETRY) != 0) {
+      DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a new TLS session.\n", __FUNCTION__));
+      ReturnStatus = EFI_DEVICE_ERROR;
+    }
 
-      return EFI_NOT_READY;
+    Instance->Flags |= RESTEX_INSTANCE_FLAGS_TLS_RETRY;
+    Status           = ResetHttpTslSession (Instance);
+    if (EFI_ERROR (Status)) {
+      DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__));
+      ReturnStatus = EFI_DEVICE_ERROR;
     }
+
+    return EFI_NOT_READY;
   }
 
   //
-- 
2.20.1.windows.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
  2022-01-19  6:12 [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check wenyi,xie
  2022-01-19  6:12 ` [PATCH EDK2 v1 1/1] " wenyi,xie
@ 2022-01-19  7:29 ` Abner Chang
  2022-01-19  7:39   ` wenyi,xie
  1 sibling, 1 reply; 7+ messages in thread
From: Abner Chang @ 2022-01-19  7:29 UTC (permalink / raw)
  To: Wenyi Xie, devel@edk2.groups.io, Wang, Nickle (Server BIOS)
  Cc: songdongkuang@huawei.com

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

Hi Wenyi,
May I know what is the problem you encountered and what environment causes the issue? Is that under edk2 emulation or the real Redfish service?

Thanks
Abner
________________________________
From: Wenyi Xie <xiewenyi2@huawei.com>
Sent: Wednesday, January 19, 2022 2:12 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Wang, Nickle (Server BIOS) <nickle.wang@hpe.com>
Cc: songdongkuang@huawei.com <songdongkuang@huawei.com>; xiewenyi2@huawei.com <xiewenyi2@huawei.com>
Subject: [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check

Main Changes :
1.Remove redundant if statement.

Wenyi Xie (1):
  RedfishPkg/RedfishRestExDxe:Simplify status check

 RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 38 +++++++++-----------
 1 file changed, 17 insertions(+), 21 deletions(-)

--
2.20.1.windows.1


[-- Attachment #2: Type: text/html, Size: 2356 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
  2022-01-19  7:29 ` [PATCH EDK2 v1 0/1] " Abner Chang
@ 2022-01-19  7:39   ` wenyi,xie
  2022-01-20  2:30     ` Abner Chang
  0 siblings, 1 reply; 7+ messages in thread
From: wenyi,xie @ 2022-01-19  7:39 UTC (permalink / raw)
  To: Chang, Abner (HPS SW/FW Technologist), devel@edk2.groups.io,
	Wang, Nickle (Server BIOS)
  Cc: songdongkuang@huawei.com



On 2022/1/19 15:29, Chang, Abner (HPS SW/FW Technologist) wrote:
> Hi Wenyi,
> May I know what is the problem you encountered and what environment causes the issue? Is that under edk2 emulation or the real Redfish service?
> 
Hi Abner,
I didn't encounter any issue and there's no functional change in this patch, just try to simplify the code. Please review whether it's OK or not.

Thanks
Wenyi
> Thanks
> Abner
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From:* Wenyi Xie <xiewenyi2@huawei.com>
> *Sent:* Wednesday, January 19, 2022 2:12 PM
> *To:* devel@edk2.groups.io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Wang, Nickle (Server BIOS) <nickle.wang@hpe.com>
> *Cc:* songdongkuang@huawei.com <songdongkuang@huawei.com>; xiewenyi2@huawei.com <xiewenyi2@huawei.com>
> *Subject:* [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
>  
> Main Changes :
> 1.Remove redundant if statement.
> 
> Wenyi Xie (1):
>   RedfishPkg/RedfishRestExDxe:Simplify status check
> 
>  RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 38 +++++++++-----------
>  1 file changed, 17 insertions(+), 21 deletions(-)
> 
> -- 
> 2.20.1.windows.1
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
  2022-01-19  7:39   ` wenyi,xie
@ 2022-01-20  2:30     ` Abner Chang
  2022-01-20 12:01       ` wenyi,xie
  0 siblings, 1 reply; 7+ messages in thread
From: Abner Chang @ 2022-01-20  2:30 UTC (permalink / raw)
  To: xiewenyi (A), devel@edk2.groups.io, Wang, Nickle (Server BIOS)
  Cc: songdongkuang@huawei.com

[-- Attachment #1: Type: text/plain, Size: 2829 bytes --]

Hi Wenyi,
Could you please create PR for this change? So we can have core CI on this patch and I can also merge this patch later when the core CI is finished successfully.
Just send me the link to PR once you create it.

Thanks
Abner
________________________________
From: xiewenyi (A) <xiewenyi2@huawei.com>
Sent: Wednesday, January 19, 2022 3:39 PM
To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; devel@edk2.groups.io <devel@edk2.groups.io>; Wang, Nickle (Server BIOS) <nickle.wang@hpe.com>
Cc: songdongkuang@huawei.com <songdongkuang@huawei.com>
Subject: Re: [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check



On 2022/1/19 15:29, Chang, Abner (HPS SW/FW Technologist) wrote:
> Hi Wenyi,
> May I know what is the problem you encountered and what environment causes the issue? Is that under edk2 emulation or the real Redfish service?
>
Hi Abner,
I didn't encounter any issue and there's no functional change in this patch, just try to simplify the code. Please review whether it's OK or not.

Thanks
Wenyi
> Thanks
> Abner
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From:* Wenyi Xie <xiewenyi2@huawei.com>
> *Sent:* Wednesday, January 19, 2022 2:12 PM
> *To:* devel@edk2.groups.io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Wang, Nickle (Server BIOS) <nickle.wang@hpe.com>
> *Cc:* songdongkuang@huawei.com <songdongkuang@huawei.com>; xiewenyi2@huawei.com <xiewenyi2@huawei.com>
> *Subject:* [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
>
> Main Changes :
> 1.Remove redundant if statement.
>
> Wenyi Xie (1):
>   RedfishPkg/RedfishRestExDxe:Simplify status check
>
>  RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 38 +++++++++-----------
>  1 file changed, 17 insertions(+), 21 deletions(-)
>
> --
> 2.20.1.windows.1
>

[-- Attachment #2: Type: text/html, Size: 4617 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
  2022-01-20  2:30     ` Abner Chang
@ 2022-01-20 12:01       ` wenyi,xie
  2022-01-20 13:37         ` [edk2-devel] " Abner Chang
  0 siblings, 1 reply; 7+ messages in thread
From: wenyi,xie @ 2022-01-20 12:01 UTC (permalink / raw)
  To: Chang, Abner (HPS SW/FW Technologist), devel@edk2.groups.io,
	Wang, Nickle (Server BIOS)
  Cc: songdongkuang@huawei.com



On 2022/1/20 10:30, Chang, Abner (HPS SW/FW Technologist) wrote:
> Hi Wenyi,
> Could you please create PR for this change? So we can have core CI on this patch and I can also merge this patch later when the core CI is finished successfully.
> Just send me the link to PR once you create it.
> 

Sure, here's the link.
https://github.com/tianocore/edk2/pull/2429

Thanks
Wenyi

> Thanks
> Abner
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From:* xiewenyi (A) <xiewenyi2@huawei.com>
> *Sent:* Wednesday, January 19, 2022 3:39 PM
> *To:* Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; devel@edk2.groups.io <devel@edk2.groups.io>; Wang, Nickle (Server BIOS) <nickle.wang@hpe.com>
> *Cc:* songdongkuang@huawei.com <songdongkuang@huawei.com>
> *Subject:* Re: [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
>  
> 
> 
> On 2022/1/19 15:29, Chang, Abner (HPS SW/FW Technologist) wrote:
>> Hi Wenyi,
>> May I know what is the problem you encountered and what environment causes the issue? Is that under edk2 emulation or the real Redfish service?
>> 
> Hi Abner,
> I didn't encounter any issue and there's no functional change in this patch, just try to simplify the code. Please review whether it's OK or not.
> 
> Thanks
> Wenyi
>> Thanks
>> Abner
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> *From:* Wenyi Xie <xiewenyi2@huawei.com>
>> *Sent:* Wednesday, January 19, 2022 2:12 PM
>> *To:* devel@edk2.groups.io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Wang, Nickle (Server BIOS) <nickle.wang@hpe.com>
>> *Cc:* songdongkuang@huawei.com <songdongkuang@huawei.com>; xiewenyi2@huawei.com <xiewenyi2@huawei.com>
>> *Subject:* [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
>>  
>> Main Changes :
>> 1.Remove redundant if statement.
>> 
>> Wenyi Xie (1):
>>   RedfishPkg/RedfishRestExDxe:Simplify status check
>> 
>>  RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 38 +++++++++-----------
>>  1 file changed, 17 insertions(+), 21 deletions(-)
>> 
>> -- 
>> 2.20.1.windows.1
>> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [edk2-devel] [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
  2022-01-20 12:01       ` wenyi,xie
@ 2022-01-20 13:37         ` Abner Chang
  0 siblings, 0 replies; 7+ messages in thread
From: Abner Chang @ 2022-01-20 13:37 UTC (permalink / raw)
  To: wenyi, xie, devel

[-- Attachment #1: Type: text/plain, Size: 44 bytes --]

Merged.
Thanks to helping on this.
Abner

[-- Attachment #2: Type: text/html, Size: 52 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-20 13:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-19  6:12 [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check wenyi,xie
2022-01-19  6:12 ` [PATCH EDK2 v1 1/1] " wenyi,xie
2022-01-19  7:29 ` [PATCH EDK2 v1 0/1] " Abner Chang
2022-01-19  7:39   ` wenyi,xie
2022-01-20  2:30     ` Abner Chang
2022-01-20 12:01       ` wenyi,xie
2022-01-20 13:37         ` [edk2-devel] " Abner Chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox