get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 42729,
    "url": "http://patches.dpdk.org/api/patches/42729/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180710155743.14448-2-adrien.mazarguil@6wind.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": "<20180710155743.14448-2-adrien.mazarguil@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180710155743.14448-2-adrien.mazarguil@6wind.com",
    "date": "2018-07-10T16:04:42",
    "name": "[v5,01/10] net/mlx5: rename confusing object in probe code",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "1f171cc558e4298904f7824f98febea4852f0bd2",
    "submitter": {
        "id": 165,
        "url": "http://patches.dpdk.org/api/people/165/?format=api",
        "name": "Adrien Mazarguil",
        "email": "adrien.mazarguil@6wind.com"
    },
    "delegate": {
        "id": 6624,
        "url": "http://patches.dpdk.org/api/users/6624/?format=api",
        "username": "shahafs",
        "first_name": "Shahaf",
        "last_name": "Shuler",
        "email": "shahafs@mellanox.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180710155743.14448-2-adrien.mazarguil@6wind.com/mbox/",
    "series": [
        {
            "id": 501,
            "url": "http://patches.dpdk.org/api/series/501/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=501",
            "date": "2018-07-10T16:04:39",
            "name": "net/mlx5: add port representor support",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/501/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42729/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/42729/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2CF607EC7;\n\tTue, 10 Jul 2018 18:05:01 +0200 (CEST)",
            "from mail-wm0-f67.google.com (mail-wm0-f67.google.com\n\t[74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 1BBAD5F44\n\tfor <dev@dpdk.org>; Tue, 10 Jul 2018 18:04:58 +0200 (CEST)",
            "by mail-wm0-f67.google.com with SMTP id z6-v6so13958665wma.0\n\tfor <dev@dpdk.org>; Tue, 10 Jul 2018 09:04:58 -0700 (PDT)",
            "from 6wind.com (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\t38-v6sm9879437wrm.15.2018.07.10.09.04.57\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 10 Jul 2018 09:04:57 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to;\n\tbh=QLWEKxuqhF2sx7AXNTonfLHxyzB3mWcORADPDgYW6JM=;\n\tb=Q51q8xNSW1luCQe+wC3oEhb3fb3m/xKmIb4IrwCPVFedzhG5mfprTjZ1/NuwArf9Gi\n\tT/h44OjHBYcDgC5htyJTx1z1X7LvpmRh6Afm4Y9aXWEgrqN2XbjYwX9phbxhMUFXM3GU\n\tNMiVX4GiA9UeAumgfREVzOXWIXnu1wiQp+bt5oY2RwrFfaNmwLkPYpQ65qT4R77n++g0\n\tFEuW5gMtxM0SsRCgQOuxi9Y7gZlCWimMyJ+3Gd4XcaU/eYWKNSsePwOsLmrigH64D7ei\n\tMv8ZjEtyQONTspJiclz+vplg9PPnOryl0stbhyb8gUut5B2+SwyaiI4XbQ8oZ5i4AGnR\n\tvx2Q==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to;\n\tbh=QLWEKxuqhF2sx7AXNTonfLHxyzB3mWcORADPDgYW6JM=;\n\tb=T0V9pNnrIn13TI1+eFxid3pOL5osyG6tYDeoJ7wBywSsCFx7QTCxg6pwXNTWuh6f88\n\tEHOem5iKGCDlgd3e6rlZ/54D1dtHAor4WP8hw99g9JV3AFe1irrpTEipiUmNOEv8WYSd\n\tlREyzulHeRfHOOjAfJlv3P1anYT8Im8O0vnpxy42RzkTXDMHpL3wIlqajs5WswowjZD4\n\tBy+zcdzNPbftepnoBBDAfCiuNyEy31Dberj59ceKalz665i1AGJG/ICKgpWph6lc6JtO\n\tvoi/v+aONh3U1vkyuflbQI8BBCTKcgALRYnWHjP6ymKK/Je+4STMvdcYXNIrwjcpE+Ct\n\t4epA==",
        "X-Gm-Message-State": "AOUpUlEri8m1fDMO4mSND9KAjrlydua0YZpkJGGd7Hx4bR4btaoifMns\n\tpspPjcA/f4DKn7L4Q44ZhVersuX/",
        "X-Google-Smtp-Source": "AAOMgpdwarEuLx/YVP355apoLiCApS81jh9vedX2pCcnr730EXJ+HOEaiIPbZEDyTcexu4YqZJC6VQ==",
        "X-Received": "by 2002:a1c:b143:: with SMTP id\n\ta64-v6mr8246023wmf.114.1531238698700; \n\tTue, 10 Jul 2018 09:04:58 -0700 (PDT)",
        "Date": "Tue, 10 Jul 2018 18:04:42 +0200",
        "From": "Adrien Mazarguil <adrien.mazarguil@6wind.com>",
        "To": "Shahaf Shuler <shahafs@mellanox.com>",
        "Cc": "dev@dpdk.org",
        "Message-ID": "<20180710155743.14448-2-adrien.mazarguil@6wind.com>",
        "References": "<20180705083934.5535-1-adrien.mazarguil@6wind.com>\n\t<20180710155743.14448-1-adrien.mazarguil@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "In-Reply-To": "<20180710155743.14448-1-adrien.mazarguil@6wind.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "Subject": "[dpdk-dev] [PATCH v5 01/10] net/mlx5: rename confusing object in\n\tprobe code",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "There are several attribute objects in this function:\n\n- IB device attributes (struct ibv_device_attr_ex device_attr).\n- Direct Verbs attributes (struct mlx5dv_context attrs_out).\n- Port attributes (struct ibv_port_attr).\n- IB device attributes again (struct ibv_device_attr_ex device_attr_ex).\n\n\"attrs_out\" is both odd and initialized using a nonstandard syntax. Rename\nit \"dv_attr\" for consistency.\n\nSigned-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>\nReviewed-by: Xueming Li <xuemingl@mellanox.com>\n--\nv2 changes:\n\n- Fixed ctx -> attr_ctx in mlx5_pci_probe().\n---\n drivers/net/mlx5/mlx5.c | 34 +++++++++++++++++-----------------\n 1 file changed, 17 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex d081bdd05..22cbce8d5 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -654,6 +654,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n {\n \tstruct ibv_device **list = NULL;\n \tstruct ibv_device *ibv_dev;\n+\tstruct mlx5dv_context dv_attr = { .comp_mask = 0 };\n \tint err = 0;\n \tstruct ibv_context *attr_ctx = NULL;\n \tstruct ibv_device_attr_ex device_attr;\n@@ -670,7 +671,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tunsigned int mprq_min_stride_num_n = 0;\n \tunsigned int mprq_max_stride_num_n = 0;\n \tint i;\n-\tstruct mlx5dv_context attrs_out = {0};\n #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT\n \tstruct ibv_counter_set_description cs_desc = { .counter_type = 0 };\n #endif\n@@ -736,21 +736,21 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tibv_dev = list[i];\n \tDRV_LOG(DEBUG, \"device opened\");\n #ifdef HAVE_IBV_MLX5_MOD_SWP\n-\tattrs_out.comp_mask |= MLX5DV_CONTEXT_MASK_SWP;\n+\tdv_attr.comp_mask |= MLX5DV_CONTEXT_MASK_SWP;\n #endif\n \t/*\n \t * Multi-packet send is supported by ConnectX-4 Lx PF as well\n \t * as all ConnectX-5 devices.\n \t */\n #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT\n-\tattrs_out.comp_mask |= MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS;\n+\tdv_attr.comp_mask |= MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS;\n #endif\n #ifdef HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT\n-\tattrs_out.comp_mask |= MLX5DV_CONTEXT_MASK_STRIDING_RQ;\n+\tdv_attr.comp_mask |= MLX5DV_CONTEXT_MASK_STRIDING_RQ;\n #endif\n-\tmlx5_glue->dv_query_device(attr_ctx, &attrs_out);\n-\tif (attrs_out.flags & MLX5DV_CONTEXT_FLAGS_MPW_ALLOWED) {\n-\t\tif (attrs_out.flags & MLX5DV_CONTEXT_FLAGS_ENHANCED_MPW) {\n+\tmlx5_glue->dv_query_device(attr_ctx, &dv_attr);\n+\tif (dv_attr.flags & MLX5DV_CONTEXT_FLAGS_MPW_ALLOWED) {\n+\t\tif (dv_attr.flags & MLX5DV_CONTEXT_FLAGS_ENHANCED_MPW) {\n \t\t\tDRV_LOG(DEBUG, \"enhanced MPW is supported\");\n \t\t\tmps = MLX5_MPW_ENHANCED;\n \t\t} else {\n@@ -762,14 +762,14 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t\tmps = MLX5_MPW_DISABLED;\n \t}\n #ifdef HAVE_IBV_MLX5_MOD_SWP\n-\tif (attrs_out.comp_mask & MLX5DV_CONTEXT_MASK_SWP)\n-\t\tswp = attrs_out.sw_parsing_caps.sw_parsing_offloads;\n+\tif (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_SWP)\n+\t\tswp = dv_attr.sw_parsing_caps.sw_parsing_offloads;\n \tDRV_LOG(DEBUG, \"SWP support: %u\", swp);\n #endif\n #ifdef HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT\n-\tif (attrs_out.comp_mask & MLX5DV_CONTEXT_MASK_STRIDING_RQ) {\n+\tif (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_STRIDING_RQ) {\n \t\tstruct mlx5dv_striding_rq_caps mprq_caps =\n-\t\t\tattrs_out.striding_rq_caps;\n+\t\t\tdv_attr.striding_rq_caps;\n \n \t\tDRV_LOG(DEBUG, \"\\tmin_single_stride_log_num_of_bytes: %d\",\n \t\t\tmprq_caps.min_single_stride_log_num_of_bytes);\n@@ -794,15 +794,15 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t}\n #endif\n \tif (RTE_CACHE_LINE_SIZE == 128 &&\n-\t    !(attrs_out.flags & MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP))\n+\t    !(dv_attr.flags & MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP))\n \t\tcqe_comp = 0;\n \telse\n \t\tcqe_comp = 1;\n #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT\n-\tif (attrs_out.comp_mask & MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS) {\n-\t\ttunnel_en = ((attrs_out.tunnel_offloads_caps &\n+\tif (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS) {\n+\t\ttunnel_en = ((dv_attr.tunnel_offloads_caps &\n \t\t\t      MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN) &&\n-\t\t\t     (attrs_out.tunnel_offloads_caps &\n+\t\t\t     (dv_attr.tunnel_offloads_caps &\n \t\t\t      MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE));\n \t}\n \tDRV_LOG(DEBUG, \"tunnel offloading is %ssupported\",\n@@ -812,9 +812,9 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t\t\"tunnel offloading disabled due to old OFED/rdma-core version\");\n #endif\n #ifdef HAVE_IBV_DEVICE_MPLS_SUPPORT\n-\tmpls_en = ((attrs_out.tunnel_offloads_caps &\n+\tmpls_en = ((dv_attr.tunnel_offloads_caps &\n \t\t    MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_CW_MPLS_OVER_GRE) &&\n-\t\t   (attrs_out.tunnel_offloads_caps &\n+\t\t   (dv_attr.tunnel_offloads_caps &\n \t\t    MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_CW_MPLS_OVER_UDP));\n \tDRV_LOG(DEBUG, \"MPLS over GRE/UDP tunnel offloading is %ssupported\",\n \t\tmpls_en ? \"\" : \"not \");\n",
    "prefixes": [
        "v5",
        "01/10"
    ]
}