From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 131C92C60 for ; Mon, 18 Mar 2019 13:40:56 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Mar 2019 05:40:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,493,1544515200"; d="scan'208";a="329626813" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga005.fm.intel.com with ESMTP; 18 Mar 2019 05:40:55 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.56]) by IRSMSX106.ger.corp.intel.com ([169.254.8.205]) with mapi id 14.03.0415.000; Mon, 18 Mar 2019 12:40:52 +0000 From: "Hajkowski, MarcinX" To: "Pattan, Reshma" , "Hunt, David" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 4/4] power: send confirmation cmd to vm guest Thread-Index: AQHU2nWMl8BBuTuTzEmucUn2n7FBoKYM8AeAgARoQ7A= Date: Mon, 18 Mar 2019 12:40:52 +0000 Message-ID: <7AE8A440E9E11A43ABE083B4E74B60F9442A9B@IRSMSX104.ger.corp.intel.com> References: <20190314144752.13812-1-marcinx.hajkowski@intel.com> <20190314144752.13812-5-marcinx.hajkowski@intel.com> <3AEA2BF9852C6F48A459DA490692831F2A42E3C4@irsmsx110.ger.corp.intel.com> In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F2A42E3C4@irsmsx110.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmU0YmI1MWMtNTk2ZC00Zjc2LTk2OWMtOTE5NTZhNGNiMThjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC9saDU4QjM5TG5obFJkMzZIQ1N0MzB3ek9kVXVHMXFhaTI0RkFwQTBZUkdDdE13b1R6ODZPbVM0VTFpdG0zekoifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 4/4] power: send confirmation cmd to vm guest X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Mar 2019 12:40:57 -0000 Logging error in case of invalid command is enough in my opinion. In this = case we distinguish between invalid command (log error) and unsuccessful po= wer operation (NAK cmd).=20 I agree though that error log might be more precise (separate for error dur= ing sending ACK/NAK and separate for invalid command). Best Regards, Marcin -----Original Message----- From: Pattan, Reshma=20 Sent: Friday, March 15, 2019 6:14 PM To: Hajkowski, MarcinX ; Hunt, David Cc: dev@dpdk.org; Hajkowski, MarcinX Subject: RE: [dpdk-dev] [PATCH 4/4] power: send confirmation cmd to vm gues= t > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Hajkowski > + int ret =3D -1; > + if (valid_unit) > + ret =3D send_ack_for_received_cmd(pkt, > + chan_info, > + scale_res ? > CPU_POWER_CMD_ACK : CPU_POWER_CMD_NAK); > + if (ret < 0) > + RTE_LOG(DEBUG, CHANNEL_MONITOR, "Error during > sending ack command " > + "or unexpected unit type.\n"); > + > } This if check should go inside for if(valid_unit)?, otherwise this would a= pplicable for valid_unit =3D=3D false also. Also do we need to handle valid_unit =3D=3Dfalse case? Do we need to send b= ack message to guest saying invalid command. Thanks, Reshma From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A400CA05FE for ; Mon, 18 Mar 2019 13:40:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7BBA4378B; Mon, 18 Mar 2019 13:40:58 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 131C92C60 for ; Mon, 18 Mar 2019 13:40:56 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Mar 2019 05:40:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,493,1544515200"; d="scan'208";a="329626813" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga005.fm.intel.com with ESMTP; 18 Mar 2019 05:40:55 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.56]) by IRSMSX106.ger.corp.intel.com ([169.254.8.205]) with mapi id 14.03.0415.000; Mon, 18 Mar 2019 12:40:52 +0000 From: "Hajkowski, MarcinX" To: "Pattan, Reshma" , "Hunt, David" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 4/4] power: send confirmation cmd to vm guest Thread-Index: AQHU2nWMl8BBuTuTzEmucUn2n7FBoKYM8AeAgARoQ7A= Date: Mon, 18 Mar 2019 12:40:52 +0000 Message-ID: <7AE8A440E9E11A43ABE083B4E74B60F9442A9B@IRSMSX104.ger.corp.intel.com> References: <20190314144752.13812-1-marcinx.hajkowski@intel.com> <20190314144752.13812-5-marcinx.hajkowski@intel.com> <3AEA2BF9852C6F48A459DA490692831F2A42E3C4@irsmsx110.ger.corp.intel.com> In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F2A42E3C4@irsmsx110.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmU0YmI1MWMtNTk2ZC00Zjc2LTk2OWMtOTE5NTZhNGNiMThjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC9saDU4QjM5TG5obFJkMzZIQ1N0MzB3ek9kVXVHMXFhaTI0RkFwQTBZUkdDdE13b1R6ODZPbVM0VTFpdG0zekoifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 4/4] power: send confirmation cmd to vm guest X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190318124052.TkHdeHxOHI8EMDf3j963gTWfSL8q1M6WQA_jYAx5i_g@z> Logging error in case of invalid command is enough in my opinion. In this = case we distinguish between invalid command (log error) and unsuccessful po= wer operation (NAK cmd).=20 I agree though that error log might be more precise (separate for error dur= ing sending ACK/NAK and separate for invalid command). Best Regards, Marcin -----Original Message----- From: Pattan, Reshma=20 Sent: Friday, March 15, 2019 6:14 PM To: Hajkowski, MarcinX ; Hunt, David Cc: dev@dpdk.org; Hajkowski, MarcinX Subject: RE: [dpdk-dev] [PATCH 4/4] power: send confirmation cmd to vm gues= t > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Hajkowski > + int ret =3D -1; > + if (valid_unit) > + ret =3D send_ack_for_received_cmd(pkt, > + chan_info, > + scale_res ? > CPU_POWER_CMD_ACK : CPU_POWER_CMD_NAK); > + if (ret < 0) > + RTE_LOG(DEBUG, CHANNEL_MONITOR, "Error during > sending ack command " > + "or unexpected unit type.\n"); > + > } This if check should go inside for if(valid_unit)?, otherwise this would a= pplicable for valid_unit =3D=3D false also. Also do we need to handle valid_unit =3D=3Dfalse case? Do we need to send b= ack message to guest saying invalid command. Thanks, Reshma