get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/132120/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 132120,
    "url": "https://patches.dpdk.org/api/patches/132120/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230928102529.4118346-2-rkudurumalla@marvell.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230928102529.4118346-2-rkudurumalla@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230928102529.4118346-2-rkudurumalla@marvell.com",
    "date": "2023-09-28T10:25:29",
    "name": "[v6,2/2] node: add UDP v4 support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f8d6f4a919e0c0105ec75391623f6a57f4b68046",
    "submitter": {
        "id": 2289,
        "url": "https://patches.dpdk.org/api/people/2289/?format=api",
        "name": "Rakesh Kudurumalla",
        "email": "rkudurumalla@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230928102529.4118346-2-rkudurumalla@marvell.com/mbox/",
    "series": [
        {
            "id": 29676,
            "url": "https://patches.dpdk.org/api/series/29676/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=29676",
            "date": "2023-09-28T10:25:28",
            "name": "[v6,1/2] node: add IPv4 local node to handle local pkts",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/29676/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/132120/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/132120/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CEE3A42660;\n\tThu, 28 Sep 2023 12:25:44 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EECE740A6F;\n\tThu, 28 Sep 2023 12:25:43 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 12C7D40685\n for <dev@dpdk.org>; Thu, 28 Sep 2023 12:25:41 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 38SA9h6g012091; Thu, 28 Sep 2023 03:25:41 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3tcrrs32x7-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 28 Sep 2023 03:25:41 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Thu, 28 Sep 2023 03:25:39 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Thu, 28 Sep 2023 03:25:39 -0700",
            "from localhost.localdomain (unknown [10.28.36.154])\n by maili.marvell.com (Postfix) with ESMTP id B33AA5C68EE;\n Thu, 28 Sep 2023 03:25:36 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=gjLubi2wE8ZvfBJPLEnmZ+FjuPKm2DqVPfhc73cS94c=;\n b=IMbXJuY6Yj3r08YUooTlzcNDF4EO9meekKx/kpcKXFM2mmE+XBA0zhKIIoDY+s33f6yz\n TJvVLXYgnZxVUTmFb2Z/7ievQJm9+imKxc4eQviE9lA2aqz/TWyYs+o+iRoUPIEiL/Yu\n 63uoAAN90C7UpKrMvCUWgIZtG7dKr5oDBWb0qVhwQ4c+cjczGhfiihHD34XBMLIVmxlh\n jY8YopeM9upFSFjNjODdhdvxMfIBvn//Q+JgjdTk7dc2LT2FZRIx++DCw2JDpNla0dxu\n /wFRYf9lX9zlbj1aT++O96agEbskpJF34ikfPl8nLQn9R+Sx5RQ8w0gxcRElrpkd2PI3 QQ==",
        "From": "Rakesh Kudurumalla <rkudurumalla@marvell.com>",
        "To": "Jerin Jacob <jerinj@marvell.com>, Kiran Kumar K <kirankumark@marvell.com>,\n Nithin Dabilpuram <ndabilpuram@marvell.com>, Zhirun Yan\n <zhirun.yan@intel.com>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "CC": "<dev@dpdk.org>, Rakesh Kudurumalla <rkudurumalla@marvell.com>",
        "Subject": "[PATCH v6 2/2] node: add UDP v4 support",
        "Date": "Thu, 28 Sep 2023 15:55:29 +0530",
        "Message-ID": "<20230928102529.4118346-2-rkudurumalla@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230928102529.4118346-1-rkudurumalla@marvell.com>",
        "References": "<20230927124100.4108588-1-rkudurumalla@marvell.com>\n <20230928102529.4118346-1-rkudurumalla@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "wyAI8wTAj09qxHQrfLtI_n5aTmTc4zHF",
        "X-Proofpoint-GUID": "wyAI8wTAj09qxHQrfLtI_n5aTmTc4zHF",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-09-28_08,2023-09-28_01,2023-05-22_02",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "IPv4 UDP packets are given to application\nwith specified UDP destination port given\nby user.\n\nSigned-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>\n---\n doc/api/doxy-api-index.md                     |   3 +-\n doc/guides/prog_guide/graph_lib.rst           |  25 ++\n .../img/graph_inbuilt_node_flow.svg           | 165 ++++++++-----\n lib/node/meson.build                          |   2 +\n lib/node/rte_node_udp4_input_api.h            |  61 +++++\n lib/node/udp4_input.c                         | 226 ++++++++++++++++++\n lib/node/version.map                          |   2 +\n 7 files changed, 418 insertions(+), 66 deletions(-)\n create mode 100644 lib/node/rte_node_udp4_input_api.h\n create mode 100644 lib/node/udp4_input.c",
    "diff": "diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md\nindex fdeda13932..96282d3fd0 100644\n--- a/doc/api/doxy-api-index.md\n+++ b/doc/api/doxy-api-index.md\n@@ -206,7 +206,8 @@ The public API headers are grouped by topics:\n   * graph_nodes:\n     [eth_node](@ref rte_node_eth_api.h),\n     [ip4_node](@ref rte_node_ip4_api.h),\n-    [ip6_node](@ref rte_node_ip6_api.h)\n+    [ip6_node](@ref rte_node_ip6_api.h),\n+    [udp4_input_node](@ref rte_node_udp4_input_api.h)\n \n - **basic**:\n   [bitops](@ref rte_bitops.h),\ndiff --git a/doc/guides/prog_guide/graph_lib.rst b/doc/guides/prog_guide/graph_lib.rst\nindex f2e04a68b9..3572560362 100644\n--- a/doc/guides/prog_guide/graph_lib.rst\n+++ b/doc/guides/prog_guide/graph_lib.rst\n@@ -513,3 +513,28 @@ On packet_type lookup failure, objects are redirected to ``pkt_drop`` node.\n depth to receive to packets.\n To achieve home run, node use ``rte_node_stream_move()`` as mentioned in above\n sections.\n+\n+udp4_input\n+~~~~~~~~~~\n+This node is an intermediate node that does udp destination port lookup for\n+the received ipv4 packets and the result determines each packets next node.\n+\n+User registers a new node ``udp4_input`` into graph library during initialization\n+and attach user specified node as edege to this node using\n+``rte_node_udp4_usr_node_add()``, and create empty hash table with destination\n+port and node id as its feilds.\n+\n+After successful addition of user node as edege, edge id is returned to the user.\n+\n+User would register ``ip4_lookup`` table with specified ip address and 32 bit as mask\n+for ip filtration using api ``rte_node_ip4_route_add()``.\n+\n+After graph is created user would update hash table with custom port with\n+and previously obtained edge id using API ``rte_node_udp4_dst_port_add()``.\n+\n+When packet is received lpm look up is performed if ip is matched the packet\n+is handed over to ip4_local node, then packet is verified for udp proto and\n+on success packet is enqueued to ``udp4_input`` node.\n+\n+Hash lookup is performed in ``udp4_input`` node with registered destination port\n+and destination port in UDP packet , on success packet is handed to ``udp_user_node``.\ndiff --git a/doc/guides/prog_guide/img/graph_inbuilt_node_flow.svg b/doc/guides/prog_guide/img/graph_inbuilt_node_flow.svg\nindex b954f6fba1..7c451371a7 100644\n--- a/doc/guides/prog_guide/img/graph_inbuilt_node_flow.svg\n+++ b/doc/guides/prog_guide/img/graph_inbuilt_node_flow.svg\n@@ -39,192 +39,227 @@ digraph dpdk_inbuilt_nodes_flow {\n     kernel_tx -> kernel_rx [color=\"red\" style=\"dashed\"]\n     ip4_lookup -> ip4_local\n     ip4_local -> pkt_drop [color=\"cyan\" style=\"dashed\"]\n+    ip4_local -> udp4_input [ label=\"udpv4\"]\n+    udp4_input -> udp_user_node\n+    udp4_input -> pkt_drop [color=\"cyan\" style=\"dashed\"]\n+\n }\n \n  -->\n <!-- input nodes -->\n <!-- Title: dpdk_inbuilt_nodes_flow Pages: 1 -->\n-<svg width=\"525pt\" height=\"458pt\"\n- viewBox=\"0.00 0.00 524.91 458.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n-<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 454)\">\n+<svg width=\"631pt\" height=\"437pt\"\n+ viewBox=\"0.00 0.00 630.95 437.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n+<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 433)\">\n <title>dpdk_inbuilt_nodes_flow</title>\n-<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-454 520.91,-454 520.91,4 -4,4\"/>\n+<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-433 626.95,-433 626.95,4 -4,4\"/>\n <!-- ethdev_rx -->\n <g id=\"node1\" class=\"node\">\n <title>ethdev_rx</title>\n-<ellipse fill=\"none\" stroke=\"green\" cx=\"120\" cy=\"-432\" rx=\"56.59\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"120\" y=\"-428.3\" font-family=\"Times,serif\" font-size=\"14.00\">ethdev_rx</text>\n+<ellipse fill=\"none\" stroke=\"green\" cx=\"261.95\" cy=\"-411\" rx=\"56.59\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"261.95\" y=\"-407.3\" font-family=\"Times,serif\" font-size=\"14.00\">ethdev_rx</text>\n </g>\n <!-- pkt_cls -->\n <g id=\"node6\" class=\"node\">\n <title>pkt_cls</title>\n-<ellipse fill=\"none\" stroke=\"red\" cx=\"120\" cy=\"-359\" rx=\"42.79\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"120\" y=\"-355.3\" font-family=\"Times,serif\" font-size=\"14.00\">pkt_cls</text>\n+<ellipse fill=\"none\" stroke=\"red\" cx=\"261.95\" cy=\"-338\" rx=\"42.79\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"261.95\" y=\"-334.3\" font-family=\"Times,serif\" font-size=\"14.00\">pkt_cls</text>\n </g>\n <!-- ethdev_rx&#45;&gt;pkt_cls -->\n <g id=\"edge1\" class=\"edge\">\n <title>ethdev_rx&#45;&gt;pkt_cls</title>\n-<path fill=\"none\" stroke=\"black\" d=\"M120,-413.81C120,-405.79 120,-396.05 120,-387.07\"/>\n-<polygon fill=\"black\" stroke=\"black\" points=\"123.5,-387.03 120,-377.03 116.5,-387.03 123.5,-387.03\"/>\n+<path fill=\"none\" stroke=\"black\" d=\"M261.95,-392.81C261.95,-384.79 261.95,-375.05 261.95,-366.07\"/>\n+<polygon fill=\"black\" stroke=\"black\" points=\"265.45,-366.03 261.95,-356.03 258.45,-366.03 265.45,-366.03\"/>\n </g>\n <!-- kernel_rx -->\n <g id=\"node2\" class=\"node\">\n <title>kernel_rx</title>\n-<ellipse fill=\"none\" stroke=\"green\" cx=\"82\" cy=\"-199\" rx=\"53.89\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"82\" y=\"-195.3\" font-family=\"Times,serif\" font-size=\"14.00\">kernel_rx</text>\n+<ellipse fill=\"none\" stroke=\"green\" cx=\"53.95\" cy=\"-178\" rx=\"53.89\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"53.95\" y=\"-174.3\" font-family=\"Times,serif\" font-size=\"14.00\">kernel_rx</text>\n </g>\n <!-- kernel_rx&#45;&gt;pkt_cls -->\n <g id=\"edge2\" class=\"edge\">\n <title>kernel_rx&#45;&gt;pkt_cls</title>\n-<path fill=\"none\" stroke=\"black\" d=\"M70.87,-216.92C60.28,-235.27 47.29,-265.24 57,-290 64.12,-308.16 78.62,-324.37 91.92,-336.4\"/>\n-<polygon fill=\"black\" stroke=\"black\" points=\"89.69,-339.1 99.54,-342.99 94.26,-333.8 89.69,-339.1\"/>\n+<path fill=\"none\" stroke=\"black\" d=\"M74.75,-194.8C112.31,-223.33 191.45,-283.45 233.8,-315.62\"/>\n+<polygon fill=\"black\" stroke=\"black\" points=\"231.92,-318.59 242,-321.85 236.16,-313.01 231.92,-318.59\"/>\n </g>\n <!-- ethdev_tx -->\n <g id=\"node3\" class=\"node\">\n <title>ethdev_tx</title>\n-<ellipse fill=\"none\" stroke=\"magenta\" cx=\"338\" cy=\"-91\" rx=\"55.79\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"338\" y=\"-87.3\" font-family=\"Times,serif\" font-size=\"14.00\">ethdev_tx</text>\n+<ellipse fill=\"none\" stroke=\"magenta\" cx=\"347.95\" cy=\"-91\" rx=\"55.79\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"347.95\" y=\"-87.3\" font-family=\"Times,serif\" font-size=\"14.00\">ethdev_tx</text>\n </g>\n <!-- pkt_drop -->\n <g id=\"node4\" class=\"node\">\n <title>pkt_drop</title>\n-<ellipse fill=\"none\" stroke=\"cyan\" cx=\"254\" cy=\"-18\" rx=\"51.99\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"254\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">pkt_drop</text>\n+<ellipse fill=\"none\" stroke=\"cyan\" cx=\"404.95\" cy=\"-18\" rx=\"51.99\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"404.95\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">pkt_drop</text>\n </g>\n <!-- ethdev_tx&#45;&gt;pkt_drop -->\n <g id=\"edge14\" class=\"edge\">\n <title>ethdev_tx&#45;&gt;pkt_drop</title>\n-<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M318.94,-73.89C307.58,-64.29 293,-51.96 280.53,-41.42\"/>\n-<polygon fill=\"cyan\" stroke=\"cyan\" points=\"282.59,-38.58 272.7,-34.8 278.07,-43.93 282.59,-38.58\"/>\n+<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M361.45,-73.17C368.55,-64.33 377.39,-53.33 385.23,-43.55\"/>\n+<polygon fill=\"cyan\" stroke=\"cyan\" points=\"388,-45.69 391.53,-35.71 382.54,-41.31 388,-45.69\"/>\n </g>\n <!-- kernel_tx -->\n <g id=\"node5\" class=\"node\">\n <title>kernel_tx</title>\n-<ellipse fill=\"none\" stroke=\"blue\" cx=\"120\" cy=\"-272\" rx=\"53.89\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"120\" y=\"-268.3\" font-family=\"Times,serif\" font-size=\"14.00\">kernel_tx</text>\n+<ellipse fill=\"none\" stroke=\"blue\" cx=\"53.95\" cy=\"-251\" rx=\"53.89\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"53.95\" y=\"-247.3\" font-family=\"Times,serif\" font-size=\"14.00\">kernel_tx</text>\n </g>\n <!-- kernel_tx&#45;&gt;kernel_rx -->\n <g id=\"edge16\" class=\"edge\">\n <title>kernel_tx&#45;&gt;kernel_rx</title>\n-<path fill=\"none\" stroke=\"red\" stroke-dasharray=\"5,2\" d=\"M110.99,-254.17C106.52,-245.81 101,-235.51 95.99,-226.14\"/>\n-<polygon fill=\"red\" stroke=\"red\" points=\"99.01,-224.36 91.2,-217.2 92.84,-227.67 99.01,-224.36\"/>\n+<path fill=\"none\" stroke=\"red\" stroke-dasharray=\"5,2\" d=\"M53.95,-232.81C53.95,-224.79 53.95,-215.05 53.95,-206.07\"/>\n+<polygon fill=\"red\" stroke=\"red\" points=\"57.45,-206.03 53.95,-196.03 50.45,-206.03 57.45,-206.03\"/>\n </g>\n <!-- pkt_cls&#45;&gt;pkt_drop -->\n <g id=\"edge15\" class=\"edge\">\n <title>pkt_cls&#45;&gt;pkt_drop</title>\n-<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M84,-348.97C48.65,-337.7 0,-314.61 0,-273 0,-273 0,-273 0,-90 0,-49.99 118.4,-31.52 193.52,-23.82\"/>\n-<polygon fill=\"cyan\" stroke=\"cyan\" points=\"194.21,-27.27 203.82,-22.81 193.52,-20.31 194.21,-27.27\"/>\n+<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M304.77,-335.88C400.4,-332.2 622.95,-316.71 622.95,-252 622.95,-252 622.95,-252 622.95,-90 622.95,-56.33 527.72,-36.15 463.14,-26.34\"/>\n+<polygon fill=\"cyan\" stroke=\"cyan\" points=\"463.46,-22.85 453.06,-24.85 462.44,-29.77 463.46,-22.85\"/>\n </g>\n <!-- pkt_cls&#45;&gt;kernel_tx -->\n <g id=\"edge5\" class=\"edge\">\n <title>pkt_cls&#45;&gt;kernel_tx</title>\n-<path fill=\"none\" stroke=\"blue\" d=\"M120,-340.8C120,-329.16 120,-313.55 120,-300.24\"/>\n-<polygon fill=\"blue\" stroke=\"blue\" points=\"123.5,-300.18 120,-290.18 116.5,-300.18 123.5,-300.18\"/>\n-<text text-anchor=\"middle\" x=\"172.5\" y=\"-311.8\" font-family=\"Times,serif\" font-size=\"14.00\">exception pkts</text>\n+<path fill=\"none\" stroke=\"blue\" d=\"M219.14,-335.96C164.86,-333.64 75.77,-326.15 54.95,-302 49.6,-295.81 48.06,-287.4 48.24,-279.24\"/>\n+<polygon fill=\"blue\" stroke=\"blue\" points=\"51.73,-279.54 49.23,-269.24 44.76,-278.84 51.73,-279.54\"/>\n+<text text-anchor=\"middle\" x=\"107.45\" y=\"-290.8\" font-family=\"Times,serif\" font-size=\"14.00\">exception pkts</text>\n </g>\n <!-- ip4_lookup -->\n <g id=\"node7\" class=\"node\">\n <title>ip4_lookup</title>\n-<ellipse fill=\"none\" stroke=\"black\" cx=\"252\" cy=\"-272\" rx=\"60.39\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"252\" y=\"-268.3\" font-family=\"Times,serif\" font-size=\"14.00\">ip4_lookup</text>\n+<ellipse fill=\"none\" stroke=\"black\" cx=\"261.95\" cy=\"-251\" rx=\"60.39\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"261.95\" y=\"-247.3\" font-family=\"Times,serif\" font-size=\"14.00\">ip4_lookup</text>\n </g>\n <!-- pkt_cls&#45;&gt;ip4_lookup -->\n <g id=\"edge3\" class=\"edge\">\n <title>pkt_cls&#45;&gt;ip4_lookup</title>\n-<path fill=\"none\" stroke=\"black\" d=\"M160.54,-352.79C182.64,-348.15 209.23,-339.41 228,-323 235.09,-316.81 240.26,-308.05 243.95,-299.6\"/>\n-<polygon fill=\"black\" stroke=\"black\" points=\"247.32,-300.57 247.62,-289.98 240.78,-298.07 247.32,-300.57\"/>\n-<text text-anchor=\"middle\" x=\"254.5\" y=\"-311.8\" font-family=\"Times,serif\" font-size=\"14.00\">ipv4</text>\n+<path fill=\"none\" stroke=\"black\" d=\"M261.95,-319.8C261.95,-308.16 261.95,-292.55 261.95,-279.24\"/>\n+<polygon fill=\"black\" stroke=\"black\" points=\"265.45,-279.18 261.95,-269.18 258.45,-279.18 265.45,-279.18\"/>\n+<text text-anchor=\"middle\" x=\"277.45\" y=\"-290.8\" font-family=\"Times,serif\" font-size=\"14.00\">ipv4</text>\n </g>\n <!-- ip6_lookup -->\n <g id=\"node8\" class=\"node\">\n <title>ip6_lookup</title>\n-<ellipse fill=\"none\" stroke=\"black\" cx=\"439\" cy=\"-272\" rx=\"60.39\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"439\" y=\"-268.3\" font-family=\"Times,serif\" font-size=\"14.00\">ip6_lookup</text>\n+<ellipse fill=\"none\" stroke=\"black\" cx=\"492.95\" cy=\"-251\" rx=\"60.39\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"492.95\" y=\"-247.3\" font-family=\"Times,serif\" font-size=\"14.00\">ip6_lookup</text>\n </g>\n <!-- pkt_cls&#45;&gt;ip6_lookup -->\n <g id=\"edge4\" class=\"edge\">\n <title>pkt_cls&#45;&gt;ip6_lookup</title>\n-<path fill=\"none\" stroke=\"black\" d=\"M157.52,-350.25C188.82,-343.6 234.51,-333.46 274,-323 313.2,-312.62 357.13,-299.22 389.79,-288.91\"/>\n-<polygon fill=\"black\" stroke=\"black\" points=\"391.08,-292.17 399.55,-285.81 388.96,-285.5 391.08,-292.17\"/>\n-<text text-anchor=\"middle\" x=\"339.5\" y=\"-311.8\" font-family=\"Times,serif\" font-size=\"14.00\">ipv6</text>\n+<path fill=\"none\" stroke=\"black\" d=\"M293.1,-325.54C332.57,-311.01 400.93,-285.86 446.54,-269.07\"/>\n+<polygon fill=\"black\" stroke=\"black\" points=\"448.02,-272.26 456.2,-265.52 445.61,-265.69 448.02,-272.26\"/>\n+<text text-anchor=\"middle\" x=\"407.45\" y=\"-290.8\" font-family=\"Times,serif\" font-size=\"14.00\">ipv6</text>\n </g>\n <!-- ip4_lookup&#45;&gt;pkt_drop -->\n <g id=\"edge7\" class=\"edge\">\n <title>ip4_lookup&#45;&gt;pkt_drop</title>\n-<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M239.17,-254.03C232.31,-243.87 224.56,-230.37 221,-217 204.89,-156.57 227.58,-83.56 242.59,-45.31\"/>\n-<polygon fill=\"cyan\" stroke=\"cyan\" points=\"245.89,-46.5 246.4,-35.92 239.4,-43.87 245.89,-46.5\"/>\n+<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M258.85,-232.91C253.68,-198.83 247.1,-121.54 282.95,-73 299.1,-51.12 326.1,-37.95 350.6,-30.11\"/>\n+<polygon fill=\"cyan\" stroke=\"cyan\" points=\"351.6,-33.46 360.19,-27.26 349.61,-26.75 351.6,-33.46\"/>\n </g>\n <!-- ip4_rewrite -->\n <g id=\"node9\" class=\"node\">\n <title>ip4_rewrite</title>\n-<ellipse fill=\"none\" stroke=\"black\" cx=\"294\" cy=\"-199\" rx=\"63.89\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"294\" y=\"-195.3\" font-family=\"Times,serif\" font-size=\"14.00\">ip4_rewrite</text>\n+<ellipse fill=\"none\" stroke=\"black\" cx=\"347.95\" cy=\"-178\" rx=\"63.89\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"347.95\" y=\"-174.3\" font-family=\"Times,serif\" font-size=\"14.00\">ip4_rewrite</text>\n </g>\n <!-- ip4_lookup&#45;&gt;ip4_rewrite -->\n <g id=\"edge6\" class=\"edge\">\n <title>ip4_lookup&#45;&gt;ip4_rewrite</title>\n-<path fill=\"none\" stroke=\"black\" d=\"M261.95,-254.17C266.95,-245.72 273.12,-235.29 278.71,-225.85\"/>\n-<polygon fill=\"black\" stroke=\"black\" points=\"281.75,-227.59 283.83,-217.2 275.72,-224.02 281.75,-227.59\"/>\n+<path fill=\"none\" stroke=\"black\" d=\"M281.46,-233.89C292.92,-224.42 307.6,-212.31 320.25,-201.87\"/>\n+<polygon fill=\"black\" stroke=\"black\" points=\"322.73,-204.36 328.21,-195.29 318.27,-198.96 322.73,-204.36\"/>\n </g>\n <!-- ip4_local -->\n <g id=\"node11\" class=\"node\">\n <title>ip4_local</title>\n-<ellipse fill=\"none\" stroke=\"black\" cx=\"136\" cy=\"-145\" rx=\"51.19\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"136\" y=\"-141.3\" font-family=\"Times,serif\" font-size=\"14.00\">ip4_local</text>\n+<ellipse fill=\"none\" stroke=\"black\" cx=\"176.95\" cy=\"-178\" rx=\"51.19\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"176.95\" y=\"-174.3\" font-family=\"Times,serif\" font-size=\"14.00\">ip4_local</text>\n </g>\n <!-- ip4_lookup&#45;&gt;ip4_local -->\n <g id=\"edge17\" class=\"edge\">\n <title>ip4_lookup&#45;&gt;ip4_local</title>\n-<path fill=\"none\" stroke=\"black\" d=\"M218.11,-256.86C207.64,-251.39 196.61,-244.41 188,-236 169.45,-217.88 155.34,-191.74 146.53,-172.29\"/>\n-<polygon fill=\"black\" stroke=\"black\" points=\"149.72,-170.86 142.52,-163.08 143.3,-173.65 149.72,-170.86\"/>\n+<path fill=\"none\" stroke=\"black\" d=\"M242.66,-233.89C231.17,-224.29 216.41,-211.96 203.79,-201.42\"/>\n+<polygon fill=\"black\" stroke=\"black\" points=\"205.78,-198.53 195.86,-194.8 201.29,-203.9 205.78,-198.53\"/>\n </g>\n <!-- ip6_lookup&#45;&gt;pkt_drop -->\n <g id=\"edge11\" class=\"edge\">\n <title>ip6_lookup&#45;&gt;pkt_drop</title>\n-<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M470.57,-256.44C486.08,-247.46 503.27,-234.31 512,-217 519.2,-202.71 517.24,-196.12 512,-181 486.88,-108.48 466,-83.15 395,-54 367.69,-42.79 335.88,-34.51 309.39,-28.83\"/>\n-<polygon fill=\"cyan\" stroke=\"cyan\" points=\"310.02,-25.39 299.52,-26.78 308.6,-32.24 310.02,-25.39\"/>\n+<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M524.51,-235.44C540.02,-226.46 557.22,-213.31 565.95,-196 573.15,-181.71 572.55,-174.57 565.95,-160 540.59,-104.08 480.88,-61.6 441.74,-38.51\"/>\n+<polygon fill=\"cyan\" stroke=\"cyan\" points=\"443.16,-35.29 432.75,-33.34 439.67,-41.36 443.16,-35.29\"/>\n </g>\n <!-- ip6_rewrite -->\n <g id=\"node10\" class=\"node\">\n <title>ip6_rewrite</title>\n-<ellipse fill=\"none\" stroke=\"black\" cx=\"439\" cy=\"-199\" rx=\"63.89\" ry=\"18\"/>\n-<text text-anchor=\"middle\" x=\"439\" y=\"-195.3\" font-family=\"Times,serif\" font-size=\"14.00\">ip6_rewrite</text>\n+<ellipse fill=\"none\" stroke=\"black\" cx=\"492.95\" cy=\"-178\" rx=\"63.89\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"492.95\" y=\"-174.3\" font-family=\"Times,serif\" font-size=\"14.00\">ip6_rewrite</text>\n </g>\n <!-- ip6_lookup&#45;&gt;ip6_rewrite -->\n <g id=\"edge10\" class=\"edge\">\n <title>ip6_lookup&#45;&gt;ip6_rewrite</title>\n-<path fill=\"none\" stroke=\"black\" d=\"M439,-253.81C439,-245.79 439,-236.05 439,-227.07\"/>\n-<polygon fill=\"black\" stroke=\"black\" points=\"442.5,-227.03 439,-217.03 435.5,-227.03 442.5,-227.03\"/>\n+<path fill=\"none\" stroke=\"black\" d=\"M492.95,-232.81C492.95,-224.79 492.95,-215.05 492.95,-206.07\"/>\n+<polygon fill=\"black\" stroke=\"black\" points=\"496.45,-206.03 492.95,-196.03 489.45,-206.03 496.45,-206.03\"/>\n </g>\n <!-- ip4_rewrite&#45;&gt;ethdev_tx -->\n <g id=\"edge8\" class=\"edge\">\n <title>ip4_rewrite&#45;&gt;ethdev_tx</title>\n-<path fill=\"none\" stroke=\"green\" d=\"M301.07,-180.97C308.09,-164.05 318.96,-137.86 327.09,-118.28\"/>\n-<polygon fill=\"green\" stroke=\"green\" points=\"330.35,-119.57 330.95,-108.99 323.88,-116.88 330.35,-119.57\"/>\n+<path fill=\"none\" stroke=\"green\" d=\"M347.95,-159.8C347.95,-148.16 347.95,-132.55 347.95,-119.24\"/>\n+<polygon fill=\"green\" stroke=\"green\" points=\"351.45,-119.18 347.95,-109.18 344.45,-119.18 351.45,-119.18\"/>\n </g>\n <!-- ip4_rewrite&#45;&gt;pkt_drop -->\n <g id=\"edge9\" class=\"edge\">\n <title>ip4_rewrite&#45;&gt;pkt_drop</title>\n-<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M289.85,-180.97C285.53,-163.07 278.61,-134.1 273,-109 268.3,-87.99 263.29,-64.16 259.59,-46.3\"/>\n-<polygon fill=\"cyan\" stroke=\"cyan\" points=\"262.97,-45.37 257.52,-36.28 256.11,-46.78 262.97,-45.37\"/>\n+<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M370.32,-161.1C385.53,-148.83 404.37,-130.37 412.95,-109 421.04,-88.82 418.02,-64.12 413.56,-45.7\"/>\n+<polygon fill=\"cyan\" stroke=\"cyan\" points=\"416.9,-44.66 410.91,-35.93 410.15,-46.49 416.9,-44.66\"/>\n </g>\n <!-- ip6_rewrite&#45;&gt;ethdev_tx -->\n <g id=\"edge12\" class=\"edge\">\n <title>ip6_rewrite&#45;&gt;ethdev_tx</title>\n-<path fill=\"none\" stroke=\"green\" d=\"M423.22,-181.44C406.47,-163.86 379.84,-135.91 360.81,-115.94\"/>\n-<polygon fill=\"green\" stroke=\"green\" points=\"363.1,-113.27 353.67,-108.45 358.03,-118.1 363.1,-113.27\"/>\n+<path fill=\"none\" stroke=\"green\" d=\"M466.35,-161.41C442.8,-147.6 408.27,-127.36 382.57,-112.3\"/>\n+<polygon fill=\"green\" stroke=\"green\" points=\"384.28,-109.24 373.88,-107.21 380.74,-115.28 384.28,-109.24\"/>\n </g>\n <!-- ip6_rewrite&#45;&gt;pkt_drop -->\n <g id=\"edge13\" class=\"edge\">\n <title>ip6_rewrite&#45;&gt;pkt_drop</title>\n-<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M438.77,-180.67C437.49,-154.09 431.22,-103.19 403,-73 379.35,-47.7 342.93,-34.22 312.02,-27.06\"/>\n-<polygon fill=\"cyan\" stroke=\"cyan\" points=\"312.71,-23.63 302.2,-24.95 311.24,-30.47 312.71,-23.63\"/>\n+<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M485.15,-159.86C473.93,-135.7 452.15,-90.48 429.95,-54 427.97,-50.75 425.78,-47.4 423.55,-44.13\"/>\n+<polygon fill=\"cyan\" stroke=\"cyan\" points=\"426.28,-41.92 417.67,-35.75 420.55,-45.94 426.28,-41.92\"/>\n </g>\n <!-- ip4_local&#45;&gt;pkt_drop -->\n <g id=\"edge18\" class=\"edge\">\n <title>ip4_local&#45;&gt;pkt_drop</title>\n-<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M142.47,-126.87C150.6,-107.23 166.18,-75.04 188,-54 195,-47.25 203.56,-41.45 212.16,-36.63\"/>\n-<polygon fill=\"cyan\" stroke=\"cyan\" points=\"213.85,-39.7 221.08,-31.95 210.6,-33.5 213.85,-39.7\"/>\n+<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M191.02,-160.51C195.47,-154.86 200.21,-148.35 203.95,-142 225.57,-105.29 209.02,-81.03 241.95,-54 257.83,-40.96 306.22,-31.62 346.19,-25.89\"/>\n+<polygon fill=\"cyan\" stroke=\"cyan\" points=\"346.72,-29.35 356.14,-24.51 345.75,-22.41 346.72,-29.35\"/>\n+</g>\n+<!-- udp4_input -->\n+<g id=\"node12\" class=\"node\">\n+<title>udp4_input</title>\n+<ellipse fill=\"none\" stroke=\"black\" cx=\"126.95\" cy=\"-91\" rx=\"63.09\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"126.95\" y=\"-87.3\" font-family=\"Times,serif\" font-size=\"14.00\">udp4_input</text>\n+</g>\n+<!-- ip4_local&#45;&gt;udp4_input -->\n+<g id=\"edge19\" class=\"edge\">\n+<title>ip4_local&#45;&gt;udp4_input</title>\n+<path fill=\"none\" stroke=\"black\" d=\"M167.07,-160.21C159.99,-148.18 150.33,-131.75 142.26,-118.03\"/>\n+<polygon fill=\"black\" stroke=\"black\" points=\"145.06,-115.89 136.97,-109.05 139.03,-119.44 145.06,-115.89\"/>\n+<text text-anchor=\"middle\" x=\"177.45\" y=\"-130.8\" font-family=\"Times,serif\" font-size=\"14.00\">udpv4</text>\n+</g>\n+<!-- udp4_input&#45;&gt;pkt_drop -->\n+<g id=\"edge21\" class=\"edge\">\n+<title>udp4_input&#45;&gt;pkt_drop</title>\n+<path fill=\"none\" stroke=\"cyan\" stroke-dasharray=\"5,2\" d=\"M154.75,-74.82C169.08,-67.56 187.05,-59.32 203.95,-54 250.51,-39.35 305.19,-30.33 345.76,-25.12\"/>\n+<polygon fill=\"cyan\" stroke=\"cyan\" points=\"346.26,-28.59 355.75,-23.88 345.4,-21.64 346.26,-28.59\"/>\n+</g>\n+<!-- udp_user_node -->\n+<g id=\"node13\" class=\"node\">\n+<title>udp_user_node</title>\n+<ellipse fill=\"none\" stroke=\"black\" cx=\"126.95\" cy=\"-18\" rx=\"79.89\" ry=\"18\"/>\n+<text text-anchor=\"middle\" x=\"126.95\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">udp_user_node</text>\n+</g>\n+<!-- udp4_input&#45;&gt;udp_user_node -->\n+<g id=\"edge20\" class=\"edge\">\n+<title>udp4_input&#45;&gt;udp_user_node</title>\n+<path fill=\"none\" stroke=\"black\" d=\"M126.95,-72.81C126.95,-64.79 126.95,-55.05 126.95,-46.07\"/>\n+<polygon fill=\"black\" stroke=\"black\" points=\"130.45,-46.03 126.95,-36.03 123.45,-46.03 130.45,-46.03\"/>\n </g>\n </g>\n </svg>\ndiff --git a/lib/node/meson.build b/lib/node/meson.build\nindex c0d5b09e2f..c5b8ee656e 100644\n--- a/lib/node/meson.build\n+++ b/lib/node/meson.build\n@@ -22,11 +22,13 @@ sources = files(\n         'null.c',\n         'pkt_cls.c',\n         'pkt_drop.c',\n+        'udp4_input.c',\n )\n headers = files(\n         'rte_node_eth_api.h',\n         'rte_node_ip4_api.h',\n         'rte_node_ip6_api.h',\n+        'rte_node_udp4_input_api.h',\n )\n \n # Strict-aliasing rules are violated by uint8_t[] to context size casts.\ndiff --git a/lib/node/rte_node_udp4_input_api.h b/lib/node/rte_node_udp4_input_api.h\nnew file mode 100644\nindex 0000000000..c873acbbe0\n--- /dev/null\n+++ b/lib/node/rte_node_udp4_input_api.h\n@@ -0,0 +1,61 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2023 Marvell International Ltd.\n+ */\n+\n+#ifndef __INCLUDE_RTE_NODE_UDP4_INPUT_API_H__\n+#define __INCLUDE_RTE_NODE_UDP4_INPUT_API_H__\n+\n+/**\n+ * @file rte_node_udp4_input_api.h\n+ *\n+ * @warning\n+ * @b EXPERIMENTAL:\n+ * All functions in this file may be changed or removed without prior notice.\n+ *\n+ * This API allows to control path functions of udp4_* nodes\n+ * like udp4_input.\n+ *\n+ */\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+#include <rte_common.h>\n+#include <rte_compat.h>\n+\n+#include \"rte_graph.h\"\n+/**\n+ * UDP4 lookup next nodes.\n+ */\n+enum rte_node_udp4_input_next {\n+\tRTE_NODE_UDP4_INPUT_NEXT_PKT_DROP,\n+\t/**< Packet drop node. */\n+};\n+\n+/**\n+ * Add usr node to receive udp4 frames.\n+ *\n+ * @param usr_node\n+ * Node registered by user to receive data.\n+ */\n+__rte_experimental\n+int rte_node_udp4_usr_node_add(const char *usr_node);\n+\n+/**\n+ * Add udpv4 dst_port to lookup table.\n+ *\n+ * @param dst_port\n+ *   Dst Port of packet to be added for consumption.\n+ * @param next_node\n+ *   Next node packet to be added for consumption.\n+ * @return\n+ *   0 on success, negative otherwise.\n+ */\n+__rte_experimental\n+int rte_node_udp4_dst_port_add(uint32_t dst_port, rte_edge_t next_node);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* __INCLUDE_RTE_NODE_UDP4_API_H__ */\ndiff --git a/lib/node/udp4_input.c b/lib/node/udp4_input.c\nnew file mode 100644\nindex 0000000000..80cedce548\n--- /dev/null\n+++ b/lib/node/udp4_input.c\n@@ -0,0 +1,226 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2023 Marvell International Ltd.\n+ */\n+\n+#include <arpa/inet.h>\n+#include <sys/socket.h>\n+\n+#include <rte_ethdev.h>\n+#include <rte_ether.h>\n+#include <rte_graph.h>\n+#include <rte_graph_worker.h>\n+#include <rte_ip.h>\n+#include <rte_lpm.h>\n+#include <rte_hash.h>\n+#include <rte_fbk_hash.h>\n+#include <rte_jhash.h>\n+#include <rte_hash_crc.h>\n+\n+\n+#include \"rte_node_udp4_input_api.h\"\n+\n+#include \"node_private.h\"\n+\n+#define UDP4_INPUT_HASH_TBL_SIZE 1024\n+\n+#define UDP4_INPUT_NODE_HASH(ctx) \\\n+\t(((struct udp4_input_node_ctx *)ctx)->hash)\n+\n+#define UDP4_INPUT_NODE_NEXT_INDEX(ctx) \\\n+\t(((struct udp4_input_node_ctx *)ctx)->next_index)\n+\n+\n+/* UDP4 input  global data struct */\n+struct udp4_input_node_main {\n+\tstruct rte_hash *hash_tbl[RTE_MAX_NUMA_NODES];\n+};\n+\n+static struct udp4_input_node_main udp4_input_nm;\n+\n+struct udp4_input_node_ctx {\n+\t/* Socket's Hash table */\n+\tstruct rte_hash *hash;\n+\t/* Cached next index */\n+\tuint16_t next_index;\n+};\n+\n+struct flow_key {\n+\tuint32_t prt_dst;\n+};\n+\n+static struct rte_hash_parameters udp4_params = {\n+\t.entries = UDP4_INPUT_HASH_TBL_SIZE,\n+\t.key_len = sizeof(uint32_t),\n+\t.hash_func = rte_jhash,\n+\t.hash_func_init_val = 0,\n+\t.socket_id = 0,\n+};\n+\n+int\n+rte_node_udp4_dst_port_add(uint32_t dst_port, rte_edge_t next_node)\n+{\n+\tuint8_t socket;\n+\tint rc;\n+\n+\tfor (socket = 0; socket < RTE_MAX_NUMA_NODES; socket++) {\n+\t\tif (!udp4_input_nm.hash_tbl[socket])\n+\t\t\tcontinue;\n+\n+\t\trc = rte_hash_add_key_data(udp4_input_nm.hash_tbl[socket],\n+\t\t\t\t\t   &dst_port, (void *)(uintptr_t)next_node);\n+\t\tif (rc < 0) {\n+\t\t\tnode_err(\"udp4_lookup\", \"Failed to add key for sock %u, rc=%d\",\n+\t\t\t\t\tsocket, rc);\n+\t\t\treturn rc;\n+\t\t}\n+\t}\n+\treturn 0;\n+}\n+\n+int\n+rte_node_udp4_usr_node_add(const char *usr_node)\n+{\n+\tconst char *next_nodes = usr_node;\n+\trte_node_t udp4_input_node_id, count;\n+\n+\tudp4_input_node_id = rte_node_from_name(\"udp4_input\");\n+\tcount = rte_node_edge_update(udp4_input_node_id, RTE_EDGE_ID_INVALID,\n+\t\t\t\t     &next_nodes, 1);\n+\tif (count == 0) {\n+\t\tnode_dbg(\"udp4_input\", \"Adding usr node as edge to udp4_input failed\");\n+\t\treturn count;\n+\t}\n+\tcount = rte_node_edge_count(udp4_input_node_id) - 1;\n+\treturn count;\n+}\n+\n+static int\n+setup_udp4_dstprt_hash(struct udp4_input_node_main *nm, int socket)\n+{\n+\tstruct rte_hash_parameters *hash_udp4 = &udp4_params;\n+\tchar s[RTE_HASH_NAMESIZE];\n+\n+\t/* One Hash table per socket */\n+\tif (nm->hash_tbl[socket])\n+\t\treturn 0;\n+\n+\t/* create Hash table */\n+\tsnprintf(s, sizeof(s), \"UDP4_INPUT_HASH_%d\", socket);\n+\thash_udp4->name = s;\n+\thash_udp4->socket_id = socket;\n+\tnm->hash_tbl[socket] = rte_hash_create(hash_udp4);\n+\tif (nm->hash_tbl[socket] == NULL)\n+\t\treturn -rte_errno;\n+\n+\treturn 0;\n+}\n+\n+static int\n+udp4_input_node_init(const struct rte_graph *graph, struct rte_node *node)\n+{\n+\tuint16_t socket, lcore_id;\n+\tstatic uint8_t init_once;\n+\tint rc;\n+\n+\tRTE_SET_USED(graph);\n+\tRTE_BUILD_BUG_ON(sizeof(struct udp4_input_node_ctx) > RTE_NODE_CTX_SZ);\n+\n+\tif (!init_once) {\n+\n+\t\t/* Setup HASH tables for all sockets */\n+\t\tRTE_LCORE_FOREACH(lcore_id)\n+\t\t{\n+\t\t\tsocket = rte_lcore_to_socket_id(lcore_id);\n+\t\t\trc = setup_udp4_dstprt_hash(&udp4_input_nm, socket);\n+\t\t\tif (rc) {\n+\t\t\t\tnode_err(\"udp4_lookup\",\n+\t\t\t\t\t\t\"Failed to setup hash tbl for sock %u, rc=%d\",\n+\t\t\t\t\t\tsocket, rc);\n+\t\t\t\treturn rc;\n+\t\t\t}\n+\t\t}\n+\t\tinit_once = 1;\n+\t}\n+\n+\tUDP4_INPUT_NODE_HASH(node->ctx) = udp4_input_nm.hash_tbl[graph->socket];\n+\n+\tnode_dbg(\"udp4_input\", \"Initialized udp4_input node\");\n+\treturn 0;\n+}\n+\n+static uint16_t\n+udp4_input_node_process_scalar(struct rte_graph *graph, struct rte_node *node,\n+\t\t\t       void **objs, uint16_t nb_objs)\n+{\n+\tstruct rte_hash *hash_tbl_handle = UDP4_INPUT_NODE_HASH(node->ctx);\n+\trte_edge_t next_index, udplookup_node;\n+\tstruct rte_udp_hdr *pkt_udp_hdr;\n+\tuint16_t last_spec = 0;\n+\tvoid **to_next, **from;\n+\tstruct rte_mbuf *mbuf;\n+\tuint16_t held = 0;\n+\tuint16_t next = 0;\n+\tint i, rc;\n+\n+\t/* Speculative next */\n+\tnext_index = UDP4_INPUT_NODE_NEXT_INDEX(node->ctx);\n+\n+\tfrom = objs;\n+\n+\tto_next = rte_node_next_stream_get(graph, node, next_index, nb_objs);\n+\tfor (i = 0; i < nb_objs; i++) {\n+\t\tstruct flow_key key_port;\n+\n+\t\tmbuf = (struct rte_mbuf *)objs[i];\n+\t\tpkt_udp_hdr = rte_pktmbuf_mtod_offset(mbuf, struct rte_udp_hdr *,\n+\t\t\t\t\t\tsizeof(struct rte_ether_hdr) +\n+\t\t\t\t\t\tsizeof(struct rte_ipv4_hdr));\n+\n+\t\tkey_port.prt_dst = rte_cpu_to_be_16(pkt_udp_hdr->dst_port);\n+\t\trc = rte_hash_lookup_data(hash_tbl_handle,\n+\t\t\t\t\t  &key_port.prt_dst,\n+\t\t\t\t\t  (void **)&udplookup_node);\n+\t\tnext = (rc < 0) ? RTE_NODE_UDP4_INPUT_NEXT_PKT_DROP\n+\t\t\t\t    : udplookup_node;\n+\n+\t\tif (unlikely(next_index != next)) {\n+\t\t\t/* Copy things successfully speculated till now */\n+\t\t\trte_memcpy(to_next, from, last_spec * sizeof(from[0]));\n+\t\t\tfrom += last_spec;\n+\t\t\tto_next += last_spec;\n+\t\t\theld += last_spec;\n+\t\t\tlast_spec = 0;\n+\n+\t\t\trte_node_enqueue_x1(graph, node, next, from[0]);\n+\t\t\tfrom += 1;\n+\t\t} else {\n+\t\t\tlast_spec += 1;\n+\t\t}\n+\t}\n+\t/* !!! Home run !!! */\n+\tif (likely(last_spec == nb_objs)) {\n+\t\trte_node_next_stream_move(graph, node, next_index);\n+\t\treturn nb_objs;\n+\t}\n+\theld += last_spec;\n+\trte_memcpy(to_next, from, last_spec * sizeof(from[0]));\n+\trte_node_next_stream_put(graph, node, next_index, held);\n+\t/* Save the last next used */\n+\tUDP4_INPUT_NODE_NEXT_INDEX(node->ctx) = next;\n+\n+\treturn nb_objs;\n+}\n+\n+static struct rte_node_register udp4_input_node = {\n+\t.process = udp4_input_node_process_scalar,\n+\t.name = \"udp4_input\",\n+\n+\t.init = udp4_input_node_init,\n+\n+\t.nb_edges = RTE_NODE_UDP4_INPUT_NEXT_PKT_DROP + 1,\n+\t.next_nodes = {\n+\t\t[RTE_NODE_UDP4_INPUT_NEXT_PKT_DROP] = \"pkt_drop\",\n+\t},\n+};\n+\n+RTE_NODE_REGISTER(udp4_input_node);\ndiff --git a/lib/node/version.map b/lib/node/version.map\nindex 40df308bfe..c51befce09 100644\n--- a/lib/node/version.map\n+++ b/lib/node/version.map\n@@ -6,6 +6,8 @@ EXPERIMENTAL {\n \trte_node_ip4_rewrite_add;\n \trte_node_ip6_rewrite_add;\n \trte_node_ip6_route_add;\n+\trte_node_udp4_usr_node_add;\n+\trte_node_udp4_dst_port_add;\n \trte_node_logtype;\n \tlocal: *;\n };\n",
    "prefixes": [
        "v6",
        "2/2"
    ]
}