Show a patch.

GET /api/patches/73533/?format=api
Content-Type: application/json
Vary: Accept

    "id": 73533,
    "url": "",
    "web_url": "",
    "project": {
        "id": 1,
        "url": "",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "",
        "list_email": "",
        "web_url": "",
        "scm_url": "git://",
        "webscm_url": ""
    "msgid": "<>",
    "date": "2020-07-08T14:43:05",
    "name": "[3/5] net/mlx5: add flex parser devx structures",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8c2cea5e1c2378ad850961701ef7f8f8498cd7c2",
    "submitter": {
        "id": 1357,
        "url": "",
        "name": "Bing Zhao",
        "email": ""
    "delegate": {
        "id": 3268,
        "url": "",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": ""
    "mbox": "",
    "series": [
            "id": 10893,
            "url": "",
            "web_url": "",
            "date": "2020-07-08T14:43:02",
            "name": "add eCPRI support in mlx5 driver",
            "version": 1,
            "mbox": ""
    "comments": "",
    "check": "success",
    "checks": "",
    "tags": {},
    "headers": {
        "Return-Path": "<>",
        "References": "<>",
        "X-Mailman-Version": "2.1.15",
        "Date": "Wed,  8 Jul 2020 22:43:05 +0800",
        "X-BeenThere": "",
        "Message-Id": "<>",
        "X-Original-To": "",
        "Received": [
            "from ( [])\n\tby (Postfix) with ESMTP id 6446FA0527;\n\tWed,  8 Jul 2020 16:43:42 +0200 (CEST)",
            "from [] (localhost [])\n\tby (Postfix) with ESMTP id 0C7BB1DBE1;\n\tWed,  8 Jul 2020 16:43:24 +0200 (CEST)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [])\n by (Postfix) with ESMTP id 4BF571D5E1\n for <>; Wed,  8 Jul 2020 16:43:21 +0200 (CEST)"
        "List-Post": "<>",
        "List-Help": "<>",
        "Sender": "\"dev\" <>",
        "X-Mailer": "git-send-email",
        "Precedence": "list",
        "From": "Bing Zhao <>",
        "Subject": "[dpdk-dev] [PATCH 3/5] net/mlx5: add flex parser devx structures",
        "List-Archive": "<>",
        "Errors-To": "",
        "List-Subscribe": "<>,\n <>",
        "Cc": ",\n\,\n\",
        "List-Id": "DPDK patches and discussions <>",
        "Delivered-To": "",
        "In-Reply-To": "<>",
        "List-Unsubscribe": "<>,\n <>",
        "To": ",\n\"
    "content": "The structures and other definitions will be used for the dynamic\nflex parser creation via Devx command interface. These structures\nwill be used as some some intermediate variables and input\nparameters for the parser creation API.\nIt is better to keep all members consistent with the PRM definition\neven though some of them will not be used.\n\nSigned-off-by: Bing Zhao <>\n---\n drivers/common/mlx5/mlx5_devx_cmds.h | 44 ++++++++++++++++++++++++++++++++++++\n drivers/common/mlx5/mlx5_prm.h       | 14 ++++++++++++\n drivers/net/mlx5/mlx5.h              |  5 ++--\n 3 files changed, 61 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h\nindex 25704ef..faabfb1 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.h\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.h\n@@ -299,6 +299,50 @@ struct mlx5_devx_virtio_q_couners_attr {\n \tuint32_t invalid_buffer;\n };\n \n+/*\n+ * graph flow match sample attributes structure,\n+ * used by flex parser operations.\n+ */\n+struct mlx5_devx_match_sample_attr {\n+\tuint32_t flow_match_sample_en:1;\n+\tuint32_t flow_match_sample_field_offset:16;\n+\tuint32_t flow_match_sample_offset_mode:4;\n+\tuint32_t flow_match_sample_field_offset_mask;\n+\tuint32_t flow_match_sample_field_offset_shift:4;\n+\tuint32_t flow_match_sample_field_base_offset:8;\n+\tuint32_t flow_match_sample_tunnel_mode:3;\n+\tuint32_t flow_match_sample_field_id;\n+};\n+\n+/* graph node arc attributes structure, used by flex parser operations. */\n+struct mlx5_devx_graph_arc_attr {\n+\tuint32_t compare_condition_value:16;\n+\tuint32_t start_inner_tunnel:1;\n+\tuint32_t arc_parse_graph_node:8;\n+\tuint32_t parse_graph_node_handle;\n+};\n+\n+/* Maximal number of samples per graph node. */\n+#define MLX5_GRAPH_NODE_SAMPLE_NUM 8\n+\n+/* Maximal number of input/output arcs per graph node. */\n+#define MLX5_GRAPH_NODE_ARC_NUM 8\n+\n+/* parse graph node attributes structure, used by flex parser operations. */\n+struct mlx5_devx_graph_node_attr {\n+\tuint32_t modify_field_select;\n+\tuint32_t header_length_mode:4;\n+\tuint32_t header_length_base_value:16;\n+\tuint32_t header_length_field_shift:4;\n+\tuint32_t header_length_field_offset:16;\n+\tuint32_t header_length_field_mask;\n+\tstruct mlx5_devx_match_sample_attr sample[MLX5_GRAPH_NODE_SAMPLE_NUM];\n+\tuint32_t next_header_field_offset:16;\n+\tuint32_t next_header_field_size:5;\n+\tstruct mlx5_devx_graph_arc_attr in[MLX5_GRAPH_NODE_ARC_NUM];\n+\tstruct mlx5_devx_graph_arc_attr out[MLX5_GRAPH_NODE_ARC_NUM];\n+};\n+\n /* mlx5_devx_cmds.c */\n \n __rte_internal\ndiff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h\nindex decc63d..9fed365 100644\n--- a/drivers/common/mlx5/mlx5_prm.h\n+++ b/drivers/common/mlx5/mlx5_prm.h\n@@ -2539,6 +2539,20 @@ enum {\n /* The bits meter color use. */\n #define MLX5_MTR_COLOR_BITS 8\n \n+/* Length mode of dynamic flex parser graph node. */\n+enum mlx5_parse_graph_node_len_mode {\n+\tMLX5_GRAPH_NODE_LEN_FIXED = 0x0,\n+\tMLX5_GRAPH_NODE_LEN_FIELD = 0x1,\n+\tMLX5_GRAPH_NODE_LEN_BITMASK = 0x2,\n+};\n+\n+/* Offset mode of the samples of flex parser. */\n+enum mlx5_parse_graph_flow_match_sample_offset_mode {\n+\tMLX5_GRAPH_SAMPLE_OFFSET_FIXED = 0x0,\n+\tMLX5_GRAPH_SAMPLE_OFFSET_FIELD = 0x1,\n+\tMLX5_GRAPH_SAMPLE_OFFSET_BITMASK = 0x2,\n+};\n+\n /**\n  * Convert a user mark to flow mark.\n  *\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 51775ca..07cbaf4 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -537,9 +537,10 @@ enum mlx5_flex_parser_profile_id {\n \n /* Sample ID information of flex parser structure. */\n struct mlx5_flex_parser_profiles {\n-\tuint32_t ids[4];\t/* Sample IDs for this profile. */\n-\tvoid *obj;\t\t/* Flex parser node object. */\n \tuint32_t num;\t\t/* Actual number of samples. */\n+\tuint32_t ids[8];\t/* Sample IDs for this profile. */\n+\tuint8_t offset[8];\t/* Bytes offset of each parser. */\n+\tvoid *obj;\t\t/* Flex parser node object. */\n };\n \n /*\n",
    "prefixes": [