diff options
| author | songyanchao <[email protected]> | 2024-03-01 07:46:40 +0000 |
|---|---|---|
| committer | songyanchao <[email protected]> | 2024-03-01 10:30:48 +0000 |
| commit | 04d6a2f77d7186d858efbc598f13f71fd30643bc (patch) | |
| tree | 8c07c8b02f275ed9f73a2961710084338ae9156b | |
| parent | 5494f5a4cbc3cfc22ac64e996c2698da8a4ef65e (diff) | |
🎈 perf(TSG-19602): Standardize function names for adding trace information across all nodes.
Standardize function names for adding trace information across all nodes.
| -rw-r--r-- | service/src/node_classifier.c | 8 | ||||
| -rw-r--r-- | service/src/node_eth_ingress.c | 6 | ||||
| -rw-r--r-- | service/src/node_etherfabric.c | 12 | ||||
| -rw-r--r-- | service/src/node_forwarder.c | 6 |
4 files changed, 16 insertions, 16 deletions
diff --git a/service/src/node_classifier.c b/service/src/node_classifier.c index 8db5d93..c15acbc 100644 --- a/service/src/node_classifier.c +++ b/service/src/node_classifier.c @@ -346,8 +346,8 @@ int classifier_init(struct sc_main * sc) return RT_SUCCESS; } -/* Construct the trace information */ -static __rte_always_inline void construct_trace_info(struct rte_node * node, struct rte_mbuf * mbuf, +/* Generate and store the trace information */ +static __rte_always_inline void gen_store_trace_info(struct rte_node * node, struct rte_mbuf * mbuf, uint16_t next_node_index, struct classifier_stats * stat, struct classifier_stats * stat_for_trace, struct match_result_engine * result, uint8_t ignore_icmp) @@ -503,7 +503,7 @@ static __rte_always_inline uint16_t classifier_node_process(struct rte_graph * g /* Check if tracing is enabled for the current Mbuf */ if (unlikely(dp_trace_record_can_emit(pending_mbufs[pkt_idx]))) { - construct_trace_info(node, pending_mbufs[pkt_idx], CLASSIFIER_NEXT_FORWARDER, &stat, &stat_for_trace, + gen_store_trace_info(node, pending_mbufs[pkt_idx], CLASSIFIER_NEXT_FORWARDER, &stat, &stat_for_trace, &result[pkt_idx], ignore_icmp_pkts[pkt_idx]); } } @@ -584,7 +584,7 @@ static __rte_always_inline uint16_t classifier_node_process(struct rte_graph * g /* Check if tracing is enabled for the current Mbuf */ if (unlikely(dp_trace_record_can_emit(mbuf0))) { - construct_trace_info(node, mbuf0, CLASSIFIER_NEXT_FORWARDER, &stat, &stat_for_trace, &result, + gen_store_trace_info(node, mbuf0, CLASSIFIER_NEXT_FORWARDER, &stat, &stat_for_trace, &result, ignore_icmp_pkt); } } diff --git a/service/src/node_eth_ingress.c b/service/src/node_eth_ingress.c index 41ae695..6606b10 100644 --- a/service/src/node_eth_ingress.c +++ b/service/src/node_eth_ingress.c @@ -381,8 +381,8 @@ static int endpoint_dev_packet_handler(struct mr_dev_desc * dev_desc, struct eth return ETH_INGRESS_NEXT_PKT_DROP; } -/* Construct the trace information */ -static __rte_always_inline void construct_trace_info_ingress(struct rte_node * node, struct rte_mbuf * mbuf, +/* Generate and store the trace information */ +static __rte_always_inline void gen_store_trace_info_ingress(struct rte_node * node, struct rte_mbuf * mbuf, uint16_t next_node_index, struct eth_ingress_stats * stat, struct eth_ingress_stats * stat_for_trace) { @@ -509,7 +509,7 @@ static __rte_always_inline uint16_t eth_ingress_node_process(struct rte_graph * /* Check if tracing is enabled for the current Mbuf */ if (unlikely(dp_trace_record_can_emit(mbuf))) { - construct_trace_info_ingress(node, mbuf, next_node_index, &stat, &stat_for_trace); + gen_store_trace_info_ingress(node, mbuf, next_node_index, &stat, &stat_for_trace); } /* Check if the next index needs to be changed */ diff --git a/service/src/node_etherfabric.c b/service/src/node_etherfabric.c index 58d47a5..95cc880 100644 --- a/service/src/node_etherfabric.c +++ b/service/src/node_etherfabric.c @@ -444,8 +444,8 @@ static inline void vxlan_encap_forwarded_pkt(struct rte_mbuf * mbuf) ip_hdr->dst_addr = _swap_ip_addr; } -/* Construct the trace information for ingress */ -static __rte_always_inline void construct_trace_info_ingress(struct rte_node * node, struct rte_mbuf * mbuf, +/* Generate and store the trace information for ingress */ +static __rte_always_inline void gen_store_trace_info_ingress(struct rte_node * node, struct rte_mbuf * mbuf, uint16_t next_node_index, struct ef_ingress_stats * stat, struct ef_ingress_stats * stat_for_trace) { @@ -590,7 +590,7 @@ static __rte_always_inline uint16_t ef_ingress_node_process(struct rte_graph * g /* Check if tracing is enabled for the current Mbuf */ if (unlikely(dp_trace_record_can_emit(mbuf))) { - construct_trace_info_ingress(node, mbuf, next_node_index, &stat, &stat_for_trace); + gen_store_trace_info_ingress(node, mbuf, next_node_index, &stat, &stat_for_trace); } /* Judge the next index whether to change */ @@ -702,8 +702,8 @@ errout: return RT_ERR; } -/* Construct the trace information for egress */ -static __rte_always_inline void construct_trace_info_egress(struct rte_node * node, struct rte_mbuf * mbuf, +/* Generate and store the trace information for egress */ +static __rte_always_inline void gen_store_trace_info_egress(struct rte_node * node, struct rte_mbuf * mbuf, uint16_t next_node_index, struct ef_egress_stats * stat, struct ef_egress_stats * stat_for_trace) { @@ -825,7 +825,7 @@ static __rte_always_inline uint16_t ef_egress_node_process(struct rte_graph * gr /* Check if tracing is enabled for the current Mbuf */ if (unlikely(dp_trace_record_can_emit(mbuf))) { - construct_trace_info_egress(node, mbuf, next_node_index, &stat, &stat_for_trace); + gen_store_trace_info_egress(node, mbuf, next_node_index, &stat, &stat_for_trace); } /* Determine if the next index should be changed */ diff --git a/service/src/node_forwarder.c b/service/src/node_forwarder.c index b251b28..be6f07d 100644 --- a/service/src/node_forwarder.c +++ b/service/src/node_forwarder.c @@ -89,8 +89,8 @@ void forwarder_table_inserter(uint16_t sid, uint16_t type) MR_INFO("%s", str_forwarder); } -/* Construct the trace information */ -static __rte_always_inline void construct_trace_info(struct rte_node * node, struct rte_mbuf * mbuf, +/* Generate and store the trace information */ +static __rte_always_inline void gen_store_trace_info(struct rte_node * node, struct rte_mbuf * mbuf, uint16_t next_node_index, struct forwarder_stat * stat, struct forwarder_stat * stat_for_trace) { @@ -210,7 +210,7 @@ static __rte_always_inline uint16_t forwarder_node_process(struct rte_graph * gr /* Check if tracing is enabled for the current Mbuf */ if (unlikely(dp_trace_record_can_emit(mbuf))) { - construct_trace_info(node, mbuf, next_node_index, &stat, &stat_for_trace); + gen_store_trace_info(node, mbuf, next_node_index, &stat, &stat_for_trace); } /* Judge the next index whether to change */ |
