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 76F9641C40; Wed, 8 Feb 2023 14:32:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E05F42C54; Wed, 8 Feb 2023 14:32:35 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 8249C4014F for ; Wed, 8 Feb 2023 14:32:34 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 318989Ah031672; Wed, 8 Feb 2023 05:30:13 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=atvcjQ1u01IxB1AORl8BiIKZXYtD2TbEuxtenjc8UzI=; b=NK4cGaQXpbloHoJXn4hIgNY+jDWphxEGXD+archI3Qnr+D6aXIAii8OjAJwL+JIqOQ0O DLKyBliQUEyNSL3f24ZJpljn2csOvjjGpCfxnXVlGz4mblFtqLrGt3FX7K0GwVw+4lDb lA0W4g/XdKaTR8muOTIxJtULgC7VzNKyBxGwLkOdMbAX9sHqKGdGUfYCDpYzqQW5gx9w rlG14DloOxJ6I2mwDHiNsADgKzT6WUpPnY86JPyNhnIMt44yhGGzkoer5tdZEBDFNk4e db2t26Uol3mKbyFyuI9IAdGdHfxVWeAosqpIqEqsqryC+8vRnSj8WCGT0ZeC2w7fkyr/ oQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nm65ktkpd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 08 Feb 2023 05:30:12 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 8 Feb 2023 05:30:10 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Wed, 8 Feb 2023 05:30:10 -0800 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id 5C6DF3F7097; Wed, 8 Feb 2023 05:29:48 -0800 (PST) From: Ankur Dwivedi To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Ankur Dwivedi Subject: [PATCH v10 3/6] ethdev: add trace points for ethdev (part two) Date: Wed, 8 Feb 2023 18:58:21 +0530 Message-ID: <20230208132824.775985-4-adwivedi@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230208132824.775985-1-adwivedi@marvell.com> References: <20230207063254.401538-1-adwivedi@marvell.com> <20230208132824.775985-1-adwivedi@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: x2S5TVN4hTCue29a91todOqX8e1x-ZCX X-Proofpoint-ORIG-GUID: x2S5TVN4hTCue29a91todOqX8e1x-ZCX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-08_05,2023-02-08_02,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Adds trace points for remaining ethdev functions. Signed-off-by: Ankur Dwivedi Acked-by: Sunil Kumar Kori --- lib/ethdev/ethdev_trace.h | 875 +++++++++++++++++++++++++++++++ lib/ethdev/ethdev_trace_points.c | 252 +++++++++ lib/ethdev/rte_ethdev.c | 485 ++++++++++++++--- lib/ethdev/rte_ethdev_cman.c | 29 +- 4 files changed, 1559 insertions(+), 82 deletions(-) diff --git a/lib/ethdev/ethdev_trace.h b/lib/ethdev/ethdev_trace.h index d88ad60ec8..1a4b7c3a9b 100644 --- a/lib/ethdev/ethdev_trace.h +++ b/lib/ethdev/ethdev_trace.h @@ -586,6 +586,801 @@ RTE_TRACE_POINT( rte_trace_point_emit_int(ret); ) +RTE_TRACE_POINT( + rte_ethdev_trace_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_dev_info *dev_info), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_string(dev_info->driver_name); + rte_trace_point_emit_u16(dev_info->min_mtu); + rte_trace_point_emit_u16(dev_info->max_mtu); + rte_trace_point_emit_u32(dev_info->min_rx_bufsize); + rte_trace_point_emit_u32(dev_info->max_rx_pktlen); + rte_trace_point_emit_u16(dev_info->max_rx_queues); + rte_trace_point_emit_u16(dev_info->max_tx_queues); + rte_trace_point_emit_u32(dev_info->max_mac_addrs); + rte_trace_point_emit_u64(dev_info->rx_offload_capa); + rte_trace_point_emit_u64(dev_info->tx_offload_capa); + rte_trace_point_emit_u64(dev_info->rx_queue_offload_capa); + rte_trace_point_emit_u64(dev_info->tx_queue_offload_capa); + rte_trace_point_emit_u16(dev_info->reta_size); + rte_trace_point_emit_u8(dev_info->hash_key_size); + rte_trace_point_emit_u64(dev_info->flow_type_rss_offloads); + rte_trace_point_emit_u16(dev_info->rx_desc_lim.nb_max); + rte_trace_point_emit_u16(dev_info->rx_desc_lim.nb_min); + rte_trace_point_emit_u16(dev_info->rx_desc_lim.nb_align); + rte_trace_point_emit_u16(dev_info->tx_desc_lim.nb_max); + rte_trace_point_emit_u16(dev_info->tx_desc_lim.nb_min); + rte_trace_point_emit_u16(dev_info->tx_desc_lim.nb_align); + rte_trace_point_emit_u32(dev_info->speed_capa); + rte_trace_point_emit_u16(dev_info->nb_rx_queues); + rte_trace_point_emit_u16(dev_info->nb_tx_queues); + rte_trace_point_emit_u64(dev_info->dev_capa); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_conf *dev_conf), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(dev_conf->link_speeds); + rte_trace_point_emit_u64(dev_conf->rxmode.offloads); + rte_trace_point_emit_u64(dev_conf->txmode.offloads); + rte_trace_point_emit_u32(dev_conf->lpbk_mode); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_supported_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int supported_num, int num, + uint32_t ptypes), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(supported_num); + rte_trace_point_emit_int(num); + rte_trace_point_emit_u32(ptypes); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int supported_num, + unsigned int num, uint32_t set_ptypes), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(supported_num); + rte_trace_point_emit_u32(num); + rte_trace_point_emit_u32(set_ptypes); +) + +RTE_TRACE_POINT( + rte_eth_trace_macaddrs_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, unsigned int num), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(num); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_mtu, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t mtu, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(mtu); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_vlan_filter, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t vlan_id, int on, + int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(vlan_id); + rte_trace_point_emit_int(on); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_vlan_strip_on_queue, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, int on), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(rx_queue_id); + rte_trace_point_emit_int(on); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_vlan_ether_type, + RTE_TRACE_POINT_ARGS(uint16_t port_id, enum rte_vlan_type vlan_type, + uint16_t tag_type, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(vlan_type); + rte_trace_point_emit_u16(tag_type); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_vlan_offload, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int offload_mask, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(offload_mask); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_vlan_offload, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_vlan_pvid, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t pvid, int on, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(pvid); + rte_trace_point_emit_int(on); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_flow_ctrl_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_fc_conf *fc_conf, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(fc_conf->high_water); + rte_trace_point_emit_u32(fc_conf->low_water); + rte_trace_point_emit_u16(fc_conf->pause_time); + rte_trace_point_emit_u16(fc_conf->send_xon); + rte_trace_point_emit_int(fc_conf->mode); + rte_trace_point_emit_u8(fc_conf->mac_ctrl_frame_fwd); + rte_trace_point_emit_u8(fc_conf->autoneg); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_flow_ctrl_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_fc_conf *fc_conf, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(fc_conf->high_water); + rte_trace_point_emit_u32(fc_conf->low_water); + rte_trace_point_emit_u16(fc_conf->pause_time); + rte_trace_point_emit_u16(fc_conf->send_xon); + rte_trace_point_emit_int(fc_conf->mode); + rte_trace_point_emit_u8(fc_conf->mac_ctrl_frame_fwd); + rte_trace_point_emit_u8(fc_conf->autoneg); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_priority_flow_ctrl_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_pfc_conf *pfc_conf, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(pfc_conf->fc.high_water); + rte_trace_point_emit_u32(pfc_conf->fc.low_water); + rte_trace_point_emit_u16(pfc_conf->fc.pause_time); + rte_trace_point_emit_u16(pfc_conf->fc.send_xon); + rte_trace_point_emit_int(pfc_conf->fc.mode); + rte_trace_point_emit_u8(pfc_conf->fc.mac_ctrl_frame_fwd); + rte_trace_point_emit_u8(pfc_conf->fc.autoneg); + rte_trace_point_emit_u8(pfc_conf->priority); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_priority_flow_ctrl_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_pfc_queue_info *pfc_queue_info, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u8(pfc_queue_info->tc_max); + rte_trace_point_emit_int(pfc_queue_info->mode_capa); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_priority_flow_ctrl_queue_configure, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_pfc_queue_conf *pfc_queue_conf, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(pfc_queue_conf->mode); + rte_trace_point_emit_u16(pfc_queue_conf->rx_pause.tx_qid); + rte_trace_point_emit_u16(pfc_queue_conf->tx_pause.rx_qid); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_reta_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_rss_reta_entry64 *reta_conf, + uint16_t reta_size, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u64(reta_conf->mask); + rte_trace_point_emit_u16(reta_size); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_reta_query, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_rss_reta_entry64 *reta_conf, + uint16_t reta_size, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u64(reta_conf->mask); + rte_trace_point_emit_u16(reta_size); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_hash_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_rss_conf *rss_conf, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(rss_conf->rss_key); + rte_trace_point_emit_u8(rss_conf->rss_key_len); + rte_trace_point_emit_u64(rss_conf->rss_hf); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_hash_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_rss_conf *rss_conf, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(rss_conf->rss_key); + rte_trace_point_emit_u8(rss_conf->rss_key_len); + rte_trace_point_emit_u64(rss_conf->rss_hf); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_udp_tunnel_port_add, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_udp_tunnel *tunnel_udp, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(tunnel_udp->udp_port); + rte_trace_point_emit_u8(tunnel_udp->prot_type); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_udp_tunnel_port_delete, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_udp_tunnel *tunnel_udp, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(tunnel_udp->udp_port); + rte_trace_point_emit_u8(tunnel_udp->prot_type); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_led_on, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_led_off, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_fec_get_capability, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_fec_capa *speed_fec_capa, + unsigned int num, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(speed_fec_capa->speed); + rte_trace_point_emit_u32(speed_fec_capa->capa); + rte_trace_point_emit_u32(num); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_fec_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const uint32_t *fec_capa, + int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(fec_capa); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_fec_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t fec_capa, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(fec_capa); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_mac_addr_add, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_ether_addr *addr, uint32_t pool, int ret), + uint8_t len = RTE_ETHER_ADDR_LEN; + + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_blob(addr->addr_bytes, len); + rte_trace_point_emit_u32(pool); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_mac_addr_remove, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_ether_addr *addr), + uint8_t len = RTE_ETHER_ADDR_LEN; + + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_blob(addr->addr_bytes, len); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_default_mac_addr_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_ether_addr *addr), + uint8_t len = RTE_ETHER_ADDR_LEN; + + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_blob(addr->addr_bytes, len); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_uc_hash_table_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint8_t on, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u8(on); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_uc_all_hash_table_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint8_t on, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u8(on); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_set_queue_rate_limit, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_idx, + uint16_t tx_rate, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_idx); + rte_trace_point_emit_u16(tx_rate); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_rx_avail_thresh_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint8_t avail_thresh, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_u8(avail_thresh); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_rx_avail_thresh_query, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_callback_register, + RTE_TRACE_POINT_ARGS(uint16_t port_id, enum rte_eth_event_type event, + rte_eth_dev_cb_fn cb_fn, const void *cb_arg), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(event); + rte_trace_point_emit_ptr(cb_fn); + rte_trace_point_emit_ptr(cb_arg); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_callback_unregister, + RTE_TRACE_POINT_ARGS(uint16_t port_id, enum rte_eth_event_type event, + rte_eth_dev_cb_fn cb_fn, const void *cb_arg, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(event); + rte_trace_point_emit_ptr(cb_fn); + rte_trace_point_emit_ptr(cb_arg); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rx_intr_ctl, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t qid, int epfd, int op, + const void *data, int rc), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(qid); + rte_trace_point_emit_int(epfd); + rte_trace_point_emit_int(op); + rte_trace_point_emit_ptr(data); + rte_trace_point_emit_int(rc); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rx_intr_ctl_q_get_fd, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, int fd), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_int(fd); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rx_intr_ctl_q, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, int epfd, + int op, const void *data, int rc), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_int(epfd); + rte_trace_point_emit_int(op); + rte_trace_point_emit_ptr(data); + rte_trace_point_emit_int(rc); +) + +RTE_TRACE_POINT( + rte_eth_trace_add_rx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + rte_rx_callback_fn fn, void *user_param, + const struct rte_eth_rxtx_callback *cb), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_ptr(fn); + rte_trace_point_emit_ptr(user_param); + rte_trace_point_emit_ptr(cb); +) + +RTE_TRACE_POINT( + rte_eth_trace_add_first_rx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + rte_rx_callback_fn fn, const void *user_param, + const struct rte_eth_rxtx_callback *cb), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_ptr(fn); + rte_trace_point_emit_ptr(user_param); + rte_trace_point_emit_ptr(cb); +) + +RTE_TRACE_POINT( + rte_eth_trace_add_tx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + rte_tx_callback_fn fn, const void *user_param, + const struct rte_eth_rxtx_callback *cb), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_ptr(fn); + rte_trace_point_emit_ptr(user_param); + rte_trace_point_emit_ptr(cb); +) + +RTE_TRACE_POINT( + rte_eth_trace_remove_rx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_eth_rxtx_callback *user_cb, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_ptr(user_cb); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_remove_tx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_eth_rxtx_callback *user_cb, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_ptr(user_cb); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_rx_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_eth_rxq_info *qinfo), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_ptr(qinfo->mp); + rte_trace_point_emit_u8(qinfo->conf.rx_drop_en); + rte_trace_point_emit_u64(qinfo->conf.offloads); + rte_trace_point_emit_u8(qinfo->scattered_rx); + rte_trace_point_emit_u8(qinfo->queue_state); + rte_trace_point_emit_u16(qinfo->nb_desc); + rte_trace_point_emit_u16(qinfo->rx_buf_size); +) + +RTE_TRACE_POINT( + rte_eth_trace_tx_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_eth_txq_info *qinfo), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_u16(qinfo->nb_desc); + rte_trace_point_emit_u8(qinfo->queue_state); +) + +RTE_TRACE_POINT( + rte_eth_trace_rx_burst_mode_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_eth_burst_mode *mode, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_u64(mode->flags); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_tx_burst_mode_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_eth_burst_mode *mode, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_u64(mode->flags); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_get_monitor_addr, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_power_monitor_cond *pmc, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_ptr(pmc->addr); + rte_trace_point_emit_u8(pmc->size); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_mc_addr_list, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_ether_addr *mc_addr_set, uint32_t nb_mc_addr, + int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(mc_addr_set); + rte_trace_point_emit_u32(nb_mc_addr); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_timesync_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_timesync_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_timesync_write_time, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec *time, + int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_size_t(time->tv_sec); + rte_trace_point_emit_long(time->tv_nsec); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_read_clock, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const uint64_t *clk, int ret), + uint64_t clk_v = *clk; + + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u64(clk_v); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_reg_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_dev_reg_info *info, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(info->data); + rte_trace_point_emit_u32(info->offset); + rte_trace_point_emit_u32(info->length); + rte_trace_point_emit_u32(info->width); + rte_trace_point_emit_u32(info->version); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_eeprom_length, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_dev_eeprom_info *info, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(info->data); + rte_trace_point_emit_u32(info->offset); + rte_trace_point_emit_u32(info->length); + rte_trace_point_emit_u32(info->magic); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_dev_eeprom_info *info, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(info->data); + rte_trace_point_emit_u32(info->offset); + rte_trace_point_emit_u32(info->length); + rte_trace_point_emit_u32(info->magic); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_module_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_dev_module_info *modinfo, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(modinfo->type); + rte_trace_point_emit_u32(modinfo->eeprom_len); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_module_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_dev_eeprom_info *info, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(info->data); + rte_trace_point_emit_u32(info->offset); + rte_trace_point_emit_u32(info->length); + rte_trace_point_emit_u32(info->magic); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_dcb_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_dcb_info *dcb_info, int ret), + uint8_t num_user_priorities = RTE_ETH_DCB_NUM_USER_PRIORITIES; + uint8_t num_tcs = RTE_ETH_DCB_NUM_TCS; + + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u8(dcb_info->nb_tcs); + rte_trace_point_emit_blob(dcb_info->prio_tc, num_user_priorities); + rte_trace_point_emit_blob(dcb_info->tc_bws, num_tcs); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_adjust_nb_rx_tx_desc, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_hairpin_capability_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_hairpin_cap *cap, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(cap->max_nb_queues); + rte_trace_point_emit_u16(cap->max_rx_2_tx); + rte_trace_point_emit_u16(cap->max_tx_2_rx); + rte_trace_point_emit_u16(cap->max_nb_desc); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_pool_ops_supported, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const char *pool, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_string(pool); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_representor_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_representor_info *info, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(info); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_rx_metadata_negotiate, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint64_t features_val, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u64(features_val); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_ip_reassembly_capability_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_ip_reassembly_params *capa, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(capa->timeout_ms); + rte_trace_point_emit_u16(capa->max_frags); + rte_trace_point_emit_u16(capa->flags); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_ip_reassembly_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_ip_reassembly_params *conf, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(conf->timeout_ms); + rte_trace_point_emit_u16(conf->max_frags); + rte_trace_point_emit_u16(conf->flags); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_ip_reassembly_conf_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_ip_reassembly_params *conf, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(conf->timeout_ms); + rte_trace_point_emit_u16(conf->max_frags); + rte_trace_point_emit_u16(conf->flags); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_buffer_split_get_supported_hdr_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int supported_num, + uint32_t ptypes), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(supported_num); + rte_trace_point_emit_u32(ptypes); +) + +RTE_TRACE_POINT( + rte_eth_trace_cman_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_cman_info *info, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u64(info->modes_supported); + rte_trace_point_emit_u64(info->objs_supported); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_cman_config_init, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_cman_config *config, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(config->obj); + rte_trace_point_emit_int(config->mode); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_cman_config_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_cman_config *config, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(config->obj); + rte_trace_point_emit_int(config->mode); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_eth_trace_cman_config_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_cman_config *config, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_int(config->obj); + rte_trace_point_emit_int(config->mode); + rte_trace_point_emit_int(ret); +) + /* Fast path trace points */ /* Called in loop in examples/qos_sched and examples/distributor */ @@ -628,6 +1423,86 @@ RTE_TRACE_POINT_FP( rte_trace_point_emit_string(ret); ) +/* Called in loop in examples/bond and examples/ethtool */ +RTE_TRACE_POINT_FP( + rte_eth_trace_macaddr_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_ether_addr *mac_addr), + uint8_t len = RTE_ETHER_ADDR_LEN; + + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_blob(mac_addr->addr_bytes, len); +) + +/* Called in loop in examples/ip_pipeline */ +RTE_TRACE_POINT_FP( + rte_ethdev_trace_get_mtu, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t mtu), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(mtu); +) + +/* Called in loop in examples/l3fwd-power */ +RTE_TRACE_POINT_FP( + rte_ethdev_trace_rx_intr_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_int(ret); +) + +/* Called in loop in examples/l3fwd-power */ +RTE_TRACE_POINT_FP( + rte_ethdev_trace_rx_intr_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_int(ret); +) + +/* Called in loop in examples/ptpclient */ +RTE_TRACE_POINT_FP( + rte_eth_trace_timesync_read_rx_timestamp, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec *timestamp, + uint32_t flags, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_size_t(timestamp->tv_sec); + rte_trace_point_emit_long(timestamp->tv_nsec); + rte_trace_point_emit_u32(flags); + rte_trace_point_emit_int(ret); +) + +/* Called in loop in examples/ptpclient */ +RTE_TRACE_POINT_FP( + rte_eth_trace_timesync_read_tx_timestamp, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec *timestamp, + int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_size_t(timestamp->tv_sec); + rte_trace_point_emit_long(timestamp->tv_nsec); + rte_trace_point_emit_int(ret); +) + +/* Called in loop in examples/ptpclient */ +RTE_TRACE_POINT_FP( + rte_eth_trace_timesync_read_time, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec *time, + int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_size_t(time->tv_sec); + rte_trace_point_emit_long(time->tv_nsec); + rte_trace_point_emit_int(ret); +) + +/* Called in loop in examples/ptpclient */ +RTE_TRACE_POINT_FP( + rte_eth_trace_timesync_adjust_time, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int64_t delta, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_i64(delta); + rte_trace_point_emit_int(ret); +) + #ifdef __cplusplus } #endif diff --git a/lib/ethdev/ethdev_trace_points.c b/lib/ethdev/ethdev_trace_points.c index 3e58c679c3..7a08104dc9 100644 --- a/lib/ethdev/ethdev_trace_points.c +++ b/lib/ethdev/ethdev_trace_points.c @@ -222,3 +222,255 @@ RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_rx_queue_stats_mapping, RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_fw_version_get, lib.ethdev.fw_version_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_info_get, + lib.ethdev.info_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_conf_get, + lib.ethdev.conf_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_supported_ptypes, + lib.ethdev.get_supported_ptypes) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_ptypes, + lib.ethdev.set_ptypes) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_macaddrs_get, + lib.ethdev.macaddrs_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_macaddr_get, + lib.ethdev.macaddr_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_mtu, + lib.ethdev.get_mtu) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_mtu, + lib.ethdev.set_mtu) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_vlan_filter, + lib.ethdev.vlan_filter) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_strip_on_queue, + lib.ethdev.set_vlan_strip_on_queue) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_ether_type, + lib.ethdev.set_vlan_ether_type) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_offload, + lib.ethdev.set_vlan_offload) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_vlan_offload, + lib.ethdev.get_vlan_offload) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_pvid, + lib.ethdev.set_vlan_pvid) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_flow_ctrl_get, + lib.ethdev.flow_ctrl_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_flow_ctrl_set, + lib.ethdev.flow_ctrl_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_priority_flow_ctrl_set, + lib.ethdev.priority_flow_ctrl_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_priority_flow_ctrl_queue_info_get, + lib.ethdev.priority_flow_ctrl_queue_info_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_priority_flow_ctrl_queue_configure, + lib.ethdev.priority_flow_ctrl_queue_configure) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rss_reta_update, + lib.ethdev.rss_reta_update) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rss_reta_query, + lib.ethdev.rss_reta_query) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rss_hash_update, + lib.ethdev.rss_hash_update) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rss_hash_conf_get, + lib.ethdev.rss_hash_conf_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_udp_tunnel_port_add, + lib.ethdev.udp_tunnel_port_add) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_udp_tunnel_port_delete, + lib.ethdev.udp_tunnel_port_delete) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_led_on, + lib.ethdev.led_on) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_led_off, + lib.ethdev.led_off) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_fec_get_capability, + lib.ethdev.fec_get_capability) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_fec_get, + lib.ethdev.fec_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_fec_set, + lib.ethdev.fec_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_mac_addr_add, + lib.ethdev.mac_addr_add) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_mac_addr_remove, + lib.ethdev.mac_addr_remove) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_default_mac_addr_set, + lib.ethdev.default_mac_addr_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_uc_hash_table_set, + lib.ethdev.uc_hash_table_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_uc_all_hash_table_set, + lib.ethdev.uc_all_hash_table_set) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_set_queue_rate_limit, + lib.ethdev.set_queue_rate_limit) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_avail_thresh_set, + lib.ethdev.rx_avail_thresh_set) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_avail_thresh_query, + lib.ethdev.rx_avail_thresh_query) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_callback_register, + lib.ethdev.callback_register) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_callback_unregister, + lib.ethdev.callback_unregister) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_intr_ctl, + lib.ethdev.rx_intr_ctl) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_intr_ctl_q_get_fd, + lib.ethdev.rx_intr_ctl_q_get_fd) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_intr_ctl_q, + lib.ethdev.rx_intr_ctl_q) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_intr_enable, + lib.ethdev.rx_intr_enable) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_intr_disable, + lib.ethdev.rx_intr_disable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_add_rx_callback, + lib.ethdev.add_rx_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_add_first_rx_callback, + lib.ethdev.add_first_rx_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_add_tx_callback, + lib.ethdev.add_tx_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_remove_rx_callback, + lib.ethdev.remove_rx_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_remove_tx_callback, + lib.ethdev.remove_tx_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_queue_info_get, + lib.ethdev.rx_queue_info_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_queue_info_get, + lib.ethdev.tx_queue_info_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_burst_mode_get, + lib.ethdev.rx_burst_mode_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_burst_mode_get, + lib.ethdev.tx_burst_mode_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_get_monitor_addr, + lib.ethdev.get_monitor_addr) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_mc_addr_list, + lib.ethdev.set_mc_addr_list) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_enable, + lib.ethdev.timesync_enable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_disable, + lib.ethdev.timesync_disable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_read_rx_timestamp, + lib.ethdev.timesync_read_rx_timestamp) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_read_tx_timestamp, + lib.ethdev.timesync_read_tx_timestamp) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_adjust_time, + lib.ethdev.timesync_adjust_time) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_read_time, + lib.ethdev.timesync_read_time) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_write_time, + lib.ethdev.timesync_write_time) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_read_clock, + lib.ethdev.read_clock) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_reg_info, + lib.ethdev.get_reg_info) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_eeprom_length, + lib.ethdev.get_eeprom_length) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_eeprom, + lib.ethdev.get_eeprom) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_eeprom, + lib.ethdev.set_eeprom) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_module_info, + lib.ethdev.get_module_info) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_module_eeprom, + lib.ethdev.get_module_eeprom) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_dcb_info, + lib.ethdev.get_dcb_info) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_adjust_nb_rx_tx_desc, + lib.ethdev.adjust_nb_rx_tx_desc) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_hairpin_capability_get, + lib.ethdev.hairpin_capability_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_pool_ops_supported, + lib.ethdev.pool_ops_supported) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_representor_info_get, + lib.ethdev.representor_info_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_metadata_negotiate, + lib.ethdev.rx_metadata_negotiate) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_ip_reassembly_capability_get, + lib.ethdev.ip_reassembly_capability_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_ip_reassembly_conf_get, + lib.ethdev.ip_reassembly_conf_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_ip_reassembly_conf_set, + lib.ethdev.ip_reassembly_conf_set) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_buffer_split_get_supported_hdr_ptypes, + lib.ethdev.buffer_split_get_supported_hdr_ptypes) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_cman_info_get, + lib.ethdev.cman_info_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_cman_config_init, + lib.ethdev.cman_config_init) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_cman_config_set, + lib.ethdev.cman_config_set) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_cman_config_get, + lib.ethdev.cman_config_get) diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index 6aaae66b83..dc0a4eb12c 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -3627,6 +3627,8 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info) dev_info->dev_flags = &dev->data->dev_flags; + rte_ethdev_trace_info_get(port_id, dev_info); + return 0; } @@ -3647,6 +3649,8 @@ rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf) memcpy(dev_conf, &dev->data->dev_conf, sizeof(struct rte_eth_conf)); + rte_ethdev_trace_conf_get(port_id, dev_conf); + return 0; } @@ -3677,8 +3681,12 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask, for (i = 0, j = 0; all_ptypes[i] != RTE_PTYPE_UNKNOWN; ++i) if (all_ptypes[i] & ptype_mask) { - if (j < num) + if (j < num) { ptypes[j] = all_ptypes[i]; + + rte_ethdev_trace_get_supported_ptypes(port_id, + j, num, ptypes[j]); + } j++; } @@ -3756,6 +3764,10 @@ rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask, if (ptype_mask & all_ptypes[i]) { if (j < num - 1) { set_ptypes[j] = all_ptypes[i]; + + rte_ethdev_trace_set_ptypes(port_id, j, num, + set_ptypes[j]); + j++; continue; } @@ -3797,6 +3809,8 @@ rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma, num = RTE_MIN(dev_info.max_mac_addrs, num); memcpy(ma, dev->data->mac_addrs, num * sizeof(ma[0])); + rte_eth_trace_macaddrs_get(port_id, num); + return num; } @@ -3817,6 +3831,8 @@ rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr) rte_ether_addr_copy(&dev->data->mac_addrs[0], mac_addr); + rte_eth_trace_macaddr_get(port_id, mac_addr); + return 0; } @@ -3835,6 +3851,9 @@ rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu) } *mtu = dev->data->mtu; + + rte_ethdev_trace_get_mtu(port_id, *mtu); + return 0; } @@ -3877,7 +3896,11 @@ rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu) if (ret == 0) dev->data->mtu = mtu; - return eth_err(port_id, ret); + ret = eth_err(port_id, ret); + + rte_ethdev_trace_set_mtu(port_id, mtu, ret); + + return ret; } int @@ -3920,7 +3943,11 @@ rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on) vfc->ids[vidx] &= ~RTE_BIT64(vbit); } - return eth_err(port_id, ret); + ret = eth_err(port_id, ret); + + rte_ethdev_trace_vlan_filter(port_id, vlan_id, on, ret); + + return ret; } int @@ -3941,6 +3968,8 @@ rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id, return -ENOTSUP; (*dev->dev_ops->vlan_strip_queue_set)(dev, rx_queue_id, on); + rte_ethdev_trace_set_vlan_strip_on_queue(port_id, rx_queue_id, on); + return 0; } @@ -3950,14 +3979,19 @@ rte_eth_dev_set_vlan_ether_type(uint16_t port_id, uint16_t tpid) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->vlan_tpid_set == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->vlan_tpid_set)(dev, vlan_type, - tpid)); + ret = eth_err(port_id, (*dev->dev_ops->vlan_tpid_set)(dev, vlan_type, + tpid)); + + rte_ethdev_trace_set_vlan_ether_type(port_id, vlan_type, tpid, ret); + + return ret; } int @@ -4049,7 +4083,11 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask) dev->data->dev_conf.rxmode.offloads = orig_offloads; } - return eth_err(port_id, ret); + ret = eth_err(port_id, ret); + + rte_ethdev_trace_set_vlan_offload(port_id, offload_mask, ret); + + return ret; } int @@ -4075,6 +4113,8 @@ rte_eth_dev_get_vlan_offload(uint16_t port_id) if (*dev_offloads & RTE_ETH_RX_OFFLOAD_QINQ_STRIP) ret |= RTE_ETH_QINQ_STRIP_OFFLOAD; + rte_ethdev_trace_get_vlan_offload(port_id, ret); + return ret; } @@ -4082,19 +4122,25 @@ int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->vlan_pvid_set == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->vlan_pvid_set)(dev, pvid, on)); + ret = eth_err(port_id, (*dev->dev_ops->vlan_pvid_set)(dev, pvid, on)); + + rte_ethdev_trace_set_vlan_pvid(port_id, pvid, on, ret); + + return ret; } int rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -4109,13 +4155,18 @@ rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf) if (*dev->dev_ops->flow_ctrl_get == NULL) return -ENOTSUP; memset(fc_conf, 0, sizeof(*fc_conf)); - return eth_err(port_id, (*dev->dev_ops->flow_ctrl_get)(dev, fc_conf)); + ret = eth_err(port_id, (*dev->dev_ops->flow_ctrl_get)(dev, fc_conf)); + + rte_ethdev_trace_flow_ctrl_get(port_id, fc_conf, ret); + + return ret; } int rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -4134,7 +4185,11 @@ rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf) if (*dev->dev_ops->flow_ctrl_set == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->flow_ctrl_set)(dev, fc_conf)); + ret = eth_err(port_id, (*dev->dev_ops->flow_ctrl_set)(dev, fc_conf)); + + rte_ethdev_trace_flow_ctrl_set(port_id, fc_conf, ret); + + return ret; } int @@ -4142,6 +4197,7 @@ rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, struct rte_eth_pfc_conf *pfc_conf) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -4159,10 +4215,14 @@ rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, } /* High water, low water validation are device specific */ - if (*dev->dev_ops->priority_flow_ctrl_set) - return eth_err(port_id, (*dev->dev_ops->priority_flow_ctrl_set) - (dev, pfc_conf)); - return -ENOTSUP; + if (*dev->dev_ops->priority_flow_ctrl_set == NULL) + return -ENOTSUP; + ret = eth_err(port_id, (*dev->dev_ops->priority_flow_ctrl_set) + (dev, pfc_conf)); + + rte_ethdev_trace_priority_flow_ctrl_set(port_id, pfc_conf, ret); + + return ret; } static int @@ -4220,6 +4280,7 @@ rte_eth_dev_priority_flow_ctrl_queue_info_get(uint16_t port_id, struct rte_eth_pfc_queue_info *pfc_queue_info) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -4230,10 +4291,15 @@ rte_eth_dev_priority_flow_ctrl_queue_info_get(uint16_t port_id, return -EINVAL; } - if (*dev->dev_ops->priority_flow_ctrl_queue_info_get) - return eth_err(port_id, (*dev->dev_ops->priority_flow_ctrl_queue_info_get) + if (*dev->dev_ops->priority_flow_ctrl_queue_info_get == NULL) + return -ENOTSUP; + ret = eth_err(port_id, (*dev->dev_ops->priority_flow_ctrl_queue_info_get) (dev, pfc_queue_info)); - return -ENOTSUP; + + rte_ethdev_trace_priority_flow_ctrl_queue_info_get(port_id, + pfc_queue_info, ret); + + return ret; } int @@ -4301,11 +4367,15 @@ rte_eth_dev_priority_flow_ctrl_queue_configure(uint16_t port_id, return ret; } - if (*dev->dev_ops->priority_flow_ctrl_queue_config) - return eth_err(port_id, - (*dev->dev_ops->priority_flow_ctrl_queue_config)( - dev, pfc_queue_conf)); - return -ENOTSUP; + if (*dev->dev_ops->priority_flow_ctrl_queue_config == NULL) + return -ENOTSUP; + ret = eth_err(port_id, (*dev->dev_ops->priority_flow_ctrl_queue_config) + (dev, pfc_queue_conf)); + + rte_ethdev_trace_priority_flow_ctrl_queue_configure(port_id, + pfc_queue_conf, ret); + + return ret; } static int @@ -4396,8 +4466,12 @@ rte_eth_dev_rss_reta_update(uint16_t port_id, if (*dev->dev_ops->reta_update == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->reta_update)(dev, reta_conf, - reta_size)); + ret = eth_err(port_id, (*dev->dev_ops->reta_update)(dev, reta_conf, + reta_size)); + + rte_ethdev_trace_rss_reta_update(port_id, reta_conf, reta_size, ret); + + return ret; } int @@ -4425,8 +4499,12 @@ rte_eth_dev_rss_reta_query(uint16_t port_id, if (*dev->dev_ops->reta_query == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->reta_query)(dev, reta_conf, - reta_size)); + ret = eth_err(port_id, (*dev->dev_ops->reta_query)(dev, reta_conf, + reta_size)); + + rte_ethdev_trace_rss_reta_query(port_id, reta_conf, reta_size, ret); + + return ret; } int @@ -4470,8 +4548,12 @@ rte_eth_dev_rss_hash_update(uint16_t port_id, if (*dev->dev_ops->rss_hash_update == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->rss_hash_update)(dev, - rss_conf)); + ret = eth_err(port_id, (*dev->dev_ops->rss_hash_update)(dev, + rss_conf)); + + rte_ethdev_trace_rss_hash_update(port_id, rss_conf, ret); + + return ret; } int @@ -4479,6 +4561,7 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id, struct rte_eth_rss_conf *rss_conf) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -4492,8 +4575,12 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id, if (*dev->dev_ops->rss_hash_conf_get == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->rss_hash_conf_get)(dev, - rss_conf)); + ret = eth_err(port_id, (*dev->dev_ops->rss_hash_conf_get)(dev, + rss_conf)); + + rte_ethdev_trace_rss_hash_conf_get(port_id, rss_conf, ret); + + return ret; } int @@ -4501,6 +4588,7 @@ rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, struct rte_eth_udp_tunnel *udp_tunnel) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -4519,8 +4607,12 @@ rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, if (*dev->dev_ops->udp_tunnel_port_add == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->udp_tunnel_port_add)(dev, + ret = eth_err(port_id, (*dev->dev_ops->udp_tunnel_port_add)(dev, udp_tunnel)); + + rte_ethdev_trace_udp_tunnel_port_add(port_id, udp_tunnel, ret); + + return ret; } int @@ -4528,6 +4620,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id, struct rte_eth_udp_tunnel *udp_tunnel) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -4546,34 +4639,48 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id, if (*dev->dev_ops->udp_tunnel_port_del == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->udp_tunnel_port_del)(dev, + ret = eth_err(port_id, (*dev->dev_ops->udp_tunnel_port_del)(dev, udp_tunnel)); + + rte_ethdev_trace_udp_tunnel_port_delete(port_id, udp_tunnel, ret); + + return ret; } int rte_eth_led_on(uint16_t port_id) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->dev_led_on == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->dev_led_on)(dev)); + ret = eth_err(port_id, (*dev->dev_ops->dev_led_on)(dev)); + + rte_eth_trace_led_on(port_id, ret); + + return ret; } int rte_eth_led_off(uint16_t port_id) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->dev_led_off == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->dev_led_off)(dev)); + ret = eth_err(port_id, (*dev->dev_ops->dev_led_off)(dev)); + + rte_eth_trace_led_off(port_id, ret); + + return ret; } int @@ -4598,6 +4705,8 @@ rte_eth_fec_get_capability(uint16_t port_id, return -ENOTSUP; ret = (*dev->dev_ops->fec_get_capability)(dev, speed_fec_capa, num); + rte_eth_trace_fec_get_capability(port_id, speed_fec_capa, num, ret); + return ret; } @@ -4605,6 +4714,7 @@ int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -4618,20 +4728,29 @@ rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa) if (*dev->dev_ops->fec_get == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->fec_get)(dev, fec_capa)); + ret = eth_err(port_id, (*dev->dev_ops->fec_get)(dev, fec_capa)); + + rte_eth_trace_fec_get(port_id, fec_capa, ret); + + return ret; } int rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->fec_set == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa)); + ret = eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa)); + + rte_eth_trace_fec_set(port_id, fec_capa, ret); + + return ret; } /* @@ -4719,7 +4838,11 @@ rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *addr, dev->data->mac_pool_sel[index] |= RTE_BIT64(pool); } - return eth_err(port_id, ret); + ret = eth_err(port_id, ret); + + rte_ethdev_trace_mac_addr_add(port_id, addr, pool, ret); + + return ret; } int @@ -4759,6 +4882,8 @@ rte_eth_dev_mac_addr_remove(uint16_t port_id, struct rte_ether_addr *addr) /* reset pool bitmap */ dev->data->mac_pool_sel[index] = 0; + rte_ethdev_trace_mac_addr_remove(port_id, addr); + return 0; } @@ -4791,6 +4916,8 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr) /* Update default address in NIC data structure */ rte_ether_addr_copy(addr, &dev->data->mac_addrs[0]); + rte_ethdev_trace_default_mac_addr_set(port_id, addr); + return 0; } @@ -4881,21 +5008,29 @@ rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr, &dev->data->hash_mac_addrs[index]); } - return eth_err(port_id, ret); + ret = eth_err(port_id, ret); + + rte_ethdev_trace_uc_hash_table_set(port_id, on, ret); + + return ret; } int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->uc_all_hash_table_set == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->uc_all_hash_table_set)(dev, - on)); + ret = eth_err(port_id, (*dev->dev_ops->uc_all_hash_table_set)(dev, on)); + + rte_ethdev_trace_uc_all_hash_table_set(port_id, on, ret); + + return ret; } int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, @@ -4931,14 +5066,19 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, if (*dev->dev_ops->set_queue_rate_limit == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->set_queue_rate_limit)(dev, + ret = eth_err(port_id, (*dev->dev_ops->set_queue_rate_limit)(dev, queue_idx, tx_rate)); + + rte_eth_trace_set_queue_rate_limit(port_id, queue_idx, tx_rate, ret); + + return ret; } int rte_eth_rx_avail_thresh_set(uint16_t port_id, uint16_t queue_id, uint8_t avail_thresh) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -4958,14 +5098,19 @@ int rte_eth_rx_avail_thresh_set(uint16_t port_id, uint16_t queue_id, } if (*dev->dev_ops->rx_queue_avail_thresh_set == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->rx_queue_avail_thresh_set)(dev, + ret = eth_err(port_id, (*dev->dev_ops->rx_queue_avail_thresh_set)(dev, queue_id, avail_thresh)); + + rte_eth_trace_rx_avail_thresh_set(port_id, queue_id, avail_thresh, ret); + + return ret; } int rte_eth_rx_avail_thresh_query(uint16_t port_id, uint16_t *queue_id, uint8_t *avail_thresh) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -4977,8 +5122,12 @@ int rte_eth_rx_avail_thresh_query(uint16_t port_id, uint16_t *queue_id, if (*dev->dev_ops->rx_queue_avail_thresh_query == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->rx_queue_avail_thresh_query)(dev, + ret = eth_err(port_id, (*dev->dev_ops->rx_queue_avail_thresh_query)(dev, queue_id, avail_thresh)); + + rte_eth_trace_rx_avail_thresh_query(port_id, *queue_id, ret); + + return ret; } RTE_INIT(eth_dev_init_fp_ops) @@ -5060,6 +5209,9 @@ rte_eth_dev_callback_register(uint16_t port_id, } while (++next_port <= last_port); rte_spinlock_unlock(ð_dev_cb_lock); + + rte_ethdev_trace_callback_register(port_id, event, cb_fn, cb_arg); + return 0; } @@ -5121,6 +5273,10 @@ rte_eth_dev_callback_unregister(uint16_t port_id, } while (++next_port <= last_port); rte_spinlock_unlock(ð_dev_cb_lock); + + rte_ethdev_trace_callback_unregister(port_id, event, cb_fn, cb_arg, + ret); + return ret; } @@ -5150,6 +5306,9 @@ rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data) for (qid = 0; qid < dev->data->nb_rx_queues; qid++) { vec = rte_intr_vec_list_index_get(intr_handle, qid); rc = rte_intr_rx_ctl(intr_handle, epfd, op, vec, data); + + rte_ethdev_trace_rx_intr_ctl(port_id, qid, epfd, op, data, rc); + if (rc && rc != -EEXIST) { RTE_ETHDEV_LOG(ERR, "p %u q %u Rx ctl error op %d epfd %d vec %u\n", @@ -5193,6 +5352,8 @@ rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id) (vec - RTE_INTR_VEC_RXTX_OFFSET) : vec; fd = rte_intr_efds_index_get(intr_handle, efd_idx); + rte_ethdev_trace_rx_intr_ctl_q_get_fd(port_id, queue_id, fd); + return fd; } @@ -5226,6 +5387,9 @@ rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id, vec = rte_intr_vec_list_index_get(intr_handle, queue_id); rc = rte_intr_rx_ctl(intr_handle, epfd, op, vec, data); + + rte_ethdev_trace_rx_intr_ctl_q(port_id, queue_id, epfd, op, data, rc); + if (rc && rc != -EEXIST) { RTE_ETHDEV_LOG(ERR, "p %u q %u Rx ctl error op %d epfd %d vec %u\n", @@ -5252,7 +5416,11 @@ rte_eth_dev_rx_intr_enable(uint16_t port_id, if (*dev->dev_ops->rx_queue_intr_enable == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->rx_queue_intr_enable)(dev, queue_id)); + ret = eth_err(port_id, (*dev->dev_ops->rx_queue_intr_enable)(dev, queue_id)); + + rte_ethdev_trace_rx_intr_enable(port_id, queue_id, ret); + + return ret; } int @@ -5271,7 +5439,11 @@ rte_eth_dev_rx_intr_disable(uint16_t port_id, if (*dev->dev_ops->rx_queue_intr_disable == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->rx_queue_intr_disable)(dev, queue_id)); + ret = eth_err(port_id, (*dev->dev_ops->rx_queue_intr_disable)(dev, queue_id)); + + rte_ethdev_trace_rx_intr_disable(port_id, queue_id, ret); + + return ret; } @@ -5329,6 +5501,8 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id, } rte_spinlock_unlock(ð_dev_rx_cb_lock); + rte_eth_trace_add_rx_callback(port_id, queue_id, fn, user_param, cb); + return cb; } @@ -5368,6 +5542,9 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id, cb, __ATOMIC_RELEASE); rte_spinlock_unlock(ð_dev_rx_cb_lock); + rte_eth_trace_add_first_rx_callback(port_id, queue_id, fn, user_param, + cb); + return cb; } @@ -5427,6 +5604,8 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id, } rte_spinlock_unlock(ð_dev_tx_cb_lock); + rte_eth_trace_add_tx_callback(port_id, queue_id, fn, user_param, cb); + return cb; } @@ -5461,6 +5640,8 @@ rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id, } rte_spinlock_unlock(ð_dev_rx_cb_lock); + rte_eth_trace_remove_rx_callback(port_id, queue_id, user_cb, ret); + return ret; } @@ -5495,6 +5676,8 @@ rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id, } rte_spinlock_unlock(ð_dev_tx_cb_lock); + rte_eth_trace_remove_tx_callback(port_id, queue_id, user_cb, ret); + return ret; } @@ -5541,6 +5724,8 @@ rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id, dev->dev_ops->rxq_info_get(dev, queue_id, qinfo); qinfo->queue_state = dev->data->rx_queue_state[queue_id]; + rte_eth_trace_rx_queue_info_get(port_id, queue_id, qinfo); + return 0; } @@ -5587,6 +5772,8 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id, dev->dev_ops->txq_info_get(dev, queue_id, qinfo); qinfo->queue_state = dev->data->tx_queue_state[queue_id]; + rte_eth_trace_tx_queue_info_get(port_id, queue_id, qinfo); + return 0; } @@ -5595,6 +5782,7 @@ rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_burst_mode *mode) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5614,8 +5802,12 @@ rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id, if (*dev->dev_ops->rx_burst_mode_get == NULL) return -ENOTSUP; memset(mode, 0, sizeof(*mode)); - return eth_err(port_id, - dev->dev_ops->rx_burst_mode_get(dev, queue_id, mode)); + ret = eth_err(port_id, + dev->dev_ops->rx_burst_mode_get(dev, queue_id, mode)); + + rte_eth_trace_rx_burst_mode_get(port_id, queue_id, mode, ret); + + return ret; } int @@ -5623,6 +5815,7 @@ rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_burst_mode *mode) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5642,8 +5835,12 @@ rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id, if (*dev->dev_ops->tx_burst_mode_get == NULL) return -ENOTSUP; memset(mode, 0, sizeof(*mode)); - return eth_err(port_id, - dev->dev_ops->tx_burst_mode_get(dev, queue_id, mode)); + ret = eth_err(port_id, + dev->dev_ops->tx_burst_mode_get(dev, queue_id, mode)); + + rte_eth_trace_tx_burst_mode_get(port_id, queue_id, mode, ret); + + return ret; } int @@ -5651,6 +5848,7 @@ rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id, struct rte_power_monitor_cond *pmc) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5669,8 +5867,12 @@ rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id, if (*dev->dev_ops->get_monitor_addr == NULL) return -ENOTSUP; - return eth_err(port_id, + ret = eth_err(port_id, dev->dev_ops->get_monitor_addr(dev->data->rx_queues[queue_id], pmc)); + + rte_eth_trace_get_monitor_addr(port_id, queue_id, pmc, ret); + + return ret; } int @@ -5679,40 +5881,56 @@ rte_eth_dev_set_mc_addr_list(uint16_t port_id, uint32_t nb_mc_addr) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->set_mc_addr_list == NULL) return -ENOTSUP; - return eth_err(port_id, dev->dev_ops->set_mc_addr_list(dev, + ret = eth_err(port_id, dev->dev_ops->set_mc_addr_list(dev, mc_addr_set, nb_mc_addr)); + + rte_ethdev_trace_set_mc_addr_list(port_id, mc_addr_set, nb_mc_addr, + ret); + + return ret; } int rte_eth_timesync_enable(uint16_t port_id) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->timesync_enable == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->timesync_enable)(dev)); + ret = eth_err(port_id, (*dev->dev_ops->timesync_enable)(dev)); + + rte_eth_trace_timesync_enable(port_id, ret); + + return ret; } int rte_eth_timesync_disable(uint16_t port_id) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->timesync_disable == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->timesync_disable)(dev)); + ret = eth_err(port_id, (*dev->dev_ops->timesync_disable)(dev)); + + rte_eth_trace_timesync_disable(port_id, ret); + + return ret; } int @@ -5720,6 +5938,7 @@ rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp, uint32_t flags) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5733,8 +5952,14 @@ rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp, if (*dev->dev_ops->timesync_read_rx_timestamp == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->timesync_read_rx_timestamp) - (dev, timestamp, flags)); + + ret = eth_err(port_id, (*dev->dev_ops->timesync_read_rx_timestamp) + (dev, timestamp, flags)); + + rte_eth_trace_timesync_read_rx_timestamp(port_id, timestamp, flags, + ret); + + return ret; } int @@ -5742,6 +5967,7 @@ rte_eth_timesync_read_tx_timestamp(uint16_t port_id, struct timespec *timestamp) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5755,27 +5981,39 @@ rte_eth_timesync_read_tx_timestamp(uint16_t port_id, if (*dev->dev_ops->timesync_read_tx_timestamp == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->timesync_read_tx_timestamp) - (dev, timestamp)); + + ret = eth_err(port_id, (*dev->dev_ops->timesync_read_tx_timestamp) + (dev, timestamp)); + + rte_eth_trace_timesync_read_tx_timestamp(port_id, timestamp, ret); + + return ret; + } int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->timesync_adjust_time == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->timesync_adjust_time)(dev, delta)); + ret = eth_err(port_id, (*dev->dev_ops->timesync_adjust_time)(dev, delta)); + + rte_eth_trace_timesync_adjust_time(port_id, delta, ret); + + return ret; } int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *timestamp) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5789,14 +6027,19 @@ rte_eth_timesync_read_time(uint16_t port_id, struct timespec *timestamp) if (*dev->dev_ops->timesync_read_time == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->timesync_read_time)(dev, + ret = eth_err(port_id, (*dev->dev_ops->timesync_read_time)(dev, timestamp)); + + rte_eth_trace_timesync_read_time(port_id, timestamp, ret); + + return ret; } int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *timestamp) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5810,14 +6053,19 @@ rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *timestamp) if (*dev->dev_ops->timesync_write_time == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->timesync_write_time)(dev, + ret = eth_err(port_id, (*dev->dev_ops->timesync_write_time)(dev, timestamp)); + + rte_eth_trace_timesync_write_time(port_id, timestamp, ret); + + return ret; } int rte_eth_read_clock(uint16_t port_id, uint64_t *clock) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5830,13 +6078,18 @@ rte_eth_read_clock(uint16_t port_id, uint64_t *clock) if (*dev->dev_ops->read_clock == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->read_clock)(dev, clock)); + ret = eth_err(port_id, (*dev->dev_ops->read_clock)(dev, clock)); + + rte_eth_trace_read_clock(port_id, clock, ret); + + return ret; } int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5850,26 +6103,36 @@ rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info) if (*dev->dev_ops->get_reg == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->get_reg)(dev, info)); + ret = eth_err(port_id, (*dev->dev_ops->get_reg)(dev, info)); + + rte_ethdev_trace_get_reg_info(port_id, info, ret); + + return ret; } int rte_eth_dev_get_eeprom_length(uint16_t port_id) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->get_eeprom_length == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->get_eeprom_length)(dev)); + ret = eth_err(port_id, (*dev->dev_ops->get_eeprom_length)(dev)); + + rte_ethdev_trace_get_eeprom_length(port_id, ret); + + return ret; } int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5883,13 +6146,18 @@ rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info) if (*dev->dev_ops->get_eeprom == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->get_eeprom)(dev, info)); + ret = eth_err(port_id, (*dev->dev_ops->get_eeprom)(dev, info)); + + rte_ethdev_trace_get_eeprom(port_id, info, ret); + + return ret; } int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5903,7 +6171,11 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info) if (*dev->dev_ops->set_eeprom == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->set_eeprom)(dev, info)); + ret = eth_err(port_id, (*dev->dev_ops->set_eeprom)(dev, info)); + + rte_ethdev_trace_set_eeprom(port_id, info, ret); + + return ret; } int @@ -5911,6 +6183,7 @@ rte_eth_dev_get_module_info(uint16_t port_id, struct rte_eth_dev_module_info *modinfo) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5924,7 +6197,11 @@ rte_eth_dev_get_module_info(uint16_t port_id, if (*dev->dev_ops->get_module_info == NULL) return -ENOTSUP; - return (*dev->dev_ops->get_module_info)(dev, modinfo); + ret = (*dev->dev_ops->get_module_info)(dev, modinfo); + + rte_ethdev_trace_get_module_info(port_id, modinfo, ret); + + return ret; } int @@ -5932,6 +6209,7 @@ rte_eth_dev_get_module_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5959,7 +6237,11 @@ rte_eth_dev_get_module_eeprom(uint16_t port_id, if (*dev->dev_ops->get_module_eeprom == NULL) return -ENOTSUP; - return (*dev->dev_ops->get_module_eeprom)(dev, info); + ret = (*dev->dev_ops->get_module_eeprom)(dev, info); + + rte_ethdev_trace_get_module_eeprom(port_id, info, ret); + + return ret; } int @@ -5967,6 +6249,7 @@ rte_eth_dev_get_dcb_info(uint16_t port_id, struct rte_eth_dcb_info *dcb_info) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -5982,7 +6265,11 @@ rte_eth_dev_get_dcb_info(uint16_t port_id, if (*dev->dev_ops->get_dcb_info == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->get_dcb_info)(dev, dcb_info)); + ret = eth_err(port_id, (*dev->dev_ops->get_dcb_info)(dev, dcb_info)); + + rte_ethdev_trace_get_dcb_info(port_id, dcb_info, ret); + + return ret; } static void @@ -6018,6 +6305,8 @@ rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id, if (nb_tx_desc != NULL) eth_dev_adjust_nb_desc(nb_tx_desc, &dev_info.tx_desc_lim); + rte_ethdev_trace_adjust_nb_rx_tx_desc(port_id); + return 0; } @@ -6026,6 +6315,7 @@ rte_eth_dev_hairpin_capability_get(uint16_t port_id, struct rte_eth_hairpin_cap *cap) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -6040,13 +6330,18 @@ rte_eth_dev_hairpin_capability_get(uint16_t port_id, if (*dev->dev_ops->hairpin_cap_get == NULL) return -ENOTSUP; memset(cap, 0, sizeof(*cap)); - return eth_err(port_id, (*dev->dev_ops->hairpin_cap_get)(dev, cap)); + ret = eth_err(port_id, (*dev->dev_ops->hairpin_cap_get)(dev, cap)); + + rte_ethdev_trace_hairpin_capability_get(port_id, cap, ret); + + return ret; } int rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -6061,7 +6356,11 @@ rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool) if (*dev->dev_ops->pool_ops_supported == NULL) return 1; /* all pools are supported */ - return (*dev->dev_ops->pool_ops_supported)(dev, pool); + ret = (*dev->dev_ops->pool_ops_supported)(dev, pool); + + rte_ethdev_trace_pool_ops_supported(port_id, pool, ret); + + return ret; } static int @@ -6352,19 +6651,25 @@ rte_eth_representor_info_get(uint16_t port_id, struct rte_eth_representor_info *info) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; if (*dev->dev_ops->representor_info_get == NULL) return -ENOTSUP; - return eth_err(port_id, (*dev->dev_ops->representor_info_get)(dev, info)); + ret = eth_err(port_id, (*dev->dev_ops->representor_info_get)(dev, info)); + + rte_eth_trace_representor_info_get(port_id, info, ret); + + return ret; } int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -6383,8 +6688,12 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features) if (*dev->dev_ops->rx_metadata_negotiate == NULL) return -ENOTSUP; - return eth_err(port_id, - (*dev->dev_ops->rx_metadata_negotiate)(dev, features)); + ret = eth_err(port_id, + (*dev->dev_ops->rx_metadata_negotiate)(dev, features)); + + rte_eth_trace_rx_metadata_negotiate(port_id, *features, ret); + + return ret; } int @@ -6392,6 +6701,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id, struct rte_eth_ip_reassembly_params *reassembly_capa) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -6413,8 +6723,13 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id, return -ENOTSUP; memset(reassembly_capa, 0, sizeof(struct rte_eth_ip_reassembly_params)); - return eth_err(port_id, (*dev->dev_ops->ip_reassembly_capability_get) + ret = eth_err(port_id, (*dev->dev_ops->ip_reassembly_capability_get) (dev, reassembly_capa)); + + rte_eth_trace_ip_reassembly_capability_get(port_id, reassembly_capa, + ret); + + return ret; } int @@ -6422,6 +6737,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id, struct rte_eth_ip_reassembly_params *conf) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -6442,8 +6758,12 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id, if (*dev->dev_ops->ip_reassembly_conf_get == NULL) return -ENOTSUP; memset(conf, 0, sizeof(struct rte_eth_ip_reassembly_params)); - return eth_err(port_id, - (*dev->dev_ops->ip_reassembly_conf_get)(dev, conf)); + ret = eth_err(port_id, + (*dev->dev_ops->ip_reassembly_conf_get)(dev, conf)); + + rte_eth_trace_ip_reassembly_conf_get(port_id, conf, ret); + + return ret; } int @@ -6451,6 +6771,7 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id, const struct rte_eth_ip_reassembly_params *conf) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -6479,8 +6800,12 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id, if (*dev->dev_ops->ip_reassembly_conf_set == NULL) return -ENOTSUP; - return eth_err(port_id, - (*dev->dev_ops->ip_reassembly_conf_set)(dev, conf)); + ret = eth_err(port_id, + (*dev->dev_ops->ip_reassembly_conf_set)(dev, conf)); + + rte_eth_trace_ip_reassembly_conf_set(port_id, conf, ret); + + return ret; } int @@ -6578,8 +6903,12 @@ rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, uint32_t *ptypes return 0; for (i = 0, j = 0; all_types[i] != RTE_PTYPE_UNKNOWN; ++i) { - if (j < num) + if (j < num) { ptypes[j] = all_types[i]; + + rte_eth_trace_buffer_split_get_supported_hdr_ptypes( + port_id, j, ptypes[j]); + } j++; } diff --git a/lib/ethdev/rte_ethdev_cman.c b/lib/ethdev/rte_ethdev_cman.c index 4a1bdd7bd0..a9c4637521 100644 --- a/lib/ethdev/rte_ethdev_cman.c +++ b/lib/ethdev/rte_ethdev_cman.c @@ -8,12 +8,14 @@ #include "rte_ethdev.h" #include "ethdev_driver.h" #include "ethdev_private.h" +#include "ethdev_trace.h" /* Get congestion management information for a port */ int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -29,7 +31,11 @@ rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info) } memset(info, 0, sizeof(struct rte_eth_cman_info)); - return eth_err(port_id, (*dev->dev_ops->cman_info_get)(dev, info)); + ret = eth_err(port_id, (*dev->dev_ops->cman_info_get)(dev, info)); + + rte_eth_trace_cman_info_get(port_id, info, ret); + + return ret; } /* Initialize congestion management structure with default values */ @@ -37,6 +43,7 @@ int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -52,7 +59,11 @@ rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config) } memset(config, 0, sizeof(struct rte_eth_cman_config)); - return eth_err(port_id, (*dev->dev_ops->cman_config_init)(dev, config)); + ret = eth_err(port_id, (*dev->dev_ops->cman_config_init)(dev, config)); + + rte_eth_trace_cman_config_init(port_id, config, ret); + + return ret; } /* Configure congestion management on a port */ @@ -60,6 +71,7 @@ int rte_eth_cman_config_set(uint16_t port_id, const struct rte_eth_cman_config *config) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -74,7 +86,11 @@ rte_eth_cman_config_set(uint16_t port_id, const struct rte_eth_cman_config *conf return -ENOTSUP; } - return eth_err(port_id, (*dev->dev_ops->cman_config_set)(dev, config)); + ret = eth_err(port_id, (*dev->dev_ops->cman_config_set)(dev, config)); + + rte_eth_trace_cman_config_set(port_id, config, ret); + + return ret; } /* Retrieve congestion management configuration of a port */ @@ -82,6 +98,7 @@ int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config) { struct rte_eth_dev *dev; + int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; @@ -97,5 +114,9 @@ rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config) } memset(config, 0, sizeof(struct rte_eth_cman_config)); - return eth_err(port_id, (*dev->dev_ops->cman_config_get)(dev, config)); + ret = eth_err(port_id, (*dev->dev_ops->cman_config_get)(dev, config)); + + rte_eth_trace_cman_config_get(port_id, config, ret); + + return ret; } -- 2.25.1