get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66915,
    "url": "https://patches.dpdk.org/api/patches/66915/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200318213551.3489504-22-jerinj@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": "<20200318213551.3489504-22-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200318213551.3489504-22-jerinj@marvell.com",
    "date": "2020-03-18T21:35:46",
    "name": "[v1,21/26] node: add ipv4 rewrite node",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "aacaf924ca3933606f55a03a09a43a5c84d3c180",
    "submitter": {
        "id": 1188,
        "url": "https://patches.dpdk.org/api/people/1188/?format=api",
        "name": "Jerin Jacob Kollanukkaran",
        "email": "jerinj@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/20200318213551.3489504-22-jerinj@marvell.com/mbox/",
    "series": [
        {
            "id": 8974,
            "url": "https://patches.dpdk.org/api/series/8974/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=8974",
            "date": "2020-03-18T21:35:25",
            "name": "graph: introduce graph subsystem",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/8974/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/66915/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/66915/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2FB5DA057D;\n\tWed, 18 Mar 2020 22:39:10 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id ECFA71C197;\n\tWed, 18 Mar 2020 22:36:46 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id EA6091C197\n for <dev@dpdk.org>; Wed, 18 Mar 2020 22:36:45 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 02ILVOKm013821; Wed, 18 Mar 2020 14:36:44 -0700",
            "from sc-exch02.marvell.com ([199.233.58.182])\n by mx0b-0016f401.pphosted.com with ESMTP id 2yu9rpcc6k-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Wed, 18 Mar 2020 14:36:44 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com\n (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Wed, 18 Mar 2020 14:36:42 -0700",
            "from SC-EXCH03.marvell.com (10.93.176.83) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Wed, 18 Mar 2020 14:36:41 -0700",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Wed, 18 Mar 2020 14:36:41 -0700",
            "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id 1F66B3F703F;\n Wed, 18 Mar 2020 14:36:38 -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=pfpt0818;\n bh=luz2GgeuNrw1rNPVYC8yttazxG4egwOdAsQHebgAjas=;\n b=SjhJlp3pQqreaOQjrmpY6KwZjymOAr9GWu+OmyuFTAFtrf2NZiz7qqJJQKoRQDV37Dtg\n xBOVFzvJv2iSwjVm26qK2H4648Wt2HfSMNvnmhFjn6j2KDz0FJhEgRs+M1BXFIUySj2t\n c/28mOHaB0mKvKM7DqWyH3p2y+FyufGAMPNdxLONh7O/4nJF+fIERvL2sy+K2W3NMRDD\n +SVZT4nPG/cBbGIemrlx3Z3EoaarXlODpU7Ge9X3RuqKeie6cZrl6/HQ5SD0we5TorwQ\n 7B2LSdVgMU+VGDic09AGJFx2SFgjRRNX0dVMjaL5d2cClo9inX89jMH2IejBbqVu3kpB cw==",
        "From": "<jerinj@marvell.com>",
        "To": "Nithin Dabilpuram <ndabilpuram@marvell.com>, Pavan Nikhilesh\n <pbhagavatula@marvell.com>",
        "CC": "<dev@dpdk.org>, <thomas@monjalon.net>, <david.marchand@redhat.com>,\n <mdr@ashroe.eu>, <mattias.ronnblom@ericsson.com>, <kirankumark@marvell.com>",
        "Date": "Thu, 19 Mar 2020 03:05:46 +0530",
        "Message-ID": "<20200318213551.3489504-22-jerinj@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200318213551.3489504-1-jerinj@marvell.com>",
        "References": "<20200318213551.3489504-1-jerinj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645\n definitions=2020-03-18_07:2020-03-18,\n 2020-03-18 signatures=0",
        "Subject": "[dpdk-dev]  [PATCH v1 21/26] node: add ipv4 rewrite node",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Kiran Kumar K <kirankumark@marvell.com>\n\nAdd ip4 rewrite process function for ip4_rewrite\nrte_node. On every packet received by this node,\nheader is overwritten with new data before forwarding\nit to next node. Header data to overwrite with is\nidentified by next hop id passed in mbuf priv data\nby previous node.\n\nSigned-off-by: Kiran Kumar K <kirankumark@marvell.com>\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\nSigned-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\n---\n lib/librte_node/Makefile           |   1 +\n lib/librte_node/ip4_rewrite.c      | 269 +++++++++++++++++++++++++++++\n lib/librte_node/ip4_rewrite_priv.h |  55 ++++++\n lib/librte_node/meson.build        |   2 +-\n 4 files changed, 326 insertions(+), 1 deletion(-)\n create mode 100644 lib/librte_node/ip4_rewrite.c\n create mode 100644 lib/librte_node/ip4_rewrite_priv.h",
    "diff": "diff --git a/lib/librte_node/Makefile b/lib/librte_node/Makefile\nindex d85a9e9eb..be7e7e338 100644\n--- a/lib/librte_node/Makefile\n+++ b/lib/librte_node/Makefile\n@@ -20,6 +20,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_NODE) += ethdev_rx.c\n SRCS-$(CONFIG_RTE_LIBRTE_NODE) += ethdev_tx.c\n SRCS-$(CONFIG_RTE_LIBRTE_NODE) += ethdev_ctrl.c\n SRCS-$(CONFIG_RTE_LIBRTE_NODE) += ip4_lookup.c\n+SRCS-$(CONFIG_RTE_LIBRTE_NODE) += ip4_rewrite.c\n \n # install header files\n SYMLINK-$(CONFIG_RTE_LIBRTE_NODE)-include += rte_node_ip4_api.h\ndiff --git a/lib/librte_node/ip4_rewrite.c b/lib/librte_node/ip4_rewrite.c\nnew file mode 100644\nindex 000000000..f317f7f4f\n--- /dev/null\n+++ b/lib/librte_node/ip4_rewrite.c\n@@ -0,0 +1,269 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2020 Marvell International Ltd.\n+ */\n+\n+#include <rte_debug.h>\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_malloc.h>\n+#include <rte_mbuf.h>\n+#include <rte_node_ip4_api.h>\n+#include <rte_tcp.h>\n+#include <rte_udp.h>\n+#include <rte_vect.h>\n+\n+#include \"ip4_rewrite_priv.h\"\n+#include \"node_private.h\"\n+\n+static struct ip4_rewrite_node_main *ip4_rewrite_nm;\n+\n+static uint16_t\n+ip4_rewrite_node_process(struct rte_graph *graph, struct rte_node *node,\n+\t\t\t void **objs, uint16_t nb_objs)\n+{\n+\tstruct rte_mbuf *mbuf0, *mbuf1, *mbuf2, *mbuf3, **pkts;\n+\tstruct ip4_rewrite_nh_header *nh = ip4_rewrite_nm->nh;\n+\tuint16_t next0, next1, next2, next3, next_index;\n+\tstruct rte_ipv4_hdr *ip0, *ip1, *ip2, *ip3;\n+\tuint16_t n_left_from, held = 0, last_spec = 0;\n+\tvoid *d0, *d1, *d2, *d3;\n+\tvoid **to_next, **from;\n+\trte_xmm_t priv01;\n+\trte_xmm_t priv23;\n+\tint i;\n+\n+\t/* Speculative next as last next */\n+\tnext_index = *(uint16_t *)node->ctx;\n+\trte_prefetch0(nh);\n+\n+\tpkts = (struct rte_mbuf **)objs;\n+\tfrom = objs;\n+\tn_left_from = nb_objs;\n+\n+\tfor (i = 0; i < 4 && i < n_left_from; i++)\n+\t\trte_prefetch0(pkts[i]);\n+\n+\t/* Get stream for the speculated next node */\n+\tto_next = rte_node_next_stream_get(graph, node, next_index, nb_objs);\n+\t/* Update Ethernet header of pkts */\n+\twhile (n_left_from >= 4) {\n+\t\tif (likely(n_left_from >= 7)) {\n+\t\t\t/* Prefetch only next-mbuf struct and priv area.\n+\t\t\t * Data need not be prefetched as we only write.\n+\t\t\t */\n+\t\t\trte_prefetch0(pkts[4]);\n+\t\t\trte_prefetch0(pkts[5]);\n+\t\t\trte_prefetch0(pkts[6]);\n+\t\t\trte_prefetch0(pkts[7]);\n+\t\t}\n+\n+\t\tmbuf0 = pkts[0];\n+\t\tmbuf1 = pkts[1];\n+\t\tmbuf2 = pkts[2];\n+\t\tmbuf3 = pkts[3];\n+\n+\t\tpkts += 4;\n+\t\tn_left_from -= 4;\n+\t\tpriv01.u64[0] = rte_node_mbuf_priv1(mbuf0)->u;\n+\t\tpriv01.u64[1] = rte_node_mbuf_priv1(mbuf1)->u;\n+\t\tpriv23.u64[0] = rte_node_mbuf_priv1(mbuf2)->u;\n+\t\tpriv23.u64[1] = rte_node_mbuf_priv1(mbuf3)->u;\n+\n+\t\t/* Increment checksum by one. */\n+\t\tpriv01.u32[1] += rte_cpu_to_be_16(0x0100);\n+\t\tpriv01.u32[3] += rte_cpu_to_be_16(0x0100);\n+\t\tpriv23.u32[1] += rte_cpu_to_be_16(0x0100);\n+\t\tpriv23.u32[3] += rte_cpu_to_be_16(0x0100);\n+\n+\t\t/* Update ttl,cksum rewrite ethernet hdr on mbuf0 */\n+\t\td0 = rte_pktmbuf_mtod(mbuf0, void *);\n+\t\trte_memcpy(d0, nh[priv01.u16[0]].rewrite_data,\n+\t\t\t   nh[priv01.u16[0]].rewrite_len);\n+\n+\t\tnext0 = nh[priv01.u16[0]].tx_node;\n+\t\tip0 = (struct rte_ipv4_hdr *)((uint8_t *)d0 +\n+\t\t\t\t\t      sizeof(struct rte_ether_hdr));\n+\t\tip0->time_to_live = priv01.u16[1] - 1;\n+\t\tip0->hdr_checksum = priv01.u16[2] + priv01.u16[3];\n+\n+\t\t/* Update ttl,cksum rewrite ethernet hdr on mbuf1 */\n+\t\td1 = rte_pktmbuf_mtod(mbuf1, void *);\n+\t\trte_memcpy(d1, nh[priv01.u16[4]].rewrite_data,\n+\t\t\t   nh[priv01.u16[4]].rewrite_len);\n+\n+\t\tnext1 = nh[priv01.u16[4]].tx_node;\n+\t\tip1 = (struct rte_ipv4_hdr *)((uint8_t *)d1 +\n+\t\t\t\t\t      sizeof(struct rte_ether_hdr));\n+\t\tip1->time_to_live = priv01.u16[5] - 1;\n+\t\tip1->hdr_checksum = priv01.u16[6] + priv01.u16[7];\n+\n+\t\t/* Update ttl,cksum rewrite ethernet hdr on mbuf2 */\n+\t\td2 = rte_pktmbuf_mtod(mbuf2, void *);\n+\t\trte_memcpy(d2, nh[priv23.u16[0]].rewrite_data,\n+\t\t\t   nh[priv23.u16[0]].rewrite_len);\n+\t\tnext2 = nh[priv23.u16[0]].tx_node;\n+\t\tip2 = (struct rte_ipv4_hdr *)((uint8_t *)d2 +\n+\t\t\t\t\t      sizeof(struct rte_ether_hdr));\n+\t\tip2->time_to_live = priv23.u16[1] - 1;\n+\t\tip2->hdr_checksum = priv23.u16[2] + priv23.u16[3];\n+\n+\t\t/* Update ttl,cksum rewrite ethernet hdr on mbuf3 */\n+\t\td3 = rte_pktmbuf_mtod(mbuf3, void *);\n+\t\trte_memcpy(d3, nh[priv23.u16[4]].rewrite_data,\n+\t\t\t   nh[priv23.u16[4]].rewrite_len);\n+\n+\t\tnext3 = nh[priv23.u16[4]].tx_node;\n+\t\tip3 = (struct rte_ipv4_hdr *)((uint8_t *)d3 +\n+\t\t\t\t\t      sizeof(struct rte_ether_hdr));\n+\t\tip3->time_to_live = priv23.u16[5] - 1;\n+\t\tip3->hdr_checksum = priv23.u16[6] + priv23.u16[7];\n+\n+\t\t/* Enqueue four to next node */\n+\t\trte_edge_t fix_spec =\n+\t\t\t((next_index == next0) && (next0 == next1) &&\n+\t\t\t (next1 == next2) && (next2 == next3));\n+\n+\t\tif (unlikely(fix_spec == 0)) {\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\t/* next0 */\n+\t\t\tif (next_index == next0) {\n+\t\t\t\tto_next[0] = from[0];\n+\t\t\t\tto_next++;\n+\t\t\t\theld++;\n+\t\t\t} else {\n+\t\t\t\trte_node_enqueue_x1(graph, node, next0,\n+\t\t\t\t\t\t    from[0]);\n+\t\t\t}\n+\n+\t\t\t/* next1 */\n+\t\t\tif (next_index == next1) {\n+\t\t\t\tto_next[0] = from[1];\n+\t\t\t\tto_next++;\n+\t\t\t\theld++;\n+\t\t\t} else {\n+\t\t\t\trte_node_enqueue_x1(graph, node, next1,\n+\t\t\t\t\t\t    from[1]);\n+\t\t\t}\n+\n+\t\t\t/* next2 */\n+\t\t\tif (next_index == next2) {\n+\t\t\t\tto_next[0] = from[2];\n+\t\t\t\tto_next++;\n+\t\t\t\theld++;\n+\t\t\t} else {\n+\t\t\t\trte_node_enqueue_x1(graph, node, next2,\n+\t\t\t\t\t\t    from[2]);\n+\t\t\t}\n+\n+\t\t\t/* next3 */\n+\t\t\tif (next_index == next3) {\n+\t\t\t\tto_next[0] = from[3];\n+\t\t\t\tto_next++;\n+\t\t\t\theld++;\n+\t\t\t} else {\n+\t\t\t\trte_node_enqueue_x1(graph, node, next3,\n+\t\t\t\t\t\t    from[3]);\n+\t\t\t}\n+\n+\t\t\tfrom += 4;\n+\n+\t\t\t/* Change speculation if last two are same */\n+\t\t\tif ((next_index != next3) && (next2 == next3)) {\n+\t\t\t\t/* Put the current speculated node */\n+\t\t\t\trte_node_next_stream_put(graph, node,\n+\t\t\t\t\t\t\t next_index, held);\n+\t\t\t\theld = 0;\n+\n+\t\t\t\t/* Get next speculated stream */\n+\t\t\t\tnext_index = next3;\n+\t\t\t\tto_next = rte_node_next_stream_get(\n+\t\t\t\t\tgraph, node, next_index, nb_objs);\n+\t\t\t}\n+\t\t} else {\n+\t\t\tlast_spec += 4;\n+\t\t}\n+\t}\n+\n+\twhile (n_left_from > 0) {\n+\t\tuint16_t chksum;\n+\n+\t\tmbuf0 = pkts[0];\n+\n+\t\tpkts += 1;\n+\t\tn_left_from -= 1;\n+\n+\t\td0 = rte_pktmbuf_mtod(mbuf0, void *);\n+\t\trte_memcpy(d0, nh[rte_node_mbuf_priv1(mbuf0)->nh].rewrite_data,\n+\t\t\t   nh[rte_node_mbuf_priv1(mbuf0)->nh].rewrite_len);\n+\n+\t\tnext0 = nh[rte_node_mbuf_priv1(mbuf0)->nh].tx_node;\n+\t\tip0 = (struct rte_ipv4_hdr *)((uint8_t *)d0 +\n+\t\t\t\t\t      sizeof(struct rte_ether_hdr));\n+\t\tchksum = rte_node_mbuf_priv1(mbuf0)->cksum +\n+\t\t\t rte_cpu_to_be_16(0x0100);\n+\t\tchksum += chksum >= 0xffff;\n+\t\tip0->hdr_checksum = chksum;\n+\t\tip0->time_to_live = rte_node_mbuf_priv1(mbuf0)->ttl - 1;\n+\n+\t\tif (unlikely(next_index ^ next0)) {\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, next0, from[0]);\n+\t\t\tfrom += 1;\n+\t\t} else {\n+\t\t\tlast_spec += 1;\n+\t\t}\n+\t}\n+\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+\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+\t*(uint16_t *)node->ctx = next_index;\n+\n+\treturn nb_objs;\n+}\n+\n+static int\n+ip4_rewrite_node_init(const struct rte_graph *graph, struct rte_node *node)\n+{\n+\n+\tRTE_SET_USED(graph);\n+\tRTE_SET_USED(node);\n+\tnode_dbg(\"ip4_rewrite\", \"Initialized ip4_rewrite node initialized\");\n+\n+\treturn 0;\n+}\n+\n+static struct rte_node_register ip4_rewrite_node = {\n+\t.process = ip4_rewrite_node_process,\n+\t.name = \"ip4_rewrite\",\n+\t/* Default edge i.e '0' is pkt drop */\n+\t.nb_edges = 1,\n+\t.next_nodes = {\n+\t\t[0] = \"pkt_drop\",\n+\t},\n+\t.init = ip4_rewrite_node_init,\n+};\n+\n+RTE_NODE_REGISTER(ip4_rewrite_node);\ndiff --git a/lib/librte_node/ip4_rewrite_priv.h b/lib/librte_node/ip4_rewrite_priv.h\nnew file mode 100644\nindex 000000000..420996a03\n--- /dev/null\n+++ b/lib/librte_node/ip4_rewrite_priv.h\n@@ -0,0 +1,55 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2020 Marvell International Ltd.\n+ */\n+#ifndef __INCLUDE_IP4_REWRITE_PRIV_H__\n+#define __INCLUDE_IP4_REWRITE_PRIV_H__\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+#include <rte_common.h>\n+\n+#define RTE_GRAPH_IP4_REWRITE_MAX_NH 64\n+#define RTE_GRAPH_IP4_REWRITE_MAX_LEN 56\n+\n+/**\n+ * @internal\n+ *\n+ * Ipv4 rewrite next hop header data structure. Used to store port specific\n+ * rewrite data.\n+ */\n+struct ip4_rewrite_nh_header {\n+\tuint16_t rewrite_len; /**< Header rewrite length. */\n+\tuint16_t tx_node;     /**< Tx node next index identifier. */\n+\tuint16_t enabled;     /**< NH enable flag */\n+\tuint16_t rsvd;\n+\tunion {\n+\t\tstruct {\n+\t\t\tstruct rte_ether_addr dst;\n+\t\t\t/**< Destination mac address. */\n+\t\t\tstruct rte_ether_addr src;\n+\t\t\t/**< Source mac address. */\n+\t\t};\n+\t\tuint8_t rewrite_data[RTE_GRAPH_IP4_REWRITE_MAX_LEN];\n+\t\t/**< Generic rewrite data */\n+\t};\n+};\n+\n+/**\n+ * @internal\n+ *\n+ * Ipv4 node main data structure.\n+ */\n+struct ip4_rewrite_node_main {\n+\tstruct ip4_rewrite_nh_header nh[RTE_GRAPH_IP4_REWRITE_MAX_NH];\n+\t/**< Array of next hop header data */\n+\tuint16_t next_index[RTE_MAX_ETHPORTS];\n+\t/**< Next index of each configured port. */\n+};\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* __INCLUDE_IP4_REWRITE_PRIV_H__ */\ndiff --git a/lib/librte_node/meson.build b/lib/librte_node/meson.build\nindex ddea1237a..ef056d9af 100644\n--- a/lib/librte_node/meson.build\n+++ b/lib/librte_node/meson.build\n@@ -2,7 +2,7 @@\n # Copyright(C) 2020 Marvell International Ltd.\n \n sources = files('null.c', 'log.c', 'ethdev_rx.c', 'ethdev_tx.c', 'ip4_lookup.c',\n-\t\t'ethdev_ctrl.c')\n+\t\t'ip4_rewrite.c', 'ethdev_ctrl.c')\n headers = files('rte_node_ip4_api.h', 'rte_node_eth_api.h')\n allow_experimental_apis = true\n deps += ['graph', 'mbuf', 'lpm', 'ethdev', 'mempool', 'cryptodev']\n",
    "prefixes": [
        "v1",
        "21/26"
    ]
}