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 28599455C0; Mon, 8 Jul 2024 04:47:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7505140DFD; Mon, 8 Jul 2024 04:46:22 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2122.outbound.protection.outlook.com [40.107.243.122]) by mails.dpdk.org (Postfix) with ESMTP id BE00E40E15 for ; Mon, 8 Jul 2024 04:46:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cqyrbxl76cunkwHBeiTLk+Yehqv3o3M3M4lcC5uL5cQdxx9cVWpfzaU2GPhsTUC+61fBy1LkQP5nl++QaME95lyqbcz9Jhwahu9/KGVkI0K6wKnlbCyK6e5ffMWHIcJs8aeBYv1w2vN5wnMZj9WkPliZNaZMB4qLUuho+NEk8UH9foqxz1f5J9hypGsQbAJNfZpW2VC4h7qMUXGo//hqzOG/V3CGIAnjM964kcvP4PhbN6yb9/qsLeBfbhN5Qswy7C3bG3Ol3L2QwqiTNvNbjFeQ3fdfK8EEvNhXmlLpHaqS5EkdkqMfPoL4F6tFe6pTtPpwZfVvLe7z6KQMWqpoOg== 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=Kf0fLrwS4RmdSB7zESNhZ9CNgQEUv6zdewAzwt91B2xvawnh3E4HNp0qVweVa1EfkLgd7lC3EoGOOfqGKMJoJEZDZTIURf3rk4cUsMs2msRFM0o1xO6Lwb5rGM5NKzj9/5+Sm2yaqXK+kB9mAKjbdxOgBSkIKmiIu8hPA/AEm1oYrD9xZZwiDImqap0psfEHQlR0vo5i8ksuFqTuL7B5Pfom4rvCLvyc859RUTFTLmEs4QHxQh07Tqa+u/ld4IUo66TtO60YRfzxb9pZBS+EYDmwqUkBDrYqqbHrdg4zZur2N3Pxfyl2nTt4KbCrjScUmte4a/QCE+RJ0MGh1BtIcQ== 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=klz8okQRg3slvdCTgGqyOKj1zdY2aONY/YuGzRZtaFuUR2ndRIAqPXA4/EDRLzfl7cbSKdBvCiwjae2A4N3jGXqyQpGttvv/mj+A0Bg0hbglwizCTdeJiO5juboNIN1LuklnNb9xJHFKm06J+020E49u/F2gKxiL9F7hVC2VgrI= 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:18 +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:18 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH v2 7/7] net/nfp: add trace point about flow rule action Date: Mon, 8 Jul 2024 10:45:43 +0800 Message-Id: <20240708024543.77126-8-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: 7c46852c-2202-4d4c-f4c8-08dc9ef82465 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?sWws5u+RY9FzaI2Q4mqENWSru2dRuxunMx69//gb7ZcqpYrdCiw2APfznDAp?= =?us-ascii?Q?VFFVVQAB5aWCo8PbBd7tYsk9NdjK2D1ea/o+uSMWxfseN679nlc0YAJj8mNp?= =?us-ascii?Q?VsxTeR39bz7OJS+DPnE/pEx+rM2Oa6rY4V/EgsgdclEzLRFp1LmEwooWC86K?= =?us-ascii?Q?X7rvlmkqA6/PCP9VLQUhO5gG525+tGLplqr8lng9nf5BhpkN8CmmIyxt3IJF?= =?us-ascii?Q?KJPjgInLbuW82cFxA/ZqudMZw1rXnyqtB5ufPeTZpUcZpnE6fVD/v2BCquFJ?= =?us-ascii?Q?kubFMafRq/+JLBEpIW7pTQJ5KdHrtO3J5XAMPg36y063lFl+U0x2ee9Yk12p?= =?us-ascii?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Trr4YIbApteI3zAbGcg6ABEJN?= =?us-ascii?Q?LzrNANtfjByLEnWYUmbN9YbiE2AjhETgoR6fTS6OmMNdo2Osty2+x4LQoiWk?= =?us-ascii?Q?yvfrzu4GM2nb59c3dkNwvc9IAced2iYhXfYp9CszmabxV5KfCN0YdKd7yVMQ?= =?us-ascii?Q?2PfC37eUSwtd9dcb32QZKewzxdNgeL46fW96vvWJwTK4UKcZrw=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?LKKneeCEkUz3yPTI1Ad6Q+jqojhr6WXbEfbvJZe/ki/35wHgzaQbmsVlQQgS?= =?us-ascii?Q?ulbwizT/wC/67XvPSxgK9WKuaV+99/CkcV6LFCz5Zr/C+Yne9OZX1eKsU64K?= =?us-ascii?Q?NXOsL6oNu3g784SOJUPdqbijnLLy7y9TK2DEmOPr59cMLjlN1EFs2Tjbjg+S?= =?us-ascii?Q?xfsZL5iXPoa6FrQ21VPuS/WEgOPuoW8ZWhzAdJN4aDw4x8thkT9QEkX7cymy?= =?us-ascii?Q?q3ePtucg97EfdMTd82BIfeLA2ZTZdQQi8AY6t8M8li9KXPO8z2xADDqUX29f?= =?us-ascii?Q?agpPqygCYLezk3L4GcIJYeSDAwETLGiquUUHPdtfRrYEXpsHK2qmILxlrxr4?= =?us-ascii?Q?NtzoXTyCbingVS4whb3odbCyVjIzyWKLS7qcR9M9SVmQ2Sv0lxQucfNVQ1K6?= =?us-ascii?Q?fSMaE4mVd+tHb3Z/LAx2V1Xg+jtrCIjdJINVpqKRbKpQSAEONIt5u05sgsbk?= =?us-ascii?Q?xE5A+5otWDdJQ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B?= =?us-ascii?Q?p/w35kT8quzdj1cKfISsRJaYtnEh7VdcQ9XoFiQvPaonRY7EvpRxgA3a0U88?= =?us-ascii?Q?N6S2Eb8Iqjiz7Nh/UeaSavFFu9aXX6Ryy5WHTrQXYM+/6SHjsrlDkdN43oom?= =?us-ascii?Q?vxg1NFbRy3iPzPMlpnz06I5AL/zx2IiYmtmYoe8Uns5Wtfz0FzROL4twdm33?= =?us-ascii?Q?qI9TiauIMjRyf4fQao1wOy7eY6ZHkjgUeFAXG/qNgQf0dhP1X5w8va7TDzck?= =?us-ascii?Q?YQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c46852c-2202-4d4c-f4c8-08dc9ef82465 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:18.2005 (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: hZ0ndDka7e8PNCm41L1itXJUj2asm46NBt03dKUykaxaNzY/DdrOerS4j/9F8HbiredkdnlX+P+fvlEqeyNt9GWUBmRLWcYP1PpN0i/XJdU= 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 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