From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.61]) by mx.groups.io with SMTP id smtpd.web11.20253.1689343756421873211 for ; Fri, 14 Jul 2023 07:09:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=SJUQqhKz; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.244.61, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JKy8KlwTMFXOS2w3NdsAsImbOTrcUxaxqx0Y6Wf92lNjUwcVibne5gVOyc6NOuAEWwphUCKv+JacxtOckGvxLk34stFykVB2OymaIEdgLZSP3SXZXvMyEVyX3T13OwaNUWJ1VsdoHdxmAOMx11i8FRkcJn1TsUiGf2PHdJJva6q0dff6XfGCvj7yqU86U9wzZkHIS9yvZS6vSViXKbOlfraoVkUDXxXye7F/ldTc2ArOiOgq5kw0TF13+GD7RCew4GRdz+HOk4e/Xx79leO5qrioZdHLI5SrEd29fnUV8FrkiQ1vSMXLu4kVoSTp4sHSD1p1sdUc36LBUJVMqVKRnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S6k1xNgK4Vt957imoQrc/8NdEcumF6O1Tw2OqKCPbOo=; b=mkzuyNGROlHLsMVfUVmxMWe/T55xH8AIXD2qUMmjh1KwQBZotPnDXdM/jyAKT1uoWg4hsXD5jYzzbQk1yUkbwdPRGzxV96kt+w+6JSSsRNnAMMB2l2uGEehyydQFoAbZUlg+Lzv6GOJU7NohwZbIN4p90FDB4sscRi2LAkMYAoapvGvMAQWi8JCp+6HZJPqAmt5gO9sAw6LBwAzEdY0YF4dtpUSjlFj5XglVU8OBsY/B2nSFIO0+ZHO1W0D3QCSjDuxhuU6R/2tMB4dNUhIJApEpyrLuL4kCoWENWIyyKs2UCTDeWgBhaZ2T1F/bqo8raXn8FyGDR/eI/gU6g8c3xA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S6k1xNgK4Vt957imoQrc/8NdEcumF6O1Tw2OqKCPbOo=; b=SJUQqhKzWUZuMW/v3q/HZF4uBgFloOUoBM/hjYkYW1l8EIbuX2tTIsPvL8mb8Q1O08AVSuXn5D8ly9rtruCPxWOeKUhefzlOTsRQmKj1zfhk6G8M8Fg3nrtNhQhtNKDZit8sFJ1Rw7a9zgWfUXripPxwkYfXGF75e4cQTlIpGVU= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by DS0PR12MB8442.namprd12.prod.outlook.com (2603:10b6:8:125::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Fri, 14 Jul 2023 14:09:13 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::ecc:c669:56d7:5812]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::ecc:c669:56d7:5812%3]) with mapi id 15.20.6588.027; Fri, 14 Jul 2023 14:09:12 +0000 From: "Chang, Abner" To: Nickle Wang , "devel@edk2.groups.io" CC: Igor Kulchytskyy , Nick Ramirez Subject: Re: [PATCH] RedfishPkg/RedfishRestExDxe: reset session when TCP timeout happens Thread-Topic: [PATCH] RedfishPkg/RedfishRestExDxe: reset session when TCP timeout happens Thread-Index: AQHZtWvoUNRt7xNBi0KpL0A8E7D8pa+5TqXw Date: Fri, 14 Jul 2023 14:09:12 +0000 Message-ID: References: <20230713092446.14050-1-nicklew@nvidia.com> In-Reply-To: <20230713092446.14050-1-nicklew@nvidia.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=af92859d-84c8-4d85-b277-5484036ec660;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-07-14T14:09:03Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|DS0PR12MB8442:EE_ x-ms-office365-filtering-correlation-id: 522a770d-c717-4744-0f94-08db8473e662 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9F6imSlBbA7mAXdcOvTHGzgstaV9Fj6gHQVL0uhgdL4VXoJTTcuvKAoijQAkWEyqh7qM+5uZstgPul/q94soXJ1+j7+ofBH4l9vO1VJ5QapO9a4QU5AUXvMeAr+dTsxopIfaJK162E+hnPePEougtN19LVgOcRfvLJr1opsttzEPLU/mrOvCZ5KKKa2bBd3u9j7TrJhi5QtD0Wd4QWRzUvFV66BS5lSVG3zao1wPlWHQFbEnVI/65fZCXk5quiRJu49B+8sWw8Q3m5/k78BjtR4R0oCgR6sQ3h9l+n/Y9rnzYXUF0jiJDv9Kn0AbbPR529J0bSagvPabimQ8fitSBUV1GxGOaRJ8mvCIcnQbxym5+MzVbglYP5RxXnj25O0SeUw6frNjIZE72aueSzIppgL4rnsO/sPiRHpInu6Ca3ETWB8sSlPr4D/IW4jAgMTyf1kp7UcZ08USMZseJvb616uEx8gTIlAU3o4NFxkAMPVSfEVEgcP9erl+hgfB28XruSk/tGWyErEjkd7aCs23d+HvnBPPRSq4v6/7MM6rgIFne7kKxitlyVpvCQvE9o12WZhB4PlUkufb484/4XYjZBf+hTM20h40EJWC1jZU2me/u5ehYC8cLX4T5+pjWEqJ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(6029001)(4636009)(366004)(39860400002)(346002)(136003)(376002)(396003)(451199021)(53546011)(66476007)(66946007)(122000001)(38070700005)(64756008)(38100700002)(2906002)(52536014)(5660300002)(86362001)(66556008)(66446008)(8936002)(8676002)(316002)(4326008)(41300700001)(76116006)(55016003)(83380400001)(26005)(6506007)(9686003)(186003)(7696005)(71200400001)(33656002)(110136005)(478600001)(54906003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9syK5AO65BEoVKMliA53Zq0Q1E4HRhlIOyFDqaQr4+gTbowmLXlrhTgylKyA?= =?us-ascii?Q?1V4SK2elxOqTQhsKqU49GtCceTnekfWUqJmV04eUPSabuXneZNM2m/uu6+03?= =?us-ascii?Q?/U6tK3X0hgzLpCaCF+ZWsmgoeseTTeqUlcdnRNfWROJCvy4moVKYzX1qg1lI?= =?us-ascii?Q?ru4DAZLOKTxuc9+t8U8U3Zx+TuCifyxvh9id7T5xYVXktEqPkZBIdvEsWmTB?= =?us-ascii?Q?p4oKK8V3g8T3lS2/iGNVnUybI2RtY3Pyrk/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2YH0TUVXRAcB1jREeg1xGZVinejwvXOQDoSr/Kh6jng19RuaCDh7sYI8fmy?= =?us-ascii?Q?6gWImCan5wcdhrpZAbI9FQrmpBQYtyK5UC7oFjUI+K/fMR/PL42I9spfjmXk?= =?us-ascii?Q?iVlAgC5mXWSG1t/774boDY5651JMhu37lCj/8CUmG2JuSdEPlvbjC50EsqUz?= =?us-ascii?Q?aIeD5LP6AHLXOZP4C/+hqX2zHj1azbHB4/TkjXmm7K3TkNmNcRBYO6rBAgH4?= =?us-ascii?Q?RwrShAkfh/11s01gpof3vX9gAhoUYVLPo5X4TzZeplpl5SsKqiZOgc0GteRy?= =?us-ascii?Q?C5AjwbNEW4tbBak7VZBd968u71Yz2iy8yQGGSn4dDxIs8VfbE2gNFpLHHu+x?= =?us-ascii?Q?gMpclR7cEyL+BS3PjRwaqp54sMUSLM1dpAm9zd6PvXKYcNt9BF4I7uMoYiux?= =?us-ascii?Q?WUdbqPOYaxSOoHgZ7s4=3D?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 522a770d-c717-4744-0f94-08db8473e662 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jul 2023 14:09:12.3942 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fsnLX7+W5DNJocJU4erv+ZgxlYyLB1sTCKBHIOxofEU3efbAZGXmzfuTCqXOkzhbUjvCipXw9YyTDfZeWC7Qnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8442 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Reviewed-by: Abner Chang > -----Original Message----- > From: Nickle Wang > Sent: Thursday, July 13, 2023 5:25 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Igor Kulchytskyy > ; Nick Ramirez > Subject: [PATCH] RedfishPkg/RedfishRestExDxe: reset session when TCP > timeout happens > > Caution: This message originated from an External Source. Use proper caut= ion > when opening attachments, clicking links, or responding. > > > Call ResetHttpTslSession() to reset HTTP session when TCP timeout > failure happens. So that application can perform retry to the same URI. > > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Igor Kulchytskyy > Cc: Nick Ramirez > --- > .../RedfishRestExDxe/RedfishRestExInternal.h | 14 ++++++++++++++ > RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 4 ++-- > .../RedfishRestExDxe/RedfishRestExProtocol.c | 4 ++++ > 3 files changed, 20 insertions(+), 2 deletions(-) > > diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExInternal.h > b/RedfishPkg/RedfishRestExDxe/RedfishRestExInternal.h > index bca679e2ccc4..c146f4a647cb 100644 > --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExInternal.h > +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExInternal.h > @@ -55,6 +55,20 @@ RedfishCheckHttpReceiveStatus ( > IN EFI_STATUS HttpIoReceiveStatus > ); > > +/** > + Create a new TLS session because the previous one is closed. > + > + @param[in] Instance Pointer to EFI_REST_EX_PROTOCOL instan= ce for > a particular > + REST service. > + @retval EFI_SUCCESS operation succeeded. > + @retval EFI_ERROR Other errors. > + > +**/ > +EFI_STATUS > +ResetHttpTslSession ( > + IN RESTEX_INSTANCE *Instance > + ); > + > /** > This function send the HTTP request without body to see > if the write to URL is permitted by Redfish service. This function > diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c > b/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c > index 838e24f7e7ef..b2961424de80 100644 > --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c > +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c > @@ -4,6 +4,7 @@ > Copyright (c) 2019, Intel Corporation. All rights reserved.
> (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> Copyright (c) 2023, American Megatrends International LLC. > + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights > reserved. > > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -12,8 +13,7 @@ > #include "RedfishRestExInternal.h" > > /** > - Create a new TLS session becuase the previous on is closed. > - status. > + Create a new TLS session because the previous one is closed. > > @param[in] Instance Pointer to EFI_REST_EX_PROTOCOL instan= ce for a > particular > REST service. > diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c > b/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c > index d8f2c73f8ef0..90973619f2bc 100644 > --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c > +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c > @@ -188,6 +188,10 @@ ReSendRequest:; > } > > if (EFI_ERROR (Status)) { > + // > + // Communication failure happens. Reset the session. > + // > + ResetHttpTslSession (Instance); > goto ON_EXIT; > } > > -- > 2.17.1