get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127281,
    "url": "http://patches.dpdk.org/api/patches/127281/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230524073929.400623-3-rongweil@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20230524073929.400623-3-rongweil@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230524073929.400623-3-rongweil@nvidia.com",
    "date": "2023-05-24T07:39:29",
    "name": "[v1,2/2] app/testpmd: add IPv6 extension push remove cli",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5f77c3c0cf64837d0f0ff1581aa157a140bcc0fd",
    "submitter": {
        "id": 2223,
        "url": "http://patches.dpdk.org/api/people/2223/?format=api",
        "name": "rongwei liu",
        "email": "rongweil@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230524073929.400623-3-rongweil@nvidia.com/mbox/",
    "series": [
        {
            "id": 28147,
            "url": "http://patches.dpdk.org/api/series/28147/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28147",
            "date": "2023-05-24T07:39:27",
            "name": "add IPv6 extension push remove",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/28147/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/127281/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/127281/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 493A842B89;\n\tWed, 24 May 2023 09:40:09 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2E41442D36;\n\tWed, 24 May 2023 09:40:08 +0200 (CEST)",
            "from NAM11-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam11on2077.outbound.protection.outlook.com [40.107.223.77])\n by mails.dpdk.org (Postfix) with ESMTP id 0700042D32\n for <dev@dpdk.org>; Wed, 24 May 2023 09:40:07 +0200 (CEST)",
            "from BN9PR03CA0723.namprd03.prod.outlook.com (2603:10b6:408:110::8)\n by BN9PR12MB5354.namprd12.prod.outlook.com (2603:10b6:408:103::22)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Wed, 24 May\n 2023 07:40:04 +0000",
            "from BN8NAM11FT023.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:110:cafe::fc) by BN9PR03CA0723.outlook.office365.com\n (2603:10b6:408:110::8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.30 via Frontend\n Transport; Wed, 24 May 2023 07:40:04 +0000",
            "from mail.nvidia.com (216.228.117.160) by\n BN8NAM11FT023.mail.protection.outlook.com (10.13.177.103) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.6411.30 via Frontend Transport; Wed, 24 May 2023 07:40:04 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Wed, 24 May 2023\n 00:39:50 -0700",
            "from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Wed, 24 May\n 2023 00:39:47 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=n4Jd+5Hf1yIoBDUyBq1rpmwJkYoq/NsM/vXd5gvhcL6Qcy9kpO6AoufkP2Qz+tbjg1oOtnT/Wk8+jXP8e76kIRdEiF5prx24qkiRCyybsX12Ki94s1XpGZQcoXDxiglBVeZ+v9fsW0eViYZSlyjuzSmExR9/n/3Ym7lLQ5aBp2RNU0VuPLPLOkJytME2Ujym1goopsDNYEe22VRpNMbv9yjiiDEGV/eqixp9g48VcB/YkZsUbnROeLm5CIUgNtJrKZlE7hhGpbUM8C1kApqtjvKqrs5HNjCtmjoZLNS9ABEQfqCy8OUzWI4UX9CzadG0dbzScEKe/IX/VS3fc3HODg==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=qZpFjviIxnOjyj7Fsj42BWYz+L1MTzpA42h4Gj0aBS0=;\n b=XczVltiB+GXa0XQtHyR4B8JskZeD9xFl1mnnj78OmEwF5GiROaGSvJoFSEalpquqMFKMoecrD1RtB7CGmZBpCzQdTvFMKzuBsLIhcjIbLDYrjSax0sUKPz1jpqAcYGOBHVpjR6c/qlrUOluox7w79r1r4Ad8ptmEnby4bX3IMT8wXhZNDvpvsCvIldbD9rZBHLp0O/XTEnkfntQ3228jDbuEV0WosFUQp4eA0Lif7OUoHZflzT5VIsucNhONY96/8PfCDUwlaIcIJtj6cgwO4XoXuoRPxYdVHaWl7NQxaWpJVrq63QAXqCzTsnOLj6OnilhspNkmkz0bMorqOsHhEw==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=qZpFjviIxnOjyj7Fsj42BWYz+L1MTzpA42h4Gj0aBS0=;\n b=ewQywgyQ8lwQonExCCPXYllQdChb/fw8Ys8cplr1mCyVPXf8aw9vcBxusjb6rlzA9sPx4Q/vupqr8fVmkHCCTk9JbQCZDlMvRFwVjujE246aJm9pDpiuLqfgLtArzPgQxKB8Rjl8mQZmx6v6xAgdfhXZp8dPb+Rh7Zxfk0GPJYnzL/xCJDYO9ytK/5+TSz1u1ya87sY11LvkNMMOTvIqTwfRD2x68AULP12PD3QBr9t8vl1JDzow3MFaf+QhMc20Hznlt1Rq7kGX7IB0Y8V8su5lE3y/FS2UUg8rh+5BWwK0M5FRW9L0yMX1+Xreg7Evoq6F5xynIbV6d/9g/AbEtQ==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.117.160)\n smtp.mailfrom=nvidia.com;\n dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.117.160 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C",
        "From": "Rongwei Liu <rongweil@nvidia.com>",
        "To": "<dev@dpdk.org>, <matan@nvidia.com>, <viacheslavo@nvidia.com>,\n <orika@nvidia.com>, <suanmingm@nvidia.com>, <thomas@monjalon.net>",
        "CC": "Aman Singh <aman.deep.singh@intel.com>, Yuying Zhang\n <yuying.zhang@intel.com>",
        "Subject": "[PATCH v1 2/2] app/testpmd: add IPv6 extension push remove cli",
        "Date": "Wed, 24 May 2023 10:39:29 +0300",
        "Message-ID": "<20230524073929.400623-3-rongweil@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20230524073929.400623-1-rongweil@nvidia.com>",
        "References": "\n <MW2PR12MB4666ED6507D67C7C981F5E8CD6419@MW2PR12MB4666.namprd12.prod.outlook.com>\n <20230524073929.400623-1-rongweil@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.231.35]",
        "X-ClientProxiedBy": "rnnvmail201.nvidia.com (10.129.68.8) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "BN8NAM11FT023:EE_|BN9PR12MB5354:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "5cd9aac2-17fe-4bac-58c1-08db5c2a171a",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n AwJ/W4YEYgGhoqQKlG/hwTE3wBGmczZH2YZkfQN4SRzrsAQ0d9fnk7GORmUrVKmVuTfb20CSFeBRYg9zOrqtrUoiE18DNgPmexTNDLwpZiEQzVORs/gxIMXVYv/PHfQP3L7zm279zZSXlng8TJYyfUUQUevPyoz9kg53UKAaYxzbk06hxAtFUvBM9zoAoKulRiLTy6xbAecCGamOCV3gCs/axVblNTPiN/NuuR7GypqYolMp7UiwOhz2hd2/j6DJD56yVFax4i6QFmFespSx66p/dQGw7zPoa62hrucrXy0OjuMcLjglQfgwChwIvtxhoh+C4fcDeZ/9676mdzd0FUasOBW2vA7y3Zn8FDjwko4hZhVJ21Ac/ysV4OIpL9RxRYRXGvMC6SY6hYIZ5hxAVyjj7AD0h8Y9uahuPobxsnWJD7k+Iw8EdwualEi2OMt2KUILizAcDiAqOk0InbOwdiuPuLzNDgY/TVt6ijWnp5hPd+NcOn1E9u5N9nSO0c0C+Nl2ix8xm1rcda2LxDEwWVUNwZfJkYVXaMsI7tzdYc6bNuM0WKBJrOhd+quriJ7iYjV4DhI1Ydu2+raouzO3ipPuOMj+CkoYWZ/VU3oQZzIAdOkuma+UM5YsyU82AG951GDnSndytLEoTRH6uQObYflVnvJ8ip3Z4xrJSc+2uhFa8gPYxhjAtdMgm/tcCe1u/xLJHeVfeIS/2ELmj6ntyS8l0cX5zAxPESbMrB9eIAQl4Oi9U2DE3xt1czqmOERs",
        "X-Forefront-Antispam-Report": "CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE;\n SFS:(13230028)(4636009)(39860400002)(346002)(396003)(376002)(136003)(451199021)(40470700004)(46966006)(36840700001)(186003)(7636003)(356005)(26005)(40460700003)(82740400003)(1076003)(55016003)(2616005)(47076005)(36860700001)(83380400001)(426003)(336012)(36756003)(6286002)(16526019)(2906002)(30864003)(40480700001)(54906003)(7696005)(316002)(41300700001)(6666004)(82310400005)(110136005)(478600001)(86362001)(4326008)(70206006)(70586007)(8676002)(8936002)(5660300002);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "24 May 2023 07:40:04.7322 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 5cd9aac2-17fe-4bac-58c1-08db5c2a171a",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT023.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BN9PR12MB5354",
        "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": "Add command lines to generate IPv6 routing extension push and\nremove patterns and follow the raw_encap/decap style.\n\nAdd the new actions to the action template parsing.\n\nGenerating the action patterns\n    1. IPv6 routing extension push\n    set ipv6_ext_push 1 ipv6_ext type is 43 /\n    ipv6_routing_ext ext_type is 4\n    ext_next_hdr is 17 ext_seg_left is 2 / end_set\n    2. IPv6 routing extension remove\n    set ipv6_ext_remove 1 ipv6_ext type is 43 / end_set\n\nSpecifying the action in the template\n    1. actions_template_id 1 template ipv6_ext_push index 1\n    2. actions_template_id 1 template ipv6_ext_remove index 1\n\nSigned-off-by: Rongwei Liu <rongweil@nvidia.com>\nAcked-by: Ori Kam <orika@nvidia.com>\n---\n app/test-pmd/cmdline_flow.c | 443 +++++++++++++++++++++++++++++++++++-\n 1 file changed, 442 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 58939ec321..ea4cebce1c 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -74,6 +74,9 @@ enum index {\n \tSET_RAW_INDEX,\n \tSET_SAMPLE_ACTIONS,\n \tSET_SAMPLE_INDEX,\n+\tSET_IPV6_EXT_REMOVE,\n+\tSET_IPV6_EXT_PUSH,\n+\tSET_IPV6_EXT_INDEX,\n \n \t/* Top-level command. */\n \tFLOW,\n@@ -496,6 +499,8 @@ enum index {\n \tITEM_QUOTA_STATE_NAME,\n \tITEM_AGGR_AFFINITY,\n \tITEM_AGGR_AFFINITY_VALUE,\n+\tITEM_IPV6_PUSH_REMOVE_EXT,\n+\tITEM_IPV6_PUSH_REMOVE_EXT_TYPE,\n \n \t/* Validate/create actions. */\n \tACTIONS,\n@@ -665,6 +670,12 @@ enum index {\n \tACTION_QUOTA_QU_LIMIT,\n \tACTION_QUOTA_QU_UPDATE_OP,\n \tACTION_QUOTA_QU_UPDATE_OP_NAME,\n+\tACTION_IPV6_EXT_REMOVE,\n+\tACTION_IPV6_EXT_REMOVE_INDEX,\n+\tACTION_IPV6_EXT_REMOVE_INDEX_VALUE,\n+\tACTION_IPV6_EXT_PUSH,\n+\tACTION_IPV6_EXT_PUSH_INDEX,\n+\tACTION_IPV6_EXT_PUSH_INDEX_VALUE,\n };\n \n /** Maximum size for pattern in struct rte_flow_item_raw. */\n@@ -731,6 +742,42 @@ struct action_raw_decap_data {\n \tuint16_t idx;\n };\n \n+/** Maximum data size in struct rte_flow_action_ipv6_ext_push. */\n+#define ACTION_IPV6_EXT_PUSH_MAX_DATA 512\n+#define IPV6_EXT_PUSH_CONFS_MAX_NUM 8\n+\n+/** Storage for struct rte_flow_action_ipv6_ext_push. */\n+struct ipv6_ext_push_conf {\n+\tuint8_t data[ACTION_IPV6_EXT_PUSH_MAX_DATA];\n+\tsize_t size;\n+\tuint8_t type;\n+};\n+\n+struct ipv6_ext_push_conf ipv6_ext_push_confs[IPV6_EXT_PUSH_CONFS_MAX_NUM];\n+\n+/** Storage for struct rte_flow_action_ipv6_ext_push including external data. */\n+struct action_ipv6_ext_push_data {\n+\tstruct rte_flow_action_ipv6_ext_push conf;\n+\tuint8_t data[ACTION_IPV6_EXT_PUSH_MAX_DATA];\n+\tuint8_t type;\n+\tuint16_t idx;\n+};\n+\n+/** Storage for struct rte_flow_action_ipv6_ext_remove. */\n+struct ipv6_ext_remove_conf {\n+\tstruct rte_flow_action_ipv6_ext_remove conf;\n+\tuint8_t type;\n+};\n+\n+struct ipv6_ext_remove_conf ipv6_ext_remove_confs[IPV6_EXT_PUSH_CONFS_MAX_NUM];\n+\n+/** Storage for struct rte_flow_action_ipv6_ext_remove including external data. */\n+struct action_ipv6_ext_remove_data {\n+\tstruct rte_flow_action_ipv6_ext_remove conf;\n+\tuint8_t type;\n+\tuint16_t idx;\n+};\n+\n struct vxlan_encap_conf vxlan_encap_conf = {\n \t.select_ipv4 = 1,\n \t.select_vlan = 0,\n@@ -2022,6 +2069,8 @@ static const enum index next_action[] = {\n \tACTION_SEND_TO_KERNEL,\n \tACTION_QUOTA_CREATE,\n \tACTION_QUOTA_QU,\n+\tACTION_IPV6_EXT_REMOVE,\n+\tACTION_IPV6_EXT_PUSH,\n \tZERO,\n };\n \n@@ -2230,6 +2279,18 @@ static const enum index action_raw_decap[] = {\n \tZERO,\n };\n \n+static const enum index action_ipv6_ext_remove[] = {\n+\tACTION_IPV6_EXT_REMOVE_INDEX,\n+\tACTION_NEXT,\n+\tZERO,\n+};\n+\n+static const enum index action_ipv6_ext_push[] = {\n+\tACTION_IPV6_EXT_PUSH_INDEX,\n+\tACTION_NEXT,\n+\tZERO,\n+};\n+\n static const enum index action_set_tag[] = {\n \tACTION_SET_TAG_DATA,\n \tACTION_SET_TAG_INDEX,\n@@ -2293,6 +2354,22 @@ static const enum index next_action_sample[] = {\n \tZERO,\n };\n \n+static const enum index item_ipv6_push_ext[] = {\n+\tITEM_IPV6_PUSH_REMOVE_EXT,\n+\tZERO,\n+};\n+\n+static const enum index item_ipv6_push_ext_type[] = {\n+\tITEM_IPV6_PUSH_REMOVE_EXT_TYPE,\n+\tZERO,\n+};\n+\n+static const enum index item_ipv6_push_ext_header[] = {\n+\tITEM_IPV6_ROUTING_EXT,\n+\tITEM_NEXT,\n+\tZERO,\n+};\n+\n static const enum index action_modify_field_dst[] = {\n \tACTION_MODIFY_FIELD_DST_LEVEL,\n \tACTION_MODIFY_FIELD_DST_OFFSET,\n@@ -2334,6 +2411,9 @@ static int parse_set_raw_encap_decap(struct context *, const struct token *,\n static int parse_set_sample_action(struct context *, const struct token *,\n \t\t\t\t   const char *, unsigned int,\n \t\t\t\t   void *, unsigned int);\n+static int parse_set_ipv6_ext_action(struct context *, const struct token *,\n+\t\t\t\t     const char *, unsigned int,\n+\t\t\t\t     void *, unsigned int);\n static int parse_set_init(struct context *, const struct token *,\n \t\t\t  const char *, unsigned int,\n \t\t\t  void *, unsigned int);\n@@ -2411,6 +2491,22 @@ static int parse_vc_action_raw_encap_index(struct context *,\n static int parse_vc_action_raw_decap_index(struct context *,\n \t\t\t\t\t   const struct token *, const char *,\n \t\t\t\t\t   unsigned int, void *, unsigned int);\n+static int parse_vc_action_ipv6_ext_remove(struct context *ctx, const struct token *token,\n+\t\t\t\t\t   const char *str, unsigned int len, void *buf,\n+\t\t\t\t\t   unsigned int size);\n+static int parse_vc_action_ipv6_ext_remove_index(struct context *ctx,\n+\t\t\t\t\t\t const struct token *token,\n+\t\t\t\t\t\t const char *str, unsigned int len,\n+\t\t\t\t\t\t void *buf,\n+\t\t\t\t\t\t unsigned int size);\n+static int parse_vc_action_ipv6_ext_push(struct context *ctx, const struct token *token,\n+\t\t\t\t\t const char *str, unsigned int len, void *buf,\n+\t\t\t\t\t unsigned int size);\n+static int parse_vc_action_ipv6_ext_push_index(struct context *ctx,\n+\t\t\t\t\t       const struct token *token,\n+\t\t\t\t\t       const char *str, unsigned int len,\n+\t\t\t\t\t       void *buf,\n+\t\t\t\t\t       unsigned int size);\n static int parse_vc_action_set_meta(struct context *ctx,\n \t\t\t\t    const struct token *token, const char *str,\n \t\t\t\t    unsigned int len, void *buf,\n@@ -2596,6 +2692,8 @@ static int comp_set_raw_index(struct context *, const struct token *,\n \t\t\t      unsigned int, char *, unsigned int);\n static int comp_set_sample_index(struct context *, const struct token *,\n \t\t\t      unsigned int, char *, unsigned int);\n+static int comp_set_ipv6_ext_index(struct context *ctx, const struct token *token,\n+\t\t\t\t   unsigned int ent, char *buf, unsigned int size);\n static int comp_set_modify_field_op(struct context *, const struct token *,\n \t\t\t      unsigned int, char *, unsigned int);\n static int comp_set_modify_field_id(struct context *, const struct token *,\n@@ -6472,6 +6570,48 @@ static const struct token token_list[] = {\n \t\t.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),\n \t\t.call = parse_vc,\n \t},\n+\t[ACTION_IPV6_EXT_REMOVE] = {\n+\t\t.name = \"ipv6_ext_remove\",\n+\t\t.help = \"IPv6 extension type, defined by set ipv6_ext_remove\",\n+\t\t.priv = PRIV_ACTION(IPV6_EXT_REMOVE,\n+\t\t\tsizeof(struct action_ipv6_ext_remove_data)),\n+\t\t.next = NEXT(action_ipv6_ext_remove),\n+\t\t.call = parse_vc_action_ipv6_ext_remove,\n+\t},\n+\t[ACTION_IPV6_EXT_REMOVE_INDEX] = {\n+\t\t.name = \"index\",\n+\t\t.help = \"the index of ipv6_ext_remove\",\n+\t\t.next = NEXT(NEXT_ENTRY(ACTION_IPV6_EXT_REMOVE_INDEX_VALUE)),\n+\t},\n+\t[ACTION_IPV6_EXT_REMOVE_INDEX_VALUE] = {\n+\t\t.name = \"{index}\",\n+\t\t.type = \"UNSIGNED\",\n+\t\t.help = \"unsigned integer value\",\n+\t\t.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),\n+\t\t.call = parse_vc_action_ipv6_ext_remove_index,\n+\t\t.comp = comp_set_ipv6_ext_index,\n+\t},\n+\t[ACTION_IPV6_EXT_PUSH] = {\n+\t\t.name = \"ipv6_ext_push\",\n+\t\t.help = \"IPv6 extension data, defined by set ipv6_ext_push\",\n+\t\t.priv = PRIV_ACTION(IPV6_EXT_PUSH,\n+\t\t\tsizeof(struct action_ipv6_ext_push_data)),\n+\t\t.next = NEXT(action_ipv6_ext_push),\n+\t\t.call = parse_vc_action_ipv6_ext_push,\n+\t},\n+\t[ACTION_IPV6_EXT_PUSH_INDEX] = {\n+\t\t.name = \"index\",\n+\t\t.help = \"the index of ipv6_ext_push\",\n+\t\t.next = NEXT(NEXT_ENTRY(ACTION_IPV6_EXT_PUSH_INDEX_VALUE)),\n+\t},\n+\t[ACTION_IPV6_EXT_PUSH_INDEX_VALUE] = {\n+\t\t.name = \"{index}\",\n+\t\t.type = \"UNSIGNED\",\n+\t\t.help = \"unsigned integer value\",\n+\t\t.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),\n+\t\t.call = parse_vc_action_ipv6_ext_push_index,\n+\t\t.comp = comp_set_ipv6_ext_index,\n+\t},\n \t/* Top level command. */\n \t[SET] = {\n \t\t.name = \"set\",\n@@ -6481,7 +6621,9 @@ static const struct token token_list[] = {\n \t\t.next = NEXT(NEXT_ENTRY\n \t\t\t     (SET_RAW_ENCAP,\n \t\t\t      SET_RAW_DECAP,\n-\t\t\t      SET_SAMPLE_ACTIONS)),\n+\t\t\t      SET_SAMPLE_ACTIONS,\n+\t\t\t      SET_IPV6_EXT_REMOVE,\n+\t\t\t      SET_IPV6_EXT_PUSH)),\n \t\t.call = parse_set_init,\n \t},\n \t/* Sub-level commands. */\n@@ -6529,6 +6671,49 @@ static const struct token token_list[] = {\n \t\t\t\t 0, RAW_SAMPLE_CONFS_MAX_NUM - 1)),\n \t\t.call = parse_set_sample_action,\n \t},\n+\t[SET_IPV6_EXT_PUSH] = {\n+\t\t.name = \"ipv6_ext_push\",\n+\t\t.help = \"set IPv6 extension header\",\n+\t\t.next = NEXT(NEXT_ENTRY(SET_IPV6_EXT_INDEX)),\n+\t\t.args = ARGS(ARGS_ENTRY_ARB_BOUNDED\n+\t\t\t\t(offsetof(struct buffer, port),\n+\t\t\t\t sizeof(((struct buffer *)0)->port),\n+\t\t\t\t 0, IPV6_EXT_PUSH_CONFS_MAX_NUM - 1)),\n+\t\t.call = parse_set_ipv6_ext_action,\n+\t},\n+\t[SET_IPV6_EXT_REMOVE] = {\n+\t\t.name = \"ipv6_ext_remove\",\n+\t\t.help = \"set IPv6 extension header\",\n+\t\t.next = NEXT(NEXT_ENTRY(SET_IPV6_EXT_INDEX)),\n+\t\t.args = ARGS(ARGS_ENTRY_ARB_BOUNDED\n+\t\t\t\t(offsetof(struct buffer, port),\n+\t\t\t\t sizeof(((struct buffer *)0)->port),\n+\t\t\t\t 0, IPV6_EXT_PUSH_CONFS_MAX_NUM - 1)),\n+\t\t.call = parse_set_ipv6_ext_action,\n+\t},\n+\t[SET_IPV6_EXT_INDEX] = {\n+\t\t.name = \"{index}\",\n+\t\t.type = \"UNSIGNED\",\n+\t\t.help = \"index of ipv6 extension push/remove actions\",\n+\t\t.next = NEXT(item_ipv6_push_ext),\n+\t\t.call = parse_port,\n+\t},\n+\t[ITEM_IPV6_PUSH_REMOVE_EXT] = {\n+\t\t.name = \"ipv6_ext\",\n+\t\t.help = \"set IPv6 extension header\",\n+\t\t.priv = PRIV_ITEM(IPV6_EXT,\n+\t\t\t\t  sizeof(struct rte_flow_item_ipv6_ext)),\n+\t\t.next = NEXT(item_ipv6_push_ext_type),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ITEM_IPV6_PUSH_REMOVE_EXT_TYPE] = {\n+\t\t.name = \"type\",\n+\t\t.help = \"set IPv6 extension type\",\n+\t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,\n+\t\t\t\t\t     next_hdr)),\n+\t\t.next = NEXT(item_ipv6_push_ext_header, NEXT_ENTRY(COMMON_UNSIGNED),\n+\t\t\t     item_param),\n+\t},\n \t[ACTION_SET_TAG] = {\n \t\t.name = \"set_tag\",\n \t\t.help = \"set tag\",\n@@ -8843,6 +9028,140 @@ parse_vc_action_raw_decap(struct context *ctx, const struct token *token,\n \treturn ret;\n }\n \n+static int\n+parse_vc_action_ipv6_ext_remove(struct context *ctx, const struct token *token,\n+\t\t\t\tconst char *str, unsigned int len, void *buf,\n+\t\t\t\tunsigned int size)\n+{\n+\tstruct buffer *out = buf;\n+\tstruct rte_flow_action *action;\n+\tstruct action_ipv6_ext_remove_data *ipv6_ext_remove_data = NULL;\n+\tint ret;\n+\n+\tret = parse_vc(ctx, token, str, len, buf, size);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\t/* Nothing else to do if there is no buffer. */\n+\tif (!out)\n+\t\treturn ret;\n+\tif (!out->args.vc.actions_n)\n+\t\treturn -1;\n+\taction = &out->args.vc.actions[out->args.vc.actions_n - 1];\n+\t/* Point to selected object. */\n+\tctx->object = out->args.vc.data;\n+\tctx->objmask = NULL;\n+\t/* Copy the headers to the buffer. */\n+\tipv6_ext_remove_data = ctx->object;\n+\tipv6_ext_remove_data->conf.type = ipv6_ext_remove_confs[0].type;\n+\taction->conf = &ipv6_ext_remove_data->conf;\n+\treturn ret;\n+}\n+\n+static int\n+parse_vc_action_ipv6_ext_remove_index(struct context *ctx, const struct token *token,\n+\t\t\t\t      const char *str, unsigned int len, void *buf,\n+\t\t\t\t      unsigned int size)\n+{\n+\tstruct action_ipv6_ext_remove_data *action_ipv6_ext_remove_data;\n+\tstruct rte_flow_action *action;\n+\tconst struct arg *arg;\n+\tstruct buffer *out = buf;\n+\tint ret;\n+\tuint16_t idx;\n+\n+\tRTE_SET_USED(token);\n+\tRTE_SET_USED(buf);\n+\tRTE_SET_USED(size);\n+\targ = ARGS_ENTRY_ARB_BOUNDED\n+\t\t(offsetof(struct action_ipv6_ext_remove_data, idx),\n+\t\t sizeof(((struct action_ipv6_ext_remove_data *)0)->idx),\n+\t\t 0, IPV6_EXT_PUSH_CONFS_MAX_NUM - 1);\n+\tif (push_args(ctx, arg))\n+\t\treturn -1;\n+\tret = parse_int(ctx, token, str, len, NULL, 0);\n+\tif (ret < 0) {\n+\t\tpop_args(ctx);\n+\t\treturn -1;\n+\t}\n+\tif (!ctx->object)\n+\t\treturn len;\n+\taction = &out->args.vc.actions[out->args.vc.actions_n - 1];\n+\taction_ipv6_ext_remove_data = ctx->object;\n+\tidx = action_ipv6_ext_remove_data->idx;\n+\taction_ipv6_ext_remove_data->conf.type = ipv6_ext_remove_confs[idx].type;\n+\taction->conf = &action_ipv6_ext_remove_data->conf;\n+\treturn len;\n+}\n+\n+static int\n+parse_vc_action_ipv6_ext_push(struct context *ctx, const struct token *token,\n+\t\t\t      const char *str, unsigned int len, void *buf,\n+\t\t\t      unsigned int size)\n+{\n+\tstruct buffer *out = buf;\n+\tstruct rte_flow_action *action;\n+\tstruct action_ipv6_ext_push_data *ipv6_ext_push_data = NULL;\n+\tint ret;\n+\n+\tret = parse_vc(ctx, token, str, len, buf, size);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\t/* Nothing else to do if there is no buffer. */\n+\tif (!out)\n+\t\treturn ret;\n+\tif (!out->args.vc.actions_n)\n+\t\treturn -1;\n+\taction = &out->args.vc.actions[out->args.vc.actions_n - 1];\n+\t/* Point to selected object. */\n+\tctx->object = out->args.vc.data;\n+\tctx->objmask = NULL;\n+\t/* Copy the headers to the buffer. */\n+\tipv6_ext_push_data = ctx->object;\n+\tipv6_ext_push_data->conf.type = ipv6_ext_push_confs[0].type;\n+\tipv6_ext_push_data->conf.data = ipv6_ext_push_confs[0].data;\n+\tipv6_ext_push_data->conf.size = ipv6_ext_push_confs[0].size;\n+\taction->conf = &ipv6_ext_push_data->conf;\n+\treturn ret;\n+}\n+\n+static int\n+parse_vc_action_ipv6_ext_push_index(struct context *ctx, const struct token *token,\n+\t\t\t\t    const char *str, unsigned int len, void *buf,\n+\t\t\t\t    unsigned int size)\n+{\n+\tstruct action_ipv6_ext_push_data *action_ipv6_ext_push_data;\n+\tstruct rte_flow_action *action;\n+\tconst struct arg *arg;\n+\tstruct buffer *out = buf;\n+\tint ret;\n+\tuint16_t idx;\n+\n+\tRTE_SET_USED(token);\n+\tRTE_SET_USED(buf);\n+\tRTE_SET_USED(size);\n+\targ = ARGS_ENTRY_ARB_BOUNDED\n+\t\t(offsetof(struct action_ipv6_ext_push_data, idx),\n+\t\t sizeof(((struct action_ipv6_ext_push_data *)0)->idx),\n+\t\t 0, IPV6_EXT_PUSH_CONFS_MAX_NUM - 1);\n+\tif (push_args(ctx, arg))\n+\t\treturn -1;\n+\tret = parse_int(ctx, token, str, len, NULL, 0);\n+\tif (ret < 0) {\n+\t\tpop_args(ctx);\n+\t\treturn -1;\n+\t}\n+\tif (!ctx->object)\n+\t\treturn len;\n+\taction = &out->args.vc.actions[out->args.vc.actions_n - 1];\n+\taction_ipv6_ext_push_data = ctx->object;\n+\tidx = action_ipv6_ext_push_data->idx;\n+\taction_ipv6_ext_push_data->conf.type = ipv6_ext_push_confs[idx].type;\n+\taction_ipv6_ext_push_data->conf.size = ipv6_ext_push_confs[idx].size;\n+\taction_ipv6_ext_push_data->conf.data = ipv6_ext_push_confs[idx].data;\n+\taction->conf = &action_ipv6_ext_push_data->conf;\n+\treturn len;\n+}\n+\n static int\n parse_vc_action_set_meta(struct context *ctx, const struct token *token,\n \t\t\t const char *str, unsigned int len, void *buf,\n@@ -10532,6 +10851,35 @@ parse_set_sample_action(struct context *ctx, const struct token *token,\n \treturn len;\n }\n \n+/** Parse set command, initialize output buffer for subsequent tokens. */\n+static int\n+parse_set_ipv6_ext_action(struct context *ctx, const struct token *token,\n+\t\t\t  const char *str, unsigned int len,\n+\t\t\t  void *buf, unsigned int size)\n+{\n+\tstruct buffer *out = buf;\n+\n+\t/* Token name must match. */\n+\tif (parse_default(ctx, token, str, len, NULL, 0) < 0)\n+\t\treturn -1;\n+\t/* Nothing else to do if there is no buffer. */\n+\tif (!out)\n+\t\treturn len;\n+\t/* Make sure buffer is large enough. */\n+\tif (size < sizeof(*out))\n+\t\treturn -1;\n+\tctx->objdata = 0;\n+\tctx->objmask = NULL;\n+\tctx->object = out;\n+\tif (!out->command)\n+\t\treturn -1;\n+\tout->command = ctx->curr;\n+\t/* For ipv6_ext_push/remove we need is pattern */\n+\tout->args.vc.pattern = (void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),\n+\t\t\t\t\t\t       sizeof(double));\n+\treturn len;\n+}\n+\n /**\n  * Parse set raw_encap/raw_decap command,\n  * initialize output buffer for subsequent tokens.\n@@ -10961,6 +11309,24 @@ comp_set_raw_index(struct context *ctx, const struct token *token,\n \treturn nb;\n }\n \n+/** Complete index number for set raw_ipv6_ext_push/ipv6_ext_remove commands. */\n+static int\n+comp_set_ipv6_ext_index(struct context *ctx, const struct token *token,\n+\t\t\tunsigned int ent, char *buf, unsigned int size)\n+{\n+\tuint16_t idx = 0;\n+\tuint16_t nb = 0;\n+\n+\tRTE_SET_USED(ctx);\n+\tRTE_SET_USED(token);\n+\tfor (idx = 0; idx < IPV6_EXT_PUSH_CONFS_MAX_NUM; ++idx) {\n+\t\tif (buf && idx == ent)\n+\t\t\treturn snprintf(buf, size, \"%u\", idx);\n+\t\t++nb;\n+\t}\n+\treturn nb;\n+}\n+\n /** Complete index number for set raw_encap/raw_decap commands. */\n static int\n comp_set_sample_index(struct context *ctx, const struct token *token,\n@@ -11855,6 +12221,78 @@ flow_item_default_mask(const struct rte_flow_item *item)\n \treturn mask;\n }\n \n+/** Dispatch parsed buffer to function calls. */\n+static void\n+cmd_set_ipv6_ext_parsed(const struct buffer *in)\n+{\n+\tuint32_t n = in->args.vc.pattern_n;\n+\tint i = 0;\n+\tstruct rte_flow_item *item = NULL;\n+\tsize_t size = 0;\n+\tuint8_t *data = NULL;\n+\tuint8_t *type = NULL;\n+\tsize_t *total_size = NULL;\n+\tuint16_t idx = in->port; /* We borrow port field as index */\n+\tstruct rte_flow_item_ipv6_routing_ext *ext;\n+\tconst struct rte_flow_item_ipv6_ext *ipv6_ext;\n+\n+\tRTE_ASSERT(in->command == SET_IPV6_EXT_PUSH ||\n+\t\t   in->command == SET_IPV6_EXT_REMOVE);\n+\n+\tif (in->command == SET_IPV6_EXT_REMOVE) {\n+\t\tif (n != 1 || in->args.vc.pattern->type !=\n+\t\t    RTE_FLOW_ITEM_TYPE_IPV6_EXT) {\n+\t\t\tfprintf(stderr, \"Error - Not supported item\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\ttype = (uint8_t *)&ipv6_ext_remove_confs[idx].type;\n+\t\titem = in->args.vc.pattern;\n+\t\tipv6_ext = item->spec;\n+\t\t*type = ipv6_ext->next_hdr;\n+\t\treturn;\n+\t}\n+\n+\ttotal_size = &ipv6_ext_push_confs[idx].size;\n+\tdata = (uint8_t *)&ipv6_ext_push_confs[idx].data;\n+\ttype = (uint8_t *)&ipv6_ext_push_confs[idx].type;\n+\n+\t*total_size = 0;\n+\tmemset(data, 0x00, ACTION_RAW_ENCAP_MAX_DATA);\n+\tfor (i = n - 1 ; i >= 0; --i) {\n+\t\titem = in->args.vc.pattern + i;\n+\t\tswitch (item->type) {\n+\t\tcase RTE_FLOW_ITEM_TYPE_IPV6_EXT:\n+\t\t\tipv6_ext = item->spec;\n+\t\t\t*type = ipv6_ext->next_hdr;\n+\t\t\tbreak;\n+\t\tcase RTE_FLOW_ITEM_TYPE_IPV6_ROUTING_EXT:\n+\t\t\text = (struct rte_flow_item_ipv6_routing_ext *)(uintptr_t)item->spec;\n+\t\t\tif (!ext->hdr.hdr_len) {\n+\t\t\t\tsize = sizeof(struct rte_ipv6_routing_ext) +\n+\t\t\t\t(ext->hdr.segments_left << 4);\n+\t\t\t\text->hdr.hdr_len = ext->hdr.segments_left << 1;\n+\t\t\t\t/* Indicate no TLV once SRH. */\n+\t\t\t\tif (ext->hdr.type == 4)\n+\t\t\t\t\text->hdr.last_entry = ext->hdr.segments_left - 1;\n+\t\t\t} else {\n+\t\t\t\tsize = sizeof(struct rte_ipv6_routing_ext) +\n+\t\t\t\t(ext->hdr.hdr_len << 3);\n+\t\t\t}\n+\t\t\t*total_size += size;\n+\t\t\tmemcpy(data, ext, size);\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tfprintf(stderr, \"Error - Not supported item\\n\");\n+\t\t\tgoto error;\n+\t\t}\n+\t}\n+\tRTE_ASSERT((*total_size) <= ACTION_IPV6_EXT_PUSH_MAX_DATA);\n+\treturn;\n+error:\n+\t*total_size = 0;\n+\tmemset(data, 0x00, ACTION_IPV6_EXT_PUSH_MAX_DATA);\n+}\n+\n /** Dispatch parsed buffer to function calls. */\n static void\n cmd_set_raw_parsed_sample(const struct buffer *in)\n@@ -11988,6 +12426,9 @@ cmd_set_raw_parsed(const struct buffer *in)\n \n \tif (in->command == SET_SAMPLE_ACTIONS)\n \t\treturn cmd_set_raw_parsed_sample(in);\n+\telse if (in->command == SET_IPV6_EXT_PUSH ||\n+\t\t in->command == SET_IPV6_EXT_REMOVE)\n+\t\treturn cmd_set_ipv6_ext_parsed(in);\n \tRTE_ASSERT(in->command == SET_RAW_ENCAP ||\n \t\t   in->command == SET_RAW_DECAP);\n \tif (in->command == SET_RAW_ENCAP) {\n",
    "prefixes": [
        "v1",
        "2/2"
    ]
}