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 4BE4D455C0; Mon, 8 Jul 2024 04:46:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D39040DF5; Mon, 8 Jul 2024 04:46:18 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2105.outbound.protection.outlook.com [40.107.243.105]) by mails.dpdk.org (Postfix) with ESMTP id 0AE6740BA5 for ; Mon, 8 Jul 2024 04:46:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AkZbWdtMx3OEBKM3ZyW2S1uhoe8u1Lr1bbly0gA7JWrmZc1fz8zUhG/te/weJHvUWFR5YXGmZ4USVTstKjsk8pSPqT1Qz6LrV7t8b1Si2i8v2QVlbkZpb4X8XdI9RMwpp2/tE2YTzJKTqKxzR+tVcFZh8ru4QOxjhK72MokHTubfgo4lwLR66sXn1lkSPLcHMDgOaSY/4s2F+xiUi9araqEmco9LbuzbXlPOoHoe1UEBtBiyKKM7nBN30cLSyZ9z2/2tXf/+UtDtwb0P+UxoxcSk40HmdYMojrxk5wGDYFSl+w+oEQ3BnVSMEos+nmQqJv9jYYDcIRaOrFEToECAMw== 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=DK4MR+jRPXX3VnsEZJ29p469zJATULS/N8hA7Uq2Zd4=; b=PVPMwlVpz4rdfd6oWMbfNnHLawTEcT0uC8wIH7CkkEZMD9DELCbwXIJ/MaQcbOfp7Gn7cP9Ov/aBR0O6uaaAitM27nlcUSGULtxjA0l4Kt1qRj6a/2MBxUB3A8idst8tC3OmCHOS7hVIjhx9GBUaRW/yPfpXMcQrIHb2H/FRGEnkhxnaucmivS0fsJtBQ49FVJHqc8NCgWZx94xgTXtuTwOa/3OKsiDRZ2kOCh37mWEDpVTPnakD7JqC43M0T/lfbMylqDxnHcOAnYH+4ZWnUN+QGdq2k9GSwa+Yx6pfB62LonST+d1PPS4KXV5UN+UD1Yzx2YhNkC6tgIESzxnTvg== 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=DK4MR+jRPXX3VnsEZJ29p469zJATULS/N8hA7Uq2Zd4=; b=g3pTnLqRa6ZXWDPjhyWsbPtnmWaX+qh7E1J38X19PKXAEaRxADgTpJdQEep7DQLOnrtoaDjiic9gZ4Yu8gtappZhZhLY1F2AushUktnY+KLrmt7SnQ506viYQPT9qh/+Um34CBZJ5f1XTCW5SDzRapr3pWx0sP7jqpRNyyjO2cM= 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 SA1PR13MB5069.namprd13.prod.outlook.com (2603:10b6:806:1a3::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Mon, 8 Jul 2024 02:46:14 +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:14 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH v2 5/7] net/nfp: add trace point about flow rule Date: Mon, 8 Jul 2024 10:45:41 +0800 Message-Id: <20240708024543.77126-6-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_|SA1PR13MB5069:EE_ X-MS-Office365-Filtering-Correlation-Id: d03f4530-45e4-4df4-855b-08dc9ef82231 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?DedPbzZKrBCuCHMav1E5AgCHoeNTg5vGk0Ltr19JfMulo/+ZFFIUEsRTfzhi?= =?us-ascii?Q?BdKXdXd89oAtnRYSihI5I2iqq2db8RdR5esBtB0povMELtZnC62dXQNFQ2zr?= =?us-ascii?Q?Jrt6xy6fXB70yw6a95o4Iz9+CyJO6l3vk26aC4A60ntD6mNZuVUD/LikmjKI?= =?us-ascii?Q?IHSN8KjiWhI9xxj8hf/MRGSoV3RC+tHn3kJtbVMLzBT3LC1D6YbxEiPAgHj2?= =?us-ascii?Q?+BJ9w1uzY5v2xVhQdu2y6Irq42br68iC2LfmtL8Vmykhp4bxzmP+kFisSzzk?= =?us-ascii?Q?YnqlbnS8ZOXwz7Y/Q2UPgysZkGbzrKcbwSM0ulcqhL2zYba70pv1ZUCy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E+SC3BSe4IvV1ru9vIn0fo5bDTWHJ5t?= =?us-ascii?Q?A4ODhXXf+i5ZpsJ2xCo/g5njfHm3FzlERyqmNOth4wLF4nzShBpeD8yEyxYd?= =?us-ascii?Q?GKzhMWBm8y0VAEEQU7BPdSutnTixNM8skj4SzHnqRbnyinQT0jYQvPuQtPZc?= =?us-ascii?Q?/9JpgqgTdaP4lQzxNQ9khkbOVSd5WPvO66uSaYoR+/zgc7vV6w=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)(1800799024)(366016)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?J9vYHRgPT2TF3csSmMSGPBwxzwVbcGvQo5cAhwaYZxS1WFpVFd0JmQUGtznP?= =?us-ascii?Q?Lc6R3uKsmcX3JQnbyk8FIWNwPpPx8KWPZz6XKH8Sl8FtAPtiv+rv+xP3bQY0?= =?us-ascii?Q?0iHhPrCUuT53lamPYouZuUrvx7jMSZm5iTGCTWKlgQZp+eJ/97sJsHvjsxLX?= =?us-ascii?Q?E+ooKKi/iWSpKup+O70NdLtv+KGLikJI/pqUcCmc6MAfkI1Y+KlDP1vypDls?= =?us-ascii?Q?eK9UKy0jCZULuC8M37CXvSgMG0VA+qTpCduK1qMjDW+pmq+UaaM4TUuLfv16?= =?us-ascii?Q?v/lmhhkxHQf71G1X4hhBF1+Wrl2oNbCdH9vmgBP4GZ+AorWDgrMd5DExeO6V?= =?us-ascii?Q?hwlDpaqrl0OesMH2XCdAZq8WwP4lgaSCx6IVH2NEXboEpELZkBQ0PY7gpMMx?= =?us-ascii?Q?gpBZ7FcsU1OmmI6Uzt+ytN3Diev9xWVR0Xi00zOY8NfhwdrE5L4AFdMNmNas?=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NEoPC1NIqmCJfrRHxgTvMJ3iYfr2u1KBnHHqCdh?= =?us-ascii?Q?jx9wAWSZzlPqfiQnvpiG6gaDI7wpfuMfjENkofOVWwToHxBAT1+RwnIOBK8T?= =?us-ascii?Q?U/LB6br1WOyxNXs4b4xbvqdEPQIKk2ce2dtWrz7ya4fVh2qufMlTPvlZpw+P?= =?us-ascii?Q?Xvukg6D/bdRvg8AhTtaauSKcTZesgbkEkC6gzZmO1GLhE8AXd9Pp4hUFjwvL?= =?us-ascii?Q?kvjS/yCDF5l22Wq12SokFjg6p1W5wjFGvjfeTQwpR6mb9cLKHNb1GrJZ1iUe?= =?us-ascii?Q?wA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: d03f4530-45e4-4df4-855b-08dc9ef82231 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:14.5031 (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: TpOre3OVrPpZmoJG/xUdcDJ3FrJXaMfNyVk744g/eL/HzcWe08tOvQTeR2ma0FQdHe4sI6pVvSm10JvIuDN2D/cT2dxGA8k40hOQ5RH7gUM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB5069 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 the trace point of control message related with flow rule meta data. Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_cmsg.c | 12 ++++++++++++ drivers/net/nfp/nfp_trace.c | 6 ++++++ drivers/net/nfp/nfp_trace.h | 22 ++++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/drivers/net/nfp/flower/nfp_flower_cmsg.c b/drivers/net/nfp/flower/nfp_flower_cmsg.c index b07cea9921..9035a9df4f 100644 --- a/drivers/net/nfp/flower/nfp_flower_cmsg.c +++ b/drivers/net/nfp/flower/nfp_flower_cmsg.c @@ -189,6 +189,14 @@ nfp_flower_cmsg_port_mod(struct nfp_app_fw_flower *app_fw_flower, return 0; } +static void +nfp_flower_trace_cmsg_flow(const char *msg, + struct nfp_fl_payload *payload) +{ + rte_pmd_nfp_trace_cmsg_flow(msg); + rte_pmd_nfp_trace_cmsg_flow_meta(payload->meta); +} + int nfp_flower_cmsg_flow_delete(struct nfp_app_fw_flower *app_fw_flower, struct rte_flow *flow) @@ -221,6 +229,8 @@ nfp_flower_cmsg_flow_delete(struct nfp_app_fw_flower *app_fw_flower, return -EIO; } + nfp_flower_trace_cmsg_flow("cmsg_flow_delete", &flow->payload); + return 0; } @@ -256,6 +266,8 @@ nfp_flower_cmsg_flow_add(struct nfp_app_fw_flower *app_fw_flower, return -EIO; } + nfp_flower_trace_cmsg_flow("cmsg_flow_add", &flow->payload); + return 0; } diff --git a/drivers/net/nfp/nfp_trace.c b/drivers/net/nfp/nfp_trace.c index 529399e1a8..d49fb85259 100644 --- a/drivers/net/nfp/nfp_trace.c +++ b/drivers/net/nfp/nfp_trace.c @@ -36,3 +36,9 @@ RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_tun_mac, RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_qos_rule, pmd.net.nfp.cmsg.qos.rule) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_meta, + pmd.net.nfp.cmsg.flow.meta) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow, + pmd.net.nfp.cmsg.flow) diff --git a/drivers/net/nfp/nfp_trace.h b/drivers/net/nfp/nfp_trace.h index 5f8f3c373b..e0b8b0cee9 100644 --- a/drivers/net/nfp/nfp_trace.h +++ b/drivers/net/nfp/nfp_trace.h @@ -221,4 +221,26 @@ RTE_TRACE_POINT( rte_trace_point_emit_u32(cir); ) +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_meta, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_rule_metadata *meta = cmsg; + rte_trace_point_emit_u8(meta->key_len); + rte_trace_point_emit_u8(meta->mask_len); + rte_trace_point_emit_u8(meta->act_len); + rte_trace_point_emit_u8(meta->flags); + rte_trace_point_emit_u32(meta->host_ctx_id); + rte_trace_point_emit_u64(meta->host_cookie); + rte_trace_point_emit_u64(meta->flow_version); + rte_trace_point_emit_u32(meta->shortcut); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow, + RTE_TRACE_POINT_ARGS(const char *name), + + rte_trace_point_emit_string(name); +) + #endif /* __NFP_TRACE_H__ */ -- 2.39.1