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 1CDB3455C0; Mon, 8 Jul 2024 04:46:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E27740BA6; Mon, 8 Jul 2024 04:46:13 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2118.outbound.protection.outlook.com [40.107.236.118]) by mails.dpdk.org (Postfix) with ESMTP id 8EF8A402D3 for ; Mon, 8 Jul 2024 04:46:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j/F1eVAmxqftm0fQdPk/qUYmC4O49WxvMcSkgVwjGehLKn6/auQE/Mw1q8n2G5C3iOkigXDNEFx+7Su1OYB2RryEFBzBYP9kJgKnU1oGAa28ZofcntVNsStf8NT4n708dHMqzQGlpVwqZ+cqxPvfycKjgowNrwvZCoj5ebLXVaPlVSe3krQgLK/rzvaggOMqDhpOG7UxvkChasF1s6Bub1l4jEAtGYRq/qi7FtBdz4bYngiZt2SmDcH9NmytcTZTH/P7pjPqeaK77xYSRoNWuqotgTQyy3ElK7My9xYeta1Px+Lk/+sWSxE/DrfOv5VxMPqT8VqDIP1zQ26Sigiqqw== 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=G6l5GNxUPB+8W0hAlX3MW5YW1zI797oOIHRs333fC2L2XdiUR6Ys/TA2nw5dLuZokt+S5+x0FONV4danjut+r8Hvetd/etq6DP97C1hBFxFlFhvMEmZpHgQFAlgbi2DzUcHyNZMJG4R85H0vOP3NDQv/A1A6J85sfNrNrvdlDYBxoVU7ed6/Dixt8IcNbrjqCsUsoMnEadelxYyQPES8eFoPBAnRl7Igs1KHzp4K9tPGwfa73B1jwORovH6/yro9jsttWv/T7N2gxA25dCXrMMjCH+mUhU99evQqlrIjgnBAoP487knrvm73toS0LPFqm6xGquTJF03/nstvJVbFhw== 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=H6ezD5WM4k0I7TK9EhAepjitsYRuROOVLhnK7XJPVsKnhT6W+BcYQrepzazckadaMtcrW6HcSHcc8Lat+cBCGvLb3bAtqBjHNQCfr9UEbAhOkqEQmddIre40pmOXFIuZzYne3EQuCmAdzrgmbm/hcsugVmPlh9dyu3GiWv9+Uxw= 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 LV8PR13MB6624.namprd13.prod.outlook.com (2603:10b6:408:22c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.35; Mon, 8 Jul 2024 02:46:09 +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.7741.033; Mon, 8 Jul 2024 02:46:09 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH v2 2/7] net/nfp: add trace point about tunnel Date: Mon, 8 Jul 2024 10:45:38 +0800 Message-Id: <20240708024543.77126-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240708024543.77126-1-chaoyong.he@corigine.com> References: <20240619100754.3480077-1-chaoyong.he@corigine.com> <20240708024543.77126-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0272.namprd03.prod.outlook.com (2603:10b6:a03:39e::7) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|LV8PR13MB6624:EE_ X-MS-Office365-Filtering-Correlation-Id: 49938e2f-ee6e-4405-c5dd-08dc9ef81eea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Wa+IsKR01mimrFBVdkJFgbtaqQFM4Kq2/xQTnA6qPK2H7SikrKttXJ5iPY9u?= =?us-ascii?Q?voWchmIDJe+un+wueCpQPmGEhYZCFzyAAn733eWupKXXxDNR4mHy1RxLc+HU?= =?us-ascii?Q?90VPPlxWS5rVi0qTZrKnYXdiB7cFaX4lXVHvY9S5NmndtrWdgHoq5koLrBKy?= =?us-ascii?Q?XD3E8mp2fAyNtNz83QtjgKwtACkmsWMydsStyJncLwd3q3Tpz8SO5LWjS9y3?= =?us-ascii?Q?rafdioruJQ++OzpKAY9BVlyjQAX6lCwJ1YzpwupRHDAhbcJGWPyMZICZPnbB?= =?us-ascii?Q?7apLIL07EpsbtX1Wd3Mkzj+QXfZfb+4egsI5FSUD8a/oS3b9iH61jFBMkmj9?= =?us-ascii?Q?qGyCGllrtceL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ascii?Q?P/4jqzU91sWzTzAjtdgQ2MspU8WkTU1XDyApSLofSkCB6Z2raMxNuRoR6MAy?= =?us-ascii?Q?DBKaIhBGyQB0yttPgUJj8/FI9KhYNA5+Ml3nHLY2Mvy7e79Kx4eLqBpgFgKm?= =?us-ascii?Q?R43cMCFgnQJ597s8VxqdldCW3/ZQ1pumfwiOBS2F6mazDM9tnw=3D=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:(13230040)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9Us87zLWLEUucl/hwvsHfIKmhhQvzBRFVJrKwOLvk7BAap/Z9joHGm88ATxg?= =?us-ascii?Q?IKbQsUNB6q8WW9lE8P75uQhB825i7D/ZZsK1hAIVDDEHWyetBUAX2+fmfaGc?= =?us-ascii?Q?uJQeqd7OhShGAvC4JpDy5CB+PF+Sq8vxtjZ6kBL0YUeZ2r/6Gaa2pU/AYENs?= =?us-ascii?Q?82Fl53eufiDNb/e+6X0QCTcCm2T7xHZaCf2wkLRRKz/EXTXhANbWdUI7mlNr?= =?us-ascii?Q?Irf59pLKB22LBtOHAnQc5fs8X0q/Hr6G7mZCae5ZWZux6Y4sSyV2ByfcjnKq?= =?us-ascii?Q?iG6k0kTEKjxhoQpV/Ct76smSABRwUXnwN0qiYNtQwJmq01DgHjN25CLcUtPO?= =?us-ascii?Q?HH94XkLaFM6xgdm8PAqOMHohYL6YMJ0K7kUwIh10hvqoT5Oqg8kJOhII4Cwm?= =?us-ascii?Q?R241uWEKNxTMK1QACuilml5/XWd3J903qp0zpRAW8SHu0fT2m+/445O3mSvx?= =?us-ascii?Q?Q9spPbZEKKymsCG72cgUvA2E5vJq5kwqt1OCb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FPEeuM5OdJHyKeRoaa2zrEJ4Kh0PVkAEp6PCD0BRo+Q0qiyQr3?= =?us-ascii?Q?uhFOvPFa7ziaW2FwbGIbXJoTlC/J6IHJxVFf96SIqtcmxRvoHDIrBx9faBJh?= =?us-ascii?Q?DBU+84NgFRkxc8uR5eK7b+THe+abvCzKlFBzhquuzMyPo8mNj3yNC2zEpMt/?= =?us-ascii?Q?MuWFPsbVIoHOboL1TZYRgKN1GcpJ3f5LRqvwWZ2rmW3Rqt8qqaRvoJ3nLUWF?= =?us-ascii?Q?mg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49938e2f-ee6e-4405-c5dd-08dc9ef81eea X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2024 02:46:08.9964 (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: 6DMFdfxwWgrKVwM+8IEDfix/095fNU33JxHvQPh2gKvhh6Np7J5IBBbehSoFczhHjHvVgsdt14YrJh+BTnhMSKFLF9nta4Ais6sp7Fv9+Dg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR13MB6624 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