Hi vPPers, I’m looking at the latest changes in IPSEC, and I notice ip4 and ip6 nodes are separated. So there are a lot of code in the node function like this:
if (is_ip6) vlib_node_increment_counter (vm, esp6_decrypt_node.index, ESP_DECRYPT_ERROR_RX_PKTS, from_frame->n_vectors); else vlib_node_increment_counter (vm, esp4_decrypt_node.index, ESP_DECRYPT_ERROR_RX_PKTS, from_frame->n_vectors); I’m wondering why not like this: vlib_node_increment_counter (vm, node->node_index, ESP_DECRYPT_ERROR_RX_PKTS, from_frame->n_vectors); My understanding is that node functions are always dispatched with the correct node instances. Or do I miss something? BTW, nt just ipsec, quite some other nodes are written as the former. Regards, Kingwel
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11065): https://lists.fd.io/g/vpp-dev/message/11065 Mute This Topic: https://lists.fd.io/mt/27823101/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-