DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>,
	Long Wu <long.wu@corigine.com>,
	Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH 3/7] net/nfp: add trace point about Qos
Date: Wed, 19 Jun 2024 18:07:50 +0800	[thread overview]
Message-ID: <20240619100754.3480077-4-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20240619100754.3480077-1-chaoyong.he@corigine.com>

Add 1 trace point of control message related with Qos.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_cmsg.c |  4 ++++
 drivers/net/nfp/nfp_trace.c              |  3 +++
 drivers/net/nfp/nfp_trace.h              | 29 ++++++++++++++++++++++++
 3 files changed, 36 insertions(+)

diff --git a/drivers/net/nfp/flower/nfp_flower_cmsg.c b/drivers/net/nfp/flower/nfp_flower_cmsg.c
index 30ce68b42d..b07cea9921 100644
--- a/drivers/net/nfp/flower/nfp_flower_cmsg.c
+++ b/drivers/net/nfp/flower/nfp_flower_cmsg.c
@@ -528,6 +528,8 @@ nfp_flower_cmsg_qos_add(struct nfp_app_fw_flower *app_fw_flower,
 		return -EIO;
 	}
 
+	rte_pmd_nfp_trace_cmsg_qos_rule("cmsg_qos_add", msg);
+
 	return 0;
 }
 
@@ -558,6 +560,8 @@ nfp_flower_cmsg_qos_delete(struct nfp_app_fw_flower *app_fw_flower,
 		return -EIO;
 	}
 
+	rte_pmd_nfp_trace_cmsg_qos_rule("cmsg_qos_delete", msg);
+
 	return 0;
 }
 
diff --git a/drivers/net/nfp/nfp_trace.c b/drivers/net/nfp/nfp_trace.c
index 730ffaa32e..529399e1a8 100644
--- a/drivers/net/nfp/nfp_trace.c
+++ b/drivers/net/nfp/nfp_trace.c
@@ -33,3 +33,6 @@ RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_pre_tun,
 
 RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_tun_mac,
 		pmd.net.nfp.cmsg.tun.mac_rule)
+
+RTE_TRACE_POINT_REGISTER(rte_pmd_nfp_trace_cmsg_qos_rule,
+		pmd.net.nfp.cmsg.qos.rule)
diff --git a/drivers/net/nfp/nfp_trace.h b/drivers/net/nfp/nfp_trace.h
index 48a14efd3a..5f8f3c373b 100644
--- a/drivers/net/nfp/nfp_trace.h
+++ b/drivers/net/nfp/nfp_trace.h
@@ -192,4 +192,33 @@ RTE_TRACE_POINT(
 	rte_trace_point_emit_blob(addr_bytes, len);
 )
 
+RTE_TRACE_POINT(
+	rte_pmd_nfp_trace_cmsg_qos_rule,
+	RTE_TRACE_POINT_ARGS(const char *name, void *cmsg),
+
+	rte_trace_point_emit_string(name);
+
+	struct nfp_profile_conf *msg = cmsg;
+	uint32_t bkt_tkn_p = rte_be_to_cpu_32(msg->bkt_tkn_p);
+	uint32_t bkt_tkn_c = rte_be_to_cpu_32(msg->bkt_tkn_c);
+	uint32_t pbs = rte_be_to_cpu_32(msg->pbs);
+	uint32_t cbs = rte_be_to_cpu_32(msg->cbs);
+	uint32_t pir = rte_be_to_cpu_32(msg->pir);
+	uint32_t cir = rte_be_to_cpu_32(msg->cir);
+
+	struct nfp_cfg_head *head = &msg->head;
+	uint32_t flags_opts = rte_be_to_cpu_32(head->flags_opts);
+	uint32_t profile_id = rte_be_to_cpu_32(head->profile_id);
+
+	rte_trace_point_emit_u32(flags_opts);
+	rte_trace_point_emit_u32(profile_id);
+
+	rte_trace_point_emit_u32(bkt_tkn_p);
+	rte_trace_point_emit_u32(bkt_tkn_c);
+	rte_trace_point_emit_u32(pbs);
+	rte_trace_point_emit_u32(cbs);
+	rte_trace_point_emit_u32(pir);
+	rte_trace_point_emit_u32(cir);
+)
+
 #endif /* __NFP_TRACE_H__ */
-- 
2.39.1


  parent reply	other threads:[~2024-06-19 10:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 10:07 [PATCH 0/7] add trace support for control message Chaoyong He
2024-06-19 10:07 ` [PATCH 1/7] net/nfp: add trace points about port Chaoyong He
2024-06-19 10:07 ` [PATCH 2/7] net/nfp: add trace point about tunnel Chaoyong He
2024-06-19 10:07 ` Chaoyong He [this message]
2024-06-19 10:07 ` [PATCH 4/7] net/nfp: refactor to prepare for add flow trace point Chaoyong He
2024-06-19 10:07 ` [PATCH 5/7] net/nfp: add trace point about flow rule Chaoyong He
2024-06-19 10:07 ` [PATCH 6/7] net/nfp: add trace point about flow rule pattern Chaoyong He
2024-06-19 10:07 ` [PATCH 7/7] net/nfp: add trace point about flow rule action Chaoyong He
2024-07-07 22:43 ` [PATCH 0/7] add trace support for control message Ferruh Yigit
2024-07-08  1:42   ` Chaoyong He
2024-07-08  2:45 ` [PATCH v2 " Chaoyong He
2024-07-08  2:45   ` [PATCH v2 1/7] net/nfp: add trace points about port Chaoyong He
2024-07-08  2:45   ` [PATCH v2 2/7] net/nfp: add trace point about tunnel Chaoyong He
2024-07-08  2:45   ` [PATCH v2 3/7] net/nfp: add trace point about Qos Chaoyong He
2024-07-08  2:45   ` [PATCH v2 4/7] net/nfp: refactor to prepare for add flow trace point Chaoyong He
2024-07-08  2:45   ` [PATCH v2 5/7] net/nfp: add trace point about flow rule Chaoyong He
2024-07-08  2:45   ` [PATCH v2 6/7] net/nfp: add trace point about flow rule pattern Chaoyong He
2024-07-08  2:45   ` [PATCH v2 7/7] net/nfp: add trace point about flow rule action Chaoyong He
2024-07-08 11:45   ` [PATCH v2 0/7] add trace support for control message Ferruh Yigit
2024-07-09  1:15     ` Chaoyong He
2024-07-09  3:16     ` Chaoyong He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240619100754.3480077-4-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=long.wu@corigine.com \
    --cc=oss-drivers@corigine.com \
    --cc=peng.zhang@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).