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 0519B45459; Wed, 19 Jun 2024 12:09:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A59142E74; Wed, 19 Jun 2024 12:08:29 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2091.outbound.protection.outlook.com [40.107.102.91]) by mails.dpdk.org (Postfix) with ESMTP id 5E65142E63 for ; Wed, 19 Jun 2024 12:08:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SCdzoPtC/BsIl14qncXZ0dPk4JkR28X0v6SyZvjkkmL+FEY0fGcl2EKQ0sB3Ek8dMJM0D4EDg7ZM834LAiy3YbslN77jM9Bx7fTLwDJO94wTawoWQxHbGm3cJheQggBX2lSp9z1LmbqvZPNNwilTNxpTdXRyqzNhKxVgcovTZnVzXXV7f79GS+W4phYnPaVeMxYmN//R3Oy8KFhfZxfH/n0tjPKaolC8r0JV4qUtUpVzuDn9R4aBOUxSGl6somp4iac53evvAi88+CqQRHeIRS4FYUL6X2B4ZIvlruBGvvcbEwdZgpFlDGm3HQQ/l96vDfdaUWVXrqE6w/zP9WiRqw== 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=2YJSpeLfeDeyXEx1lvoExYKM+GIV+2i39wb1asBb/uE=; b=eqxGHfLRJ8FHkRE6z4L8vnehmSMD69uF/ODj+lNxMSdjWX8R0RUDiBJW1/eirkXczFK8OJAUrClmNVHsebnhLyK3spGhF4s9wEPPL+rpJCPJ2a+Hia9EDLacnlILDIBuSGNi3HyfGEcXTAGLA4LXRvj7EeGo0J49j2hZuiLvWeG4aZ3VkqwHz7jw05uQXZCPtKrGbY9kffsPJldEmzaJMmAIubGs0A7W7qyfw6TVJJmxOj2FYqxgsWhqMjUuupG09h+TtHYj/SI4X5PwBTaCnycGlTSNIXC7GlfQCsrL17wFy6duXlJtDEzV8sVT8EONyLFXFxoQC9PT0YHZnXlEcg== 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=2YJSpeLfeDeyXEx1lvoExYKM+GIV+2i39wb1asBb/uE=; b=cjXpNmD67n02f8EB7ixn3Fs8ih3UAed5E4hLI+0bVutpB0HplP2Cv1lM7hO9a/rorGDq8/t2bzm7jrISjxxz80bnS/6Sc+6zgchEn1hNcdumCWbusQwOTGW2WIBfXb6rY6wZPGMiEDDOwP3q8B/nxFyUR/fa5/BBpoH+X2vn7KY= 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 BLAPR13MB4691.namprd13.prod.outlook.com (2603:10b6:208:306::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.20; Wed, 19 Jun 2024 10:08:25 +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:25 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH 7/7] net/nfp: add trace point about flow rule action Date: Wed, 19 Jun 2024 18:07:54 +0800 Message-Id: <20240619100754.3480077-8-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_|BLAPR13MB4691:EE_ X-MS-Office365-Filtering-Correlation-Id: c1e6757d-9c2b-4a13-587a-08dc9047c1d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|1800799021|366013|52116011|376011|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8CdeDcD5/KffvXV59+GT2FTJBpLZCPicXTr/AWYrvVv8z2ae1CDc1Oys/ZvF?= =?us-ascii?Q?UZuzJgMh6r9UfogSnSzRWcisileOjj+zg8gAkxIYgk733Fl9qAl7en7lIftE?= =?us-ascii?Q?vTYYiraC/GBuvV8c8t52bZo8MIhP8JsfBwy3nPlbkuQ2r39YHDRg16y6gJac?= =?us-ascii?Q?Fr6wBunbBdefI8HyjFhDYX/3H+Yk6VbFGSDgNZrhftVKvyw2RXmKMl+mSjd+?= =?us-ascii?Q?ZWO3SaGCx4s4/l8TReybNVEnrjDtKu67/PNttjXBa5YacSuYtOO8Jtn1eaiu?= =?us-ascii?Q?HcTHp+CCOb5zxvC5WdKiGx662FF7h+Tc1dKIfi+p4Z0Zh36G5D5RVL1vgHAu?= =?us-ascii?Q?fyEJUgaqgruqNlXxdE66PwzgTw0Slu2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BztgH6Fo1SzabPAO?= =?us-ascii?Q?09Bncw8XLLf9qh1LFPGTcOQRGiEVo6shmcTQ1KPfB5eeKsw5U8+nIgvNxjoc?= =?us-ascii?Q?mMGq2zlZFWQXPeqjiKSMNxfYrBk959b43TQ0+yDDW2C7WvhvbC8cQLjIMrQm?= =?us-ascii?Q?bg3dReI=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)(1800799021)(366013)(52116011)(376011)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5EdVVPPS5Gy+VyAky3psPtEGeGTFYRdH+HBoZB9eFXtYoMb/MLg883JXtxrW?= =?us-ascii?Q?gOspQSZFEbIc1a7HhwWJNWZuvN20p0Q/bCDVI0ssefnlmq3Df1iHcQe/fjj2?= =?us-ascii?Q?oV92YmsEirtaKNxA/jHxncdSwEot2bBS9GZdNfLTWmXxHQZV6Im9k+TTuPW+?= =?us-ascii?Q?QcJHf72PG/93LIQ0j2z2TVUZ3M7L14qKjD+3ZDx+eDBiKGDJonK0x61xdTVB?= =?us-ascii?Q?795orJX7tnR6104nbLOeue81jKlwHdDm19b/kVsTQpVdQ47hP5nwAt/355ix?= =?us-ascii?Q?FqDjYEEvJp3b6IOUyxE/wGYzIFfWIvg8evxF38DzRSdhMvhTUbyDzkMwW5O6?= =?us-ascii?Q?2gZOlazMh2JW/UafbU/TOuEqwfHBC3zbrr5T0WBCGCfAYuhZaclY0uXAfZA4?= =?us-ascii?Q?ubNR7RPJrmQPIONnMYzGgmqzarIIAlHpugc31EdOrNmCoOQwJ04H45UDHTsn?= =?us-ascii?Q?PX1iOUnlw9K5xCv1dLRPiC6ZsN8vjvrsuSTMnaaAqutRNlxeU0HE2HRaXJ6s?= =?us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4LaLqvIyx/5LRhbC6tg1+7OIofv5Q?= =?us-ascii?Q?ox9ScCZOef+P1RB02sD+uZ2Bre7+1aw1pXeQIqDkCXTGvK/k/FfTpC1S+v9E?= =?us-ascii?Q?BQjWyQmeiLSZJ7sFTVByTOtShwozqT7aLzeI/Akyk6MJ2VLZhEirjI+sXSHt?= =?us-ascii?Q?gzuwASDQP4aoG1sCeMHxomN/zFzO7mnCO1/Y3jpV6iP0WzOtrb7kSgfv9d5K?= =?us-ascii?Q?Wg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1e6757d-9c2b-4a13-587a-08dc9047c1d9 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:25.1700 (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: EWf68w2fFoBQu+urBVt8YEQiflrbpGgevSZaykWDdWF2SEGdYQ5rI7OM1bPxIKrgDRpN6CUaFJo78XX1184CaQXFZWXBnccCfLGghu6T2sE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR13MB4691 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 13 trace points of control message related with flow rule action list. Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_cmsg.c | 78 ++++++ drivers/net/nfp/nfp_trace.c | 39 +++ drivers/net/nfp/nfp_trace.h | 298 +++++++++++++++++++++++ 3 files changed, 415 insertions(+) diff --git a/drivers/net/nfp/flower/nfp_flower_cmsg.c b/drivers/net/nfp/flower/nfp_flower_cmsg.c index 3b492c94ce..bd1fa71d9b 100644 --- a/drivers/net/nfp/flower/nfp_flower_cmsg.c +++ b/drivers/net/nfp/flower/nfp_flower_cmsg.c @@ -339,14 +339,92 @@ nfp_flower_trace_cmsg_flow_pattern(char *cmsg, PMD_DRV_LOG(ERR, "Cmsg flow pattern overlap"); } +static void +nfp_flower_trace_cmsg_flow_action(char *cmsg, + uint8_t len) +{ + uint8_t len_tmp; + + if (len == 0) { + PMD_DRV_LOG(ERR, "Cmsg flow action length is 0"); + return; + } + + for (len_tmp = 0; len_tmp < len;) { + struct nfp_fl_act_head *head = (struct nfp_fl_act_head *)(cmsg + len_tmp); + + switch (head->jump_id) { + case NFP_FL_ACTION_OPCODE_OUTPUT: + rte_pmd_nfp_trace_cmsg_flow_action_output(head); + break; + case NFP_FL_ACTION_OPCODE_PUSH_VLAN: + rte_pmd_nfp_trace_cmsg_flow_action_push_vlan(head); + break; + case NFP_FL_ACTION_OPCODE_POP_VLAN: + rte_pmd_nfp_trace_cmsg_flow_action_pop_vlan(head); + break; + case NFP_FL_ACTION_OPCODE_SET_TUNNEL: + rte_pmd_nfp_trace_cmsg_flow_action_set_tun(head); + break; + case NFP_FL_ACTION_OPCODE_SET_ETHERNET: + rte_pmd_nfp_trace_cmsg_flow_action_set_eth(head); + break; + case NFP_FL_ACTION_OPCODE_SET_IPV4_ADDRS: + rte_pmd_nfp_trace_cmsg_flow_action_set_ipv4_addr(head); + break; + case NFP_FL_ACTION_OPCODE_SET_IPV4_TTL_TOS: + rte_pmd_nfp_trace_cmsg_flow_action_set_ipv4_ttl_tos(head); + break; + case NFP_FL_ACTION_OPCODE_SET_IPV6_SRC: + /* FALLTHROUGH */ + case NFP_FL_ACTION_OPCODE_SET_IPV6_DST: + rte_pmd_nfp_trace_cmsg_flow_action_set_ipv6_addr(head); + break; + case NFP_FL_ACTION_OPCODE_SET_IPV6_TC_HL_FL: + rte_pmd_nfp_trace_cmsg_flow_action_set_ipv6_tc_hl_fl(head); + break; + case NFP_FL_ACTION_OPCODE_SET_TCP: + /* FALLTHROUGH */ + case NFP_FL_ACTION_OPCODE_SET_UDP: + rte_pmd_nfp_trace_cmsg_flow_action_set_tp(head); + break; + case NFP_FL_ACTION_OPCODE_PRE_TUNNEL: + rte_pmd_nfp_trace_cmsg_flow_action_pre_tun(head); + break; + case NFP_FL_ACTION_OPCODE_METER: + rte_pmd_nfp_trace_cmsg_flow_action_meter(head); + break; + case NFP_FL_ACTION_OPCODE_SET_PARTIAL: + rte_pmd_nfp_trace_cmsg_flow_action_set_partial(head); + break; + default: + PMD_DRV_LOG(ERR, "Cmsg flow action not support"); + return; + } + + len_tmp += head->len_lw << NFP_FL_LW_SIZ; + } + + if (len_tmp > len) { + PMD_DRV_LOG(ERR, "Cmsg flow action length error"); + return; + } +} + static void nfp_flower_trace_cmsg_flow(const char *msg, struct nfp_fl_payload *payload) { + struct nfp_fl_rule_metadata *nfp_flow_meta; + rte_pmd_nfp_trace_cmsg_flow(msg); rte_pmd_nfp_trace_cmsg_flow_meta(payload->meta); nfp_flower_trace_cmsg_flow_pattern(payload->unmasked_data, payload->mask_data); nfp_flower_trace_cmsg_flow_pattern(payload->mask_data, payload->action_data); + + nfp_flow_meta = payload->meta; + nfp_flower_trace_cmsg_flow_action(payload->action_data, + nfp_flow_meta->act_len << NFP_FL_LW_SIZ); } int diff --git a/drivers/net/nfp/nfp_trace.c b/drivers/net/nfp/nfp_trace.c index 61162f7563..9cca76e32c 100644 --- a/drivers/net/nfp/nfp_trace.c +++ b/drivers/net/nfp/nfp_trace.c @@ -73,5 +73,44 @@ RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_pattern_ipv6_gre_tun, RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_pattern_ipv6_udp_tun, pmd.net.nfp.cmsg.flow.pattern.ipv6_udp_tun) +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_output, + pmd.net.nfp.cmsg.flow.action.output) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_push_vlan, + pmd.net.nfp.cmsg.flow.action.push_vlan) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_pop_vlan, + pmd.net.nfp.cmsg.flow.action.pop_vlan) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_set_tun, + pmd.net.nfp.cmsg.flow.action.set_tun) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_set_eth, + pmd.net.nfp.cmsg.flow.action.set_eth) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_set_ipv4_addr, + pmd.net.nfp.cmsg.flow.action.set_ipv4_addr) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_set_ipv4_ttl_tos, + pmd.net.nfp.cmsg.flow.action.set_ipv4_ttl_tos) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_set_ipv6_addr, + pmd.net.nfp.cmsg.flow.action.set_ipv6_addr) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_set_ipv6_tc_hl_fl, + pmd.net.nfp.cmsg.flow.action.set_ipv6_tc_hl_fl) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_set_tp, + pmd.net.nfp.cmsg.flow.action.set_tp) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_pre_tun, + pmd.net.nfp.cmsg.flow.action.pre_tun) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_meter, + pmd.net.nfp.cmsg.flow.action.meter) + +RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_flow_action_set_partial, + pmd.net.nfp.cmsg.flow.action.set_partial) + 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 a5a7cc8faf..576cb37c3a 100644 --- a/drivers/net/nfp/nfp_trace.h +++ b/drivers/net/nfp/nfp_trace.h @@ -435,6 +435,304 @@ RTE_TRACE_POINT( rte_trace_point_emit_u32(tun_id); ) +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_output, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_output *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint16_t flags = rte_be_to_cpu_16(msg->flags); + uint32_t port = rte_be_to_cpu_32(msg->port); + + rte_trace_point_emit_u16(flags); + rte_trace_point_emit_u32(port); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_push_vlan, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_push_vlan *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint16_t vlan_tpid = rte_be_to_cpu_16(msg->vlan_tpid); + uint16_t vlan_tci = rte_be_to_cpu_16(msg->vlan_tci); + + rte_trace_point_emit_u16(vlan_tpid); + rte_trace_point_emit_u16(vlan_tci); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_pop_vlan, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_pop_vlan *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_set_tun, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_set_tun *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint64_t tun_id = rte_be_to_cpu_64(msg->tun_id); + uint32_t tun_type_index = rte_be_to_cpu_32(msg->tun_type_index); + uint16_t tun_flags = rte_be_to_cpu_16(msg->tun_flags); + uint8_t ttl = msg->ttl; + uint8_t tos = msg->tos; + uint8_t tun_len = msg->tun_len; + uint16_t tun_proto = rte_be_to_cpu_16(msg->tun_proto); + + rte_trace_point_emit_u64(tun_id); + rte_trace_point_emit_u32(tun_type_index); + rte_trace_point_emit_u16(tun_flags); + rte_trace_point_emit_u8(ttl); + rte_trace_point_emit_u8(tos); + rte_trace_point_emit_u8(tun_len); + rte_trace_point_emit_u16(tun_proto); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_set_eth, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_set_eth *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint8_t dst_mask_len = RTE_ETHER_ADDR_LEN; + uint8_t *dst_mask = &msg->eth_addr_mask[0]; + uint8_t src_mask_len = RTE_ETHER_ADDR_LEN; + uint8_t *src_mask = &msg->eth_addr_mask[RTE_ETHER_ADDR_LEN]; + uint8_t dst_addr_len = RTE_ETHER_ADDR_LEN; + uint8_t *dst_addr = &msg->eth_addr[0]; + uint8_t src_addr_len = RTE_ETHER_ADDR_LEN; + uint8_t *src_addr = &msg->eth_addr[RTE_ETHER_ADDR_LEN]; + + rte_trace_point_emit_blob(dst_mask, dst_mask_len); + rte_trace_point_emit_blob(src_mask, src_mask_len); + rte_trace_point_emit_blob(dst_addr, dst_addr_len); + rte_trace_point_emit_blob(src_addr, src_addr_len); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_set_ipv4_addr, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_set_ip4_addrs *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint32_t ipv4_src_mask = rte_be_to_cpu_32(msg->ipv4_src_mask); + uint32_t ipv4_src = rte_be_to_cpu_32(msg->ipv4_src); + uint32_t ipv4_dst_mask = rte_be_to_cpu_32(msg->ipv4_dst_mask); + uint32_t ipv4_dst = rte_be_to_cpu_32(msg->ipv4_dst); + + rte_trace_point_emit_u32(ipv4_src_mask); + rte_trace_point_emit_u32(ipv4_src); + rte_trace_point_emit_u32(ipv4_dst_mask); + rte_trace_point_emit_u32(ipv4_dst); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_set_ipv4_ttl_tos, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_set_ip4_ttl_tos *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint8_t ipv4_ttl_mask = msg->ipv4_ttl_mask; + uint8_t ipv4_tos_mask = msg->ipv4_tos_mask; + uint8_t ipv4_ttl = msg->ipv4_ttl; + uint8_t ipv4_tos = msg->ipv4_tos; + + rte_trace_point_emit_u8(ipv4_ttl_mask); + rte_trace_point_emit_u8(ipv4_tos_mask); + rte_trace_point_emit_u8(ipv4_ttl); + rte_trace_point_emit_u8(ipv4_tos); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_set_ipv6_addr, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_set_ipv6_addr *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint32_t ipv6_0_mask = rte_be_to_cpu_32(msg->ipv6[0].mask); + uint32_t ipv6_0_exact = rte_be_to_cpu_32(msg->ipv6[0].exact); + uint32_t ipv6_1_mask = rte_be_to_cpu_32(msg->ipv6[1].mask); + uint32_t ipv6_1_exact = rte_be_to_cpu_32(msg->ipv6[1].exact); + uint32_t ipv6_2_mask = rte_be_to_cpu_32(msg->ipv6[2].mask); + uint32_t ipv6_2_exact = rte_be_to_cpu_32(msg->ipv6[2].exact); + uint32_t ipv6_3_mask = rte_be_to_cpu_32(msg->ipv6[3].mask); + uint32_t ipv6_3_exact = rte_be_to_cpu_32(msg->ipv6[3].exact); + + rte_trace_point_emit_u32(ipv6_0_mask); + rte_trace_point_emit_u32(ipv6_0_exact); + rte_trace_point_emit_u32(ipv6_1_mask); + rte_trace_point_emit_u32(ipv6_1_exact); + rte_trace_point_emit_u32(ipv6_2_mask); + rte_trace_point_emit_u32(ipv6_2_exact); + rte_trace_point_emit_u32(ipv6_3_mask); + rte_trace_point_emit_u32(ipv6_3_exact); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_set_ipv6_tc_hl_fl, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_set_ipv6_tc_hl_fl *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint8_t ipv6_tc_mask = msg->ipv6_tc_mask; + uint8_t ipv6_hop_limit_mask = msg->ipv6_hop_limit_mask; + uint8_t ipv6_tc = msg->ipv6_tc; + uint8_t ipv6_hop_limit = msg->ipv6_hop_limit; + + rte_trace_point_emit_u8(ipv6_tc_mask); + rte_trace_point_emit_u8(ipv6_hop_limit_mask); + rte_trace_point_emit_u8(ipv6_tc); + rte_trace_point_emit_u8(ipv6_hop_limit); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_set_tp, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_set_tport *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint16_t src_port_mask = rte_be_to_cpu_16(msg->src_port_mask); + uint16_t dst_port_mask = rte_be_to_cpu_16(msg->dst_port_mask); + uint16_t src_port = rte_be_to_cpu_16(msg->src_port); + uint16_t dst_port = rte_be_to_cpu_16(msg->dst_port); + + rte_trace_point_emit_u16(src_port_mask); + rte_trace_point_emit_u16(dst_port_mask); + rte_trace_point_emit_u16(src_port); + rte_trace_point_emit_u16(dst_port); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_pre_tun, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_pre_tun *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint16_t flags = rte_be_to_cpu_16(msg->flags); + uint32_t ipv4_dst = rte_be_to_cpu_32(msg->ipv4_dst); + uint8_t ipv6_dst_len = 16; + uint8_t *ipv6_dst = msg->ipv6_dst; + + rte_trace_point_emit_u16(flags); + if ((flags & NFP_FL_PRE_TUN_IPV6) != 0) + rte_trace_point_emit_blob(ipv6_dst, ipv6_dst_len); + else + rte_trace_point_emit_u32(ipv4_dst); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_meter, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_meter *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint32_t profile_id = rte_be_to_cpu_32(msg->profile_id); + + rte_trace_point_emit_u32(profile_id); +) + +RTE_TRACE_POINT( + rte_pmd_nfp_trace_cmsg_flow_action_set_partial, + RTE_TRACE_POINT_ARGS(void *cmsg), + + struct nfp_fl_act_mark *msg = cmsg; + + uint8_t jump_id = msg->head.jump_id; + uint8_t len_lw = msg->head.len_lw; + + rte_trace_point_emit_u8(jump_id); + rte_trace_point_emit_u8(len_lw); + + uint32_t mark = rte_be_to_cpu_32(msg->mark); + + rte_trace_point_emit_u32(mark); + + if (len_lw > sizeof(struct nfp_fl_act_mark) >> NFP_FL_LW_SIZ) { + struct nfp_fl_act_partial *partial = cmsg; + + uint8_t flag = partial->flag; + uint16_t queue_id = rte_be_to_cpu_16(partial->queue_id); + + rte_trace_point_emit_u8(flag); + rte_trace_point_emit_u16(queue_id); + } +) + RTE_TRACE_POINT( rte_pmd_nfp_trace_cmsg_flow, RTE_TRACE_POINT_ARGS(const char *name), -- 2.39.1