Logging error in case of invalid command is enough in my opinion. In this case we distinguish between invalid command (log error) and unsuccessful power operation (NAK cmd). I agree though that error log might be more precise (separate for error during sending ACK/NAK and separate for invalid command).
Best Regards, Marcin -----Original Message----- From: Pattan, Reshma Sent: Friday, March 15, 2019 6:14 PM To: Hajkowski, MarcinX <marcinx.hajkow...@intel.com>; Hunt, David <david.h...@intel.com> Cc: dev@dpdk.org; Hajkowski, MarcinX <marcinx.hajkow...@intel.com> Subject: RE: [dpdk-dev] [PATCH 4/4] power: send confirmation cmd to vm guest > -----Original Message----- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Hajkowski > + int ret = -1; > + if (valid_unit) > + ret = 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 applicable for valid_unit == false also. Also do we need to handle valid_unit ==false case? Do we need to send back message to guest saying invalid command. Thanks, Reshma