From: Maxime Peim Date: Mon, 6 Oct 2025 13:00:52 +0000 (+0200) Subject: ip: remove hotwired udp-lookup next node X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F43840%2F4;p=vpp.git ip: remove hotwired udp-lookup next node udp-lookup nodes can be registered as any other nodes. Type: refactor Change-Id: I556f9cd1128c4d5d7b7c7ac11642f34bc89fd37f Signed-off-by: Maxime Peim --- diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c index fb96159b4c7..711455c45a4 100644 --- a/src/vnet/ip/ip4_forward.c +++ b/src/vnet/ip/ip4_forward.c @@ -1880,7 +1880,6 @@ VLIB_REGISTER_NODE (ip4_local_node) = { [IP_LOCAL_NEXT_DROP] = "ip4-drop", [IP_LOCAL_NEXT_PUNT] = "ip4-punt", - [IP_LOCAL_NEXT_UDP_LOOKUP] = "ip4-udp-lookup", [IP_LOCAL_NEXT_ICMP] = "ip4-icmp-input", [IP_LOCAL_NEXT_REASSEMBLY] = "ip4-local-full-reassembly", }, diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c index 1a77bd702c4..668dcd42b27 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -1666,7 +1666,6 @@ VLIB_REGISTER_NODE (ip6_local_node) = { [IP_LOCAL_NEXT_DROP] = "ip6-drop", [IP_LOCAL_NEXT_PUNT] = "ip6-punt", - [IP_LOCAL_NEXT_UDP_LOOKUP] = "ip6-udp-lookup", [IP_LOCAL_NEXT_ICMP] = "ip6-icmp-input", [IP_LOCAL_NEXT_REASSEMBLY] = "ip6-local-full-reassembly", }, diff --git a/src/vnet/ip/lookup.c b/src/vnet/ip/lookup.c index b978bd79742..664d01bbe13 100644 --- a/src/vnet/ip/lookup.c +++ b/src/vnet/ip/lookup.c @@ -103,7 +103,6 @@ ip_lookup_init (ip_lookup_main_t * lm, u32 is_ip6) lm->builtin_protocol_by_ip_protocol[i] = IP_BUILTIN_PROTOCOL_UNKNOWN; } - lm->local_next_by_ip_protocol[IP_PROTOCOL_UDP] = IP_LOCAL_NEXT_UDP_LOOKUP; lm->local_next_by_ip_protocol[is_ip6 ? IP_PROTOCOL_ICMP6 : IP_PROTOCOL_ICMP] = IP_LOCAL_NEXT_ICMP; lm->builtin_protocol_by_ip_protocol[IP_PROTOCOL_UDP] = diff --git a/src/vnet/ip/lookup.h b/src/vnet/ip/lookup.h index 8083d974df6..f2ca3ccf2d3 100644 --- a/src/vnet/ip/lookup.h +++ b/src/vnet/ip/lookup.h @@ -110,7 +110,6 @@ typedef enum { IP_LOCAL_NEXT_DROP, IP_LOCAL_NEXT_PUNT, - IP_LOCAL_NEXT_UDP_LOOKUP, IP_LOCAL_NEXT_ICMP, IP_LOCAL_NEXT_REASSEMBLY, IP_LOCAL_N_NEXT, diff --git a/src/vnet/udp/udp_local.c b/src/vnet/udp/udp_local.c index 6531b73cd11..cd42730b9fe 100644 --- a/src/vnet/udp/udp_local.c +++ b/src/vnet/udp/udp_local.c @@ -622,8 +622,8 @@ udp_local_init (vlib_main_t * vm) #define _(n,s) udp_add_dst_port (um, UDP_DST_PORT_##s, #s, 0 /* is_ip4 */); foreach_udp6_dst_port #undef _ - ip4_register_protocol (IP_PROTOCOL_UDP, udp4_local_node.index); - /* Note: ip6 differs from ip4, UDP is hotwired to ip6-udp-lookup */ + ip4_register_protocol (IP_PROTOCOL_UDP, udp4_local_node.index); + ip6_register_protocol (IP_PROTOCOL_UDP, udp6_local_node.index); return 0; }