get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 68473,
    "url": "http://patchwork.dpdk.org/api/patches/68473/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1586932797-99533-4-git-send-email-suanmingm@mellanox.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1586932797-99533-4-git-send-email-suanmingm@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1586932797-99533-4-git-send-email-suanmingm@mellanox.com",
    "date": "2020-04-15T06:39:50",
    "name": "[03/10] net/mlx5: reorganize the mlx5 flow handle struct",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "353e98d1e5bd9445f864e2944275d42859babc1d",
    "submitter": {
        "id": 1358,
        "url": "http://patchwork.dpdk.org/api/people/1358/?format=api",
        "name": "Suanming Mou",
        "email": "suanmingm@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patchwork.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1586932797-99533-4-git-send-email-suanmingm@mellanox.com/mbox/",
    "series": [
        {
            "id": 9383,
            "url": "http://patchwork.dpdk.org/api/series/9383/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=9383",
            "date": "2020-04-15T06:39:47",
            "name": "net/mlx5: optimize flow structure",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/9383/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/68473/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/68473/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 5F213A0577;\n\tWed, 15 Apr 2020 08:40:33 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C75C71D16C;\n\tWed, 15 Apr 2020 08:40:11 +0200 (CEST)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n by dpdk.org (Postfix) with ESMTP id 4A0A01D15F\n for <dev@dpdk.org>; Wed, 15 Apr 2020 08:40:09 +0200 (CEST)"
        ],
        "From": "Suanming Mou <suanmingm@mellanox.com>",
        "To": "Matan Azrad <matan@mellanox.com>, Shahaf Shuler <shahafs@mellanox.com>,\n Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "Cc": "wentaoc@mellanox.com,\n\trasland@mellanox.com,\n\tdev@dpdk.org",
        "Date": "Wed, 15 Apr 2020 14:39:50 +0800",
        "Message-Id": "<1586932797-99533-4-git-send-email-suanmingm@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1586932797-99533-1-git-send-email-suanmingm@mellanox.com>",
        "References": "<1586932797-99533-1-git-send-email-suanmingm@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 03/10] net/mlx5: reorganize the mlx5 flow handle\n\tstruct",
        "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": "Currently, the mlx5_flow_handle struct is not fully aligned and has some\nbits wasted. The members can be optimized and reorganized to save memory.\n\n1. As metadata and meter is sharing the same flow match id, now the flow\nid is limited to 24 bits due to the 8 MSBs are used as for the meter color.\nAlign the flow id to other bit members to 32 bits to save the mlx5 flow\nhandle memory.\n\n2. The vlan_vf in struct mlx5_flow_handle_dv was already moved to struct\nmlx5_flow_handle. Remove the legacy vlan_vf in struct mlx5_flow_handle_dv.\n\n3. Reorganize the vlan_vf in mlx5_flow_handle with member SILIST_ENTRY\nnext to make it align with 8 bytes.\n\n4. Reorganize the header modify in mlx5_flow_handle_dv to ILIST_ENTRY next\nto make it align to with bytes.\n\n5. Introduce __rte_pack attribute to make the struct tightly organized.\n\nIt will totally save 20 bytes memory for mlx5_flow_handle struct.\n\nSigned-off-by: Suanming Mou <suanmingm@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow.c |  8 ++++----\n drivers/net/mlx5/mlx5_flow.h | 17 ++++++-----------\n 2 files changed, 10 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex ffc2910..71c6bce 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -2323,8 +2323,8 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,\n \n \tSILIST_FOREACH(priv->sh->ipool[MLX5_IPOOL_MLX5_FLOW], flow->dev_handles,\n \t\t       handle_idx, dev_handle, next)\n-\t\tif (dev_handle->qrss_id)\n-\t\t\tflow_qrss_free_id(dev, dev_handle->qrss_id);\n+\t\tif (dev_handle->flow_id)\n+\t\t\tflow_qrss_free_id(dev, dev_handle->flow_id);\n }\n \n static int\n@@ -3988,7 +3988,7 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,\n \t\t\t * reallocation becomes possible (for example, for\n \t\t\t * other flows in other threads).\n \t\t\t */\n-\t\t\tdev_flow->handle->qrss_id = qrss_id;\n+\t\t\tdev_flow->handle->flow_id = qrss_id;\n \t\t\tret = mlx5_flow_get_reg_id(dev, MLX5_COPY_MARK, 0,\n \t\t\t\t\t\t   error);\n \t\t\tif (ret < 0)\n@@ -4101,7 +4101,7 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,\n \t\t\tret = -rte_errno;\n \t\t\tgoto exit;\n \t\t}\n-\t\tdev_flow->handle->mtr_flow_id = mtr_tag_id;\n+\t\tdev_flow->handle->flow_id = mtr_tag_id;\n \t\t/* Setting the sfx group atrr. */\n \t\tsfx_attr.group = sfx_attr.transfer ?\n \t\t\t\t(MLX5_FLOW_TABLE_LEVEL_SUFFIX - 1) :\ndiff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h\nindex 0f5c5d4..db42189 100644\n--- a/drivers/net/mlx5/mlx5_flow.h\n+++ b/drivers/net/mlx5/mlx5_flow.h\n@@ -494,30 +494,25 @@ struct mlx5_flow_rss {\n struct mlx5_flow_handle_dv {\n \t/* Flow DV api: */\n \tstruct mlx5_flow_dv_matcher *matcher; /**< Cache to matcher. */\n-\tuint32_t encap_decap;\n-\t/**< Index to encap/decap resource in cache. */\n \tstruct mlx5_flow_dv_modify_hdr_resource *modify_hdr;\n \t/**< Pointer to modify header resource in cache. */\n-\tstruct mlx5_vf_vlan vf_vlan;\n-\t/**< Structure for VF VLAN workaround. */\n+\tuint32_t encap_decap;\n+\t/**< Index to encap/decap resource in cache. */\n \tuint32_t push_vlan_res;\n \t/**< Index to push VLAN action resource in cache. */\n \tuint32_t tag_resource;\n \t/**< Index to the tag action. */\n-};\n+} __rte_packed;\n \n /** Device flow handle structure: used both for creating & destroying. */\n struct mlx5_flow_handle {\n \tSILIST_ENTRY(uint32_t)next;\n+\tstruct mlx5_vf_vlan vf_vlan; /**< Structure for VF VLAN workaround. */\n \t/**< Index to next device flow handle. */\n \tuint64_t layers;\n \t/**< Bit-fields of present layers, see MLX5_FLOW_LAYER_*. */\n \tvoid *ib_flow; /**< Verbs flow pointer. */\n-\tstruct mlx5_vf_vlan vf_vlan; /**< Structure for VF VLAN workaround. */\n-\tunion {\n-\t\tuint32_t qrss_id; /**< Uniqie Q/RSS suffix subflow tag. */\n-\t\tuint32_t mtr_flow_id; /**< Unique meter match flow id. */\n-\t};\n+\tuint32_t flow_id:28; /**< Unique match flow id. */\n \tuint32_t mark:1; /**< Metadate rxq mark flag. */\n \tuint32_t fate_action:3; /**< Fate action type. */\n \tunion {\n@@ -529,7 +524,7 @@ struct mlx5_flow_handle {\n #ifdef HAVE_IBV_FLOW_DV_SUPPORT\n \tstruct mlx5_flow_handle_dv dvh;\n #endif\n-};\n+} __rte_packed;\n \n /*\n  * Size for Verbs device flow handle structure only. Do not use the DV only\n",
    "prefixes": [
        "03/10"
    ]
}