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 9675B45459; Wed, 19 Jun 2024 12:08:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D53AA42DC9; Wed, 19 Jun 2024 12:08:19 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2095.outbound.protection.outlook.com [40.107.236.95]) by mails.dpdk.org (Postfix) with ESMTP id CDA8D42DBD for ; Wed, 19 Jun 2024 12:08:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LXF5DkTUj8unjkp/Wydi7SqQ1h0qnY6x3/UiSjny/b0hnU5Q0z26fujbwHOBkl5rwPFjh2Rw9EZJQ/UQJUCrOFEjHBgYPWuzUhfbZjJHTx+98I7z6G6haXStC9m8dgx7jU5odmrs0WKfLvLPcFqK3BIJRCkl7Gfjcq8UDCSi9LBxyYuVp9MVDjF0/AAGMzq1X2+U7sErXq+Xy9eP/fWQRe5UMLPh1yLltnSiKb4+LEtLVZ6CKFiZdsV1kpT0wJDMRDLvfth/+vnwJ+qfrEdKlN7OfTgU1+jeesVvVxBOy/WgtwPKhtfHkm9XPujZ87M5U5/z+HdEdF1ewM/C77Gl5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HblYqtPxhCPbiZ8OxK5vnUxVI7hvMGzvGn2ZqHjj6Ic=; b=DiT85rrCfEmXnIqCDGHa48ifKGoa30aZlgHZIxW3UGPKxQ7reftzmJqlS/fha5QgJ8xZGw/k1K/Sos8KVVU6s/j9C5mV7EewfAyJUz1LD8U6JISJ//aRe09bf61UUoLiaTQ8soQi4rpOTX8ws7E+CjJSABZGSI31JOaNAzJrWbPHE2Zwg+uSu31SC4lbbJPt4m9pYV8jvP7nYKsQ3irhwwr4dZT+kBIGbo9XNe748FvFL/TPjGPtYxsB6bK0nG+Dza9F2t8c5sZkwEkPi+7MDhtU3Pr1P+3JZjun/F2IV14I4jaW3x3Rr793yRHstN8T1t1jPz6WLIZLnZ5PiOhjPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HblYqtPxhCPbiZ8OxK5vnUxVI7hvMGzvGn2ZqHjj6Ic=; b=PNJRd39S04vHIBNVUP9+xl70OlPD6UJb+69cE/5S3TnUV0pkAdRb4EZ+1CveeopPa0Mk6tkNB4IhpWGbtplqHle86a8dpBjbUa/1dZsaeBKSJBssvNetflXrxWU5J+Y3Mw0mfJ8xH2hdLNQiTydyw+B7e+VATBhRdeaPOi+AsX8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by MWHPR13MB7153.namprd13.prod.outlook.com (2603:10b6:303:283::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.19; Wed, 19 Jun 2024 10:08:15 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7677.030; Wed, 19 Jun 2024 10:08:15 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH 2/7] net/nfp: add trace point about tunnel Date: Wed, 19 Jun 2024 18:07:49 +0800 Message-Id: <20240619100754.3480077-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240619100754.3480077-1-chaoyong.he@corigine.com> References: <20240619100754.3480077-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR06CA0003.namprd06.prod.outlook.com (2603:10b6:a03:d4::16) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|MWHPR13MB7153:EE_ X-MS-Office365-Filtering-Correlation-Id: e5cc0b3e-0e0a-458b-3b65-08dc9047bbe7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|52116011|376011|1800799021|366013|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?rb8ksQ9U7JhYuwN/C98CSUOpvCIgh8hBzLhPAP+Tnsnc30Sl1HXRRkJhTIjj?= =?us-ascii?Q?ZP5PyD0lFXumKUjNCIycBwtUdOw/AdGPjgcWTgpGOC6RraodviZqdP4eMz1G?= =?us-ascii?Q?h1SWLdyd0DvH1ZMYhnvCYvVG0R2aOctuqJ8Zc3HLKC3d1vMVuW2JWoFbZ5nV?= =?us-ascii?Q?wYkvT0V4gJDassH2rRVvJLdlr1LwmPPhBLgtm5EZU9zp7OVA8kMa0dtGqUi1?= =?us-ascii?Q?9EG1ZS67j0kFjttzBqULnDdNwF+HOHgskmaS9bnCzhGxgqcTgJGIAxxogfLf?= =?us-ascii?Q?QuAd0kKyTa58IH5TbREel/hQ8klRl8XEJ7XMrlx2bLeEyikZpd08u07GJqml?= =?us-ascii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qThM0CZLPAN7yMoLIhFMgLhIq8uVVz?= =?us-ascii?Q?Sw2LPtqlwEoL08VzL6BpHsAHoHleOJGuKOzXRSt0BCZdM3mF8zykIAUUeuxu?= =?us-ascii?Q?9szlQkXFREmbOChoAyDFphNN0QWeRaCdtc0hjZm1ZuLXMmIoXYdd/EyAztEC?= =?us-ascii?Q?M70bRnw=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(52116011)(376011)(1800799021)(366013)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?LPSFKtqgh92Rlug2R4yZrTahicEsmr8NjW1l+COMDXeyOzcMODA9dsNunywK?= =?us-ascii?Q?FhmFdypeShVAyzaCVWXkJFECbu5+5jRSkl182a7Kdfk1zd5/ZH+CURl+2WXo?= =?us-ascii?Q?BovKu+xqbxW6aBRItKRfj1Qv4HcbI3JsrtZRimHPrtnrv6oHhzBYSbojSRVk?= =?us-ascii?Q?a9B+AkvHOmIhs8P+pyK6JEqWR9WoQQkbTIQYNyZcCh7QZwSzW6lfUvz99h9q?= =?us-ascii?Q?zQzJgzNB4ofcNlgDLCC2FyKOdCewdzumzwPMZml4Rpx3S98dd8XHVL0x0Qui?= =?us-ascii?Q?YlI6kqof4Wlae/6BlbADRUp5aIydEL3KNCyevMJbKe+SH8dQzihrkuypG7x7?= =?us-ascii?Q?h0ihkDdnCwvhNcrgSU4PI2s68X5Pbp0Oy9cMfO8kEhuD6g+Yj82/Ij4EQYKR?= =?us-ascii?Q?TW9CgILdEl1l9H8pWnTobz00IGAf22QJYbPTtj0+0mWm0rIvdvqGbDgfQS2p?= =?us-ascii?Q?L1onOECHpeGmq4slGNh68Iu3D7JzmtIu3OS8YtQq4+R4nrvCs4D50R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lCRgGfRnw8Gfn88d6ennwoh5210bHvnnD6?= =?us-ascii?Q?LSdOvOxGiBRGzWRXoGE3tMs2HRdzuvsERgUKhcRvl1zn3FLW4Ar4xZ+D2Nax?= =?us-ascii?Q?XjHhZssahvO/Li+LjZ4PPU5G3cKYYwkQwNvhccRf0wseMAmx32m67RZrCHdw?= =?us-ascii?Q?GGg6e4zrJbwWseBIbt/mX3yPtRUkoHJFwOlOEfWVV5WRQC4j23JVTQxorhDo?= =?us-ascii?Q?8Q=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5cc0b3e-0e0a-458b-3b65-08dc9047bbe7 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 10:08:15.2254 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: npC/WG8Ht7C2VmblsCQZaq5fvS5x2pb8hqg/Y8wwkxYa29kt+RjZDp3+BRf3o2VP4f/qr4AW10o98uAhKFLEmz/HmPuuvp4z7R/A07HILKM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR13MB7153 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 Add 6 trace points of control message related with tunnel. Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_cmsg.c | 14 +++ drivers/net/nfp/nfp_trace.c | 18 +++ drivers/net/nfp/nfp_trace.h | 133 +++++++++++++++++++++++ 3 files changed, 165 insertions(+) diff --git a/drivers/net/nfp/flower/nfp_flower_cmsg.c b/drivers/net/nfp/flower/nfp_flower_cmsg.c index ff20938b69..30ce68b42d 100644 --- a/drivers/net/nfp/flower/nfp_flower_cmsg.c +++ b/drivers/net/nfp/flower/nfp_flower_cmsg.c @@ -288,6 +288,8 @@ nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower, return -EIO; } + rte_pmd_nfp_trace_cmsg_tun_neigh_v4("cmsg_tun_neigh_v4", msg); + return 0; } @@ -320,6 +322,8 @@ nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower, return -EIO; } + rte_pmd_nfp_trace_cmsg_tun_neigh_v6("cmsg_tun_neigh_v6", msg); + return 0; } @@ -363,6 +367,9 @@ nfp_flower_cmsg_tun_off_v4(struct nfp_app_fw_flower *app_fw_flower) return -EIO; } + for (uint32_t i = 0; i < count; i++) + rte_pmd_nfp_trace_cmsg_tun_off_v4("cmsg_tun_off_v4", &msg->ipv4_addr[i], i); + return 0; } @@ -406,6 +413,9 @@ nfp_flower_cmsg_tun_off_v6(struct nfp_app_fw_flower *app_fw_flower) return -EIO; } + for (uint32_t i = 0; i < count; i++) + rte_pmd_nfp_trace_cmsg_tun_off_v6("cmsg_tun_off_v6", &msg->ipv6_addr[i * 16], i); + return 0; } @@ -449,6 +459,8 @@ nfp_flower_cmsg_pre_tunnel_rule(struct nfp_app_fw_flower *app_fw_flower, return -EIO; } + rte_pmd_nfp_trace_cmsg_pre_tun("cmsg_pre_tun_rule", msg); + return 0; } @@ -484,6 +496,8 @@ nfp_flower_cmsg_tun_mac_rule(struct nfp_app_fw_flower *app_fw_flower, return -EIO; } + rte_pmd_nfp_trace_cmsg_tun_mac("cmsg_tun_mac", msg); + return 0; } diff --git a/drivers/net/nfp/nfp_trace.c b/drivers/net/nfp/nfp_trace.c index c1f90e167f..730ffaa32e 100644 --- a/drivers/net/nfp/nfp_trace.c +++ b/drivers/net/nfp/nfp_trace.c @@ -15,3 +15,21 @@ RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_port_repr_reify, RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_port_mod, pmd.net.nfp.cmsg.port.mod) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_tun_neigh_v4, + pmd.net.nfp.cmsg.tun.neigh_v4) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_tun_neigh_v6, + pmd.net.nfp.cmsg.tun.neigh_v6) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_tun_off_v4, + pmd.net.nfp.cmsg.tun.off_v4) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_tun_off_v6, + pmd.net.nfp.cmsg.tun.off_v6) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_pre_tun, + pmd.net.nfp.cmsg.tun.pre_tun) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_tun_mac, + pmd.net.nfp.cmsg.tun.mac_rule) diff --git a/drivers/net/nfp/nfp_trace.h b/drivers/net/nfp/nfp_trace.h index 5b8f855634..48a14efd3a 100644 --- a/drivers/net/nfp/nfp_trace.h +++ b/drivers/net/nfp/nfp_trace.h @@ -59,4 +59,137 @@ RTE_TRACE_POINT( rte_trace_point_emit_u16(mtu); ) +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_tun_neigh_v4, + RTE_TRACE_POINT_ARGS(const char *name, void *cmsg), + + rte_trace_point_emit_string(name); + + struct nfp_flower_cmsg_tun_neigh_v4 *msg = cmsg; + uint32_t dst_ipv4 = rte_be_to_cpu_32(msg->dst_ipv4); + uint32_t src_ipv4 = rte_be_to_cpu_32(msg->src_ipv4); + + rte_trace_point_emit_u32(dst_ipv4); + rte_trace_point_emit_u32(src_ipv4); + + struct nfp_flower_tun_neigh *common = &msg->common; + uint8_t dst_mac_len = RTE_ETHER_ADDR_LEN; + uint8_t src_mac_len = RTE_ETHER_ADDR_LEN; + uint8_t *dst_mac = &common->dst_mac[0]; + uint8_t *src_mac = &common->src_mac[0]; + uint32_t port_id = rte_be_to_cpu_32(common->port_id); + + rte_trace_point_emit_blob(dst_mac, dst_mac_len); + rte_trace_point_emit_blob(src_mac, src_mac_len); + rte_trace_point_emit_u32(port_id); + + struct nfp_flower_tun_neigh_ext *ext = &msg->ext; + uint16_t vlan_tpid = rte_be_to_cpu_16(ext->vlan_tpid); + uint16_t vlan_tci = rte_be_to_cpu_16(ext->vlan_tci); + uint32_t host_ctx = rte_be_to_cpu_32(ext->host_ctx); + + rte_trace_point_emit_u16(vlan_tpid); + rte_trace_point_emit_u16(vlan_tci); + rte_trace_point_emit_u32(host_ctx); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_tun_neigh_v6, + RTE_TRACE_POINT_ARGS(const char *name, void *cmsg), + + rte_trace_point_emit_string(name); + + struct nfp_flower_cmsg_tun_neigh_v6 *msg = cmsg; + uint8_t dst_ipv6_len = 16; + uint8_t src_ipv6_len = 16; + uint8_t *dst_ipv6 = &msg->dst_ipv6[0]; + uint8_t *src_ipv6 = &msg->src_ipv6[0]; + + rte_trace_point_emit_blob(dst_ipv6, dst_ipv6_len); + rte_trace_point_emit_blob(src_ipv6, src_ipv6_len); + + struct nfp_flower_tun_neigh *common = &msg->common; + uint8_t dst_mac_len = RTE_ETHER_ADDR_LEN; + uint8_t src_mac_len = RTE_ETHER_ADDR_LEN; + uint8_t *dst_mac = &common->dst_mac[0]; + uint8_t *src_mac = &common->src_mac[0]; + uint32_t port_id = rte_be_to_cpu_32(common->port_id); + + rte_trace_point_emit_blob(dst_mac, dst_mac_len); + rte_trace_point_emit_blob(src_mac, src_mac_len); + rte_trace_point_emit_u32(port_id); + + struct nfp_flower_tun_neigh_ext *ext = &msg->ext; + uint16_t vlan_tpid = rte_be_to_cpu_16(ext->vlan_tpid); + uint16_t vlan_tci = rte_be_to_cpu_16(ext->vlan_tci); + uint32_t host_ctx = rte_be_to_cpu_32(ext->host_ctx); + + rte_trace_point_emit_u16(vlan_tpid); + rte_trace_point_emit_u16(vlan_tci); + rte_trace_point_emit_u32(host_ctx); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_tun_off_v4, + RTE_TRACE_POINT_ARGS(const char *name, void *cmsg, uint32_t idx), + + rte_trace_point_emit_string(name); + rte_trace_point_emit_u32(idx); + + rte_be32_t *msg = cmsg; + uint32_t ipv4_addr = rte_be_to_cpu_32(*msg); + + rte_trace_point_emit_u32(ipv4_addr); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_tun_off_v6, + RTE_TRACE_POINT_ARGS(const char *name, void *cmsg, uint32_t idx), + + rte_trace_point_emit_string(name); + rte_trace_point_emit_u32(idx); + + uint8_t *ipv6_addr = cmsg; + uint8_t len = 16; + + rte_trace_point_emit_blob(ipv6_addr, len); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_pre_tun, + RTE_TRACE_POINT_ARGS(const char *name, void *cmsg), + + rte_trace_point_emit_string(name); + + struct nfp_flower_cmsg_pre_tun_rule *msg = cmsg; + uint32_t flags = rte_be_to_cpu_32(msg->flags); + uint16_t port_idx = rte_be_to_cpu_16(msg->port_idx); + uint16_t vlan_tci = rte_be_to_cpu_16(msg->vlan_tci); + uint32_t host_ctx_id = rte_be_to_cpu_32(msg->host_ctx_id); + + rte_trace_point_emit_u32(flags); + rte_trace_point_emit_u16(port_idx); + rte_trace_point_emit_u16(vlan_tci); + rte_trace_point_emit_u32(host_ctx_id); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_tun_mac, + RTE_TRACE_POINT_ARGS(const char *name, void *cmsg), + + rte_trace_point_emit_string(name); + + struct nfp_flower_cmsg_tun_mac *msg = cmsg; + uint16_t flags = rte_be_to_cpu_16(msg->flags); + uint16_t count = rte_be_to_cpu_16(msg->count); + uint16_t index = rte_be_to_cpu_16(msg->index); + uint8_t len = RTE_ETHER_ADDR_LEN; + uint8_t *addr_bytes = &msg->addr.addr_bytes[0]; + + rte_trace_point_emit_u16(flags); + rte_trace_point_emit_u16(count); + rte_trace_point_emit_u16(index); + rte_trace_point_emit_blob(addr_bytes, len); +) + #endif /* __NFP_TRACE_H__ */ -- 2.39.1