summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorsongyanchao <[email protected]>2024-07-09 03:23:34 +0000
committersongyanchao <[email protected]>2024-07-12 02:21:03 +0000
commite57941c81a739c323ed79a1c90028b7a516b0c51 (patch)
tree2b734f6a110d1b689ec94bc49553053bd208c406 /service
parente9dc535206b70c77d97046514a43e36d58e34cc7 (diff)
🎈 perf: Optimize health check conditions in eth ingress node.
Optimize health check conditions in eth ingress node.
Diffstat (limited to 'service')
-rw-r--r--service/src/node_eth_ingress.c2
-rw-r--r--service/src/node_health_check.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/service/src/node_eth_ingress.c b/service/src/node_eth_ingress.c
index 44f6133..530d41c 100644
--- a/service/src/node_eth_ingress.c
+++ b/service/src/node_eth_ingress.c
@@ -513,7 +513,7 @@ static __rte_always_inline uint16_t eth_ingress_node_process(struct rte_graph *
break;
case MR_DEV_ROLE_NF_INTERFACE: {
/* check health check pkt */
- if (likely(rte_pktmbuf_mtod(mbuf, struct rte_ether_hdr *)->ether_type != ETH_HEALTH_CHECK_PRIVATE))
+ if (likely(mrb_meta->health_check != 1))
{
stats.to_forwarder++;
next_node_index = ETH_INGRESS_NEXT_FORWARDER;
diff --git a/service/src/node_health_check.c b/service/src/node_health_check.c
index f8f9afd..3a05782 100644
--- a/service/src/node_health_check.c
+++ b/service/src/node_health_check.c
@@ -214,6 +214,7 @@ int private_ask_func(struct node_health_check_main * health_check_main, struct h
mrb_meta->port_ingress = session->port_id;
mrb_meta->port_egress = session->port_id;
mrb_meta->packet_create_from_nf = 0;
+ mrb_meta->health_check = 1;
/* Set mbuf pkt_len */
mbuf->data_len = sizeof(struct rte_ether_hdr) + sizeof(struct private_health_check_hdr);