Hi Dear VPP I need to perform out2in nat operation before input-acl, so I'm trying to register new node as below: ------------------------------------- plugins/nat/nat.c: VNET_FEATURE_INIT (ip4_snat_out2in_input, static) = { .arc_name = "ip4-unicast", .node_name = "nat44-out2in-input", .runs_before = VNET_FEATURES ("acl-plugin-in-ip4-fa"), }; ------------------------------------- and the related node registration: ------------------------------------- plugins/nat/out2in.c: VLIB_REGISTER_NODE (snat_out2in_input_node) = { .function = snat_out2in_input_node_fn, .name = "nat44-out2in-input", .vector_size = sizeof (u32), .format_trace = format_snat_out2in_trace, .type = VLIB_NODE_TYPE_INTERNAL,
.n_errors = ARRAY_LEN(snat_out2in_error_strings), .error_strings = snat_out2in_error_strings, .runtime_data_bytes = sizeof (snat_runtime_t), .n_next_nodes = SNAT_OUT2IN_N_NEXT, /* edit / add dispositions here */ .next_nodes = { [SNAT_OUT2IN_NEXT_DROP] = "error-drop", [SNAT_OUT2IN_NEXT_LOOKUP] = "acl-plugin-in-ip4-fa", [SNAT_OUT2IN_NEXT_ICMP_ERROR] = "ip4-icmp-error", [SNAT_OUT2IN_NEXT_REASS] = "nat44-out2in-reass", }, }; (comment: snat_out2in_input_node_fn and snat_out2in_node_fn are the same except in counters) ------------------------------------- then i want to enable this feature on snat_interface_add_del_output_feature function call and just for one worker so I changed this function as below: ------------------------------------- plugins/nat/nat.c | snat_interface_add_del_output_feature function: // vnet_feature_enable_disable ("ip4-unicast", "nat44-out2in", // sw_if_index, !is_del, 0, 0); vnet_feature_enable_disable ("ip4-unicast", "nat44-out2in-input", sw_if_index, !is_del, 0, 0); vnet_feature_enable_disable ("ip4-output", "nat44-in2out-output", sw_if_index, !is_del, 0, 0); ------------------------------------- the problem is that in some cases vnet_feature_next function in input-acl returns next0=5 and then packets are dropped because of node->n_next_nodes is 3: next0 = next0 < node->n_next_nodes ? next0 : 0; in plugins/acl/dataplane_node.c. Am I missing something? what's wrong with my code?
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12433): https://lists.fd.io/g/vpp-dev/message/12433 Mute This Topic: https://lists.fd.io/mt/30225687/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-