From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3DEA7A09E4 for ; Fri, 29 Jan 2021 11:22:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F668240188; Fri, 29 Jan 2021 11:22:48 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 3B6EE40694; Fri, 29 Jan 2021 11:22:41 +0100 (CET) IronPort-SDR: TNsoI/KKwJf1f8eIBkVseYGnI8UDi2zOq1B50M6OiQLyhsxN5uzeuRPrBaAnMP5yGzkkIEf8Vm wmzi2nojJPZQ== X-IronPort-AV: E=McAfee;i="6000,8403,9878"; a="244487235" X-IronPort-AV: E=Sophos;i="5.79,385,1602572400"; d="scan'208";a="244487235" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 02:22:39 -0800 IronPort-SDR: j/u/GkiNiIeKwgKt+cSwLkLJEZ0mKIs08dJfmITd3GyU7GkQ3ChDTpngx7Zmrl45loh30NC0nN ZeaIxrPCo6EQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,385,1602572400"; d="scan'208";a="579113292" Received: from silpixa00399952.ir.intel.com (HELO silpixa00399952.ger.corp.intel.com) ([10.237.222.38]) by fmsmga005.fm.intel.com with ESMTP; 29 Jan 2021 02:22:38 -0800 From: David Hunt To: dev@dpdk.org Cc: david.hunt@intel.com, stable@dpdk.org, Bruce Richardson Date: Fri, 29 Jan 2021 10:21:45 +0000 Message-Id: <20210129102149.24463-3-david.hunt@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210129102149.24463-1-david.hunt@intel.com> References: <20210121172201.22582-2-david.hunt@intel.com> <20210129102149.24463-1-david.hunt@intel.com> Subject: [dpdk-stable] [PATCH v5 2/6] power: make channel msg functions public X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Bruce Richardson Move the 2 public functions into rte_power_guest_channel.h Fixes: 210c383e247b ("power: packet format for vm power management") Fixes: cd0d5547e873 ("power: vm communication channels in guest") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Signed-off-by: David Hunt Acked-by: Anatoly Burakov --- changes in v3 * Mark both added functions as experimental changes in v4 * add @internal tag for Doxygen * add @warning EXPERIMENTAL tag for Doxygen * improve description of lcore param changes in v5 * moved version.map additions from patch 3 to patch 2 --- lib/librte_power/guest_channel.h | 40 +---------------- lib/librte_power/rte_power_guest_channel.h | 50 ++++++++++++++++++++++ lib/librte_power/version.map | 4 ++ 3 files changed, 55 insertions(+), 39 deletions(-) diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h index d3d87f0ae..69020b030 100644 --- a/lib/librte_power/guest_channel.h +++ b/lib/librte_power/guest_channel.h @@ -65,21 +65,7 @@ void guest_channel_host_disconnect(unsigned int lcore_id); */ int guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id); -/** - * Send a message contained in pkt over the Virtio-Serial to the host endpoint. - * - * @param pkt - * Pointer to a populated struct channel_packet - * - * @param lcore_id - * lcore_id. - * - * @return - * - 0 on success. - * - Negative on error. - */ -int rte_power_guest_channel_send_msg(struct channel_packet *pkt, - unsigned int lcore_id); + /** * Read a message contained in pkt over the Virtio-Serial @@ -103,30 +89,6 @@ int power_guest_channel_read_msg(void *pkt, size_t pkt_len, unsigned int lcore_id); -/** - * Receive a message contained in pkt over the Virtio-Serial - * from the host endpoint. - * - * @param pkt - * Pointer to channel_packet or - * channel_packet_freq_list struct. - * - * @param pkt_len - * Size of expected data packet. - * - * @param lcore_id - * lcore_id. - * - * @return - * - 0 on success. - * - Negative on error. - */ -__rte_experimental -int -rte_power_guest_channel_receive_msg(void *pkt, - size_t pkt_len, - unsigned int lcore_id); - #ifdef __cplusplus } diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h index ef3b064a8..c500c0cda 100644 --- a/lib/librte_power/rte_power_guest_channel.h +++ b/lib/librte_power/rte_power_guest_channel.h @@ -116,6 +116,56 @@ struct channel_packet_caps_list { uint8_t num_vcpu; }; +/** + * @internal + * + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. + * + * Send a message contained in pkt over the Virtio-Serial to the host endpoint. + * + * @param pkt + * Pointer to a populated struct channel_packet. + * + * @param lcore_id + * Use channel specific to this lcore_id. + * + * @return + * - 0 on success. + * - Negative on error. + */ +__rte_experimental +int rte_power_guest_channel_send_msg(struct channel_packet *pkt, + unsigned int lcore_id); + +/** + * @internal + * + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. + * + * Receive a message contained in pkt over the Virtio-Serial + * from the host endpoint. + * + * @param pkt + * Pointer to channel_packet or + * channel_packet_freq_list struct. + * + * @param pkt_len + * Size of expected data packet. + * + * @param lcore_id + * Use channel specific to this lcore_id. + * + * @return + * - 0 on success. + * - Negative on error. + */ +__rte_experimental +int rte_power_guest_channel_receive_msg(void *pkt, + size_t pkt_len, + unsigned int lcore_id); + #ifdef __cplusplus } diff --git a/lib/librte_power/version.map b/lib/librte_power/version.map index 69ca9af61..13f0af3b2 100644 --- a/lib/librte_power/version.map +++ b/lib/librte_power/version.map @@ -34,4 +34,8 @@ EXPERIMENTAL { rte_power_guest_channel_receive_msg; rte_power_poll_stat_fetch; rte_power_poll_stat_update; + + # added in 21.02 + rte_power_guest_channel_receive_msg; + rte_power_guest_channel_send_msg; }; -- 2.17.1